Last updated on 2025-12-20 10:50:41 CET.
| Flavor | Version | Tinstall | Tcheck | Ttotal | Status | Flags |
|---|---|---|---|---|---|---|
| r-devel-linux-x86_64-debian-clang | 1.0.4 | 44.57 | 168.34 | 212.91 | OK | |
| r-devel-linux-x86_64-debian-gcc | 1.0.4 | 29.44 | 145.05 | 174.49 | ERROR | |
| r-devel-linux-x86_64-fedora-clang | 1.0.4 | 92.00 | 235.24 | 327.24 | OK | |
| r-devel-linux-x86_64-fedora-gcc | 1.0.4 | 87.00 | 239.44 | 326.44 | OK | |
| r-devel-windows-x86_64 | 1.0.4 | 48.00 | 174.00 | 222.00 | OK | |
| r-patched-linux-x86_64 | 1.0.4 | 44.58 | 159.30 | 203.88 | OK | |
| r-release-linux-x86_64 | 1.0.4 | 44.18 | 159.76 | 203.94 | OK | |
| r-release-macos-arm64 | 1.0.4 | OK | ||||
| r-release-macos-x86_64 | 1.0.4 | 28.00 | 144.00 | 172.00 | OK | |
| r-release-windows-x86_64 | 1.0.4 | 53.00 | 170.00 | 223.00 | OK | |
| r-oldrel-macos-arm64 | 1.0.4 | NOTE | ||||
| r-oldrel-macos-x86_64 | 1.0.4 | 29.00 | 152.00 | 181.00 | NOTE | |
| r-oldrel-windows-x86_64 | 1.0.4 | 60.00 | 227.00 | 287.00 | OK |
Version: 1.0.4
Check: examples
Result: ERROR
Running examples in ‘gKRLS-Ex.R’ failed
The error most likely occurred in:
> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: ml_gKRLS
> ### Title: Machine Learning with gKRLS
> ### Aliases: ml_gKRLS SL.mgcv predict.SL.mgcv add_bam_to_mlr3
>
> ### ** Examples
>
> set.seed(789)
> N <- 100
> x1 <- rnorm(N)
> x2 <- rbinom(N, size = 1, prob = .2)
> y <- x1^3 - 0.5 * x2 + rnorm(N, 0, 1)
> y <- y * 10
> X <- cbind(x1, x2, x1 + x2 * 3)
> X <- cbind(X, "x3" = rexp(nrow(X)))
>
> if (requireNamespace("SuperLearner", quietly = TRUE)) {
+ # Estimate Ensemble with SuperLearner
+ require(SuperLearner)
+ sl_m <- function(...) { SL.mgcv(formula = ~ x1 + x2 + x3, ...) }
+ fit_SL <- SuperLearner::SuperLearner(
+ Y = y, X = data.frame(X),
+ SL.library = "sl_m"
+ )
+ pred <- predict(fit_SL, newdata = data.frame(X))
+ }
Loading required package: SuperLearner
Loading required package: nnls
Loading required package: gam
Loading required package: splines
Loading required package: foreach
Loaded gam 1.22-7
Attaching package: ‘gam’
The following objects are masked from ‘package:mgcv’:
gam, gam.control, gam.fit, s
Super Learner
Version: 2.0-29
Package created on 2024-02-06
> # Estimate Double/Debiased Machine Learning
> if (requireNamespace("DoubleML", quietly = TRUE)) {
+ require(DoubleML)
+ # Load the models; for testing *ONLY* have multiplier of 2
+ double_bam_1 <- LearnerRegrBam$new()
+ double_bam_1$param_set$values$formula <- ~ s(x1, x3, bs = "gKRLS",
+ xt = gKRLS(sketch_multiplier = NULL, sketch_size_raw = 2))
+ double_bam_2 <- LearnerClassifBam$new()
+ double_bam_2$param_set$values$formula <- ~ s(x1, x3, bs = "gKRLS",
+ xt = gKRLS(sketch_multiplier = NULL, sketch_size_raw = 2))
+
+ # Create data
+ dml_data <- DoubleMLData$new(
+ data = data.frame(X, y),
+ x_cols = c("x1", "x3"), y_col = "y",
+ d_cols = "x2"
+ )
+ # Estimate effects treatment (works for other DoubleML methods)
+ dml_est <- DoubleMLIRM$new(
+ data = dml_data,
+ n_folds = 2,
+ ml_g = double_bam_1,
+ ml_m = double_bam_2
+ )$fit()
+ }
Loading required package: DoubleML
INFO [16:10:22.053] [mlr3] Applying learner 'classif.bam' on task 'nuis_m' (iter 1/2)
INFO [16:10:22.593] [mlr3] Applying learner 'classif.bam' on task 'nuis_m' (iter 2/2)
Error in `[.data.table`(data, , `:=`("task_hash", task[[1L]]$hash), by = "uhash") :
attempt access index 9/9 in VECTOR_ELT
Calls: <Anonymous> ... initialize -> .__ResultData__initialize -> [ -> [.data.table
Execution halted
Flavor: r-devel-linux-x86_64-debian-gcc
Version: 1.0.4
Check: tests
Result: ERROR
Running ‘testthat.R’ [74s/87s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
> library(testthat)
> library(gKRLS)
Loading required package: mgcv
Loading required package: nlme
This is mgcv 1.9-4. For overview type '?mgcv'.
Loading required package: sandwich
>
> test_check("gKRLS")
INFO [16:10:27.467] [mlr3] Applying learner 'classif.bam' on task 'nuis_m' (iter 1/2)
INFO [16:10:28.063] [mlr3] Applying learner 'classif.bam' on task 'nuis_m' (iter 2/2)
Saving _problems/test_DML-42.R
Bivariate smoothing example
Bivariate smoothing example
[1] "derivative"
[1] "second_derivative"
Distribution of Pointwise Marginal Effects: N = 200
(Intercept) x1 x2
25% -0.001900025 -0.1139238 -0.07130014
50% -0.001843025 0.0601889 -0.05431280
75% -0.001574822 0.2717062 -0.02734085
Summary of Average Marginal Effects
est se t.stat p.value
(Intercept) -0.001673628 0.20599894 -0.008124448 0.993526152
x1 0.098231155 0.03707063 2.649837808 0.008725682
x2 -0.047751134 0.03785936 -1.261276966 0.208742463
variable type est se t p.value
1 x1 derivative 0.09823115 0.03707063 2.649838 0.008725683
2 x2 derivative -0.04775113 0.03785917 -1.261283 0.208740224
[ FAIL 1 | WARN 0 | SKIP 1 | PASS 204 ]
══ Skipped tests (1) ═══════════════════════════════════════════════════════════
• empty test (1): 'test_aaa.R:2:1'
══ Failed tests ════════════════════════════════════════════════════════════════
── Error ('test_DML.R:37:5'): Test DoubleML ────────────────────────────────────
Error in ``[.data.table`(data, , `:=`("task_hash", task[[1L]]$hash), by = "uhash")`: attempt access index 9/9 in VECTOR_ELT
Backtrace:
▆
1. └─DoubleMLIRM$new(data = dml_data, n_folds = 2, ml_g = double_bam_1, ... at test_DML.R:37:5
2. └─private$nuisance_est(private$get__smpls())
3. └─DoubleML:::dml_cv_predict(...)
4. └─mlr3::resample(task_pred, ml_learner, resampling_smpls, store_models = TRUE)
5. └─ResultData$new(data, data_extra, store_backends = store_backends)
6. └─mlr3 (local) initialize(...)
7. └─mlr3:::.__ResultData__initialize(...)
8. ├─data[, `:=`("task_hash", task[[1L]]$hash), by = "uhash"]
9. └─data.table:::`[.data.table`(...)
[ FAIL 1 | WARN 0 | SKIP 1 | PASS 204 ]
Error:
! Test failures.
Execution halted
Flavor: r-devel-linux-x86_64-debian-gcc
Version: 1.0.4
Check: installed package size
Result: NOTE
installed size is 7.8Mb
sub-directories of 1Mb or more:
libs 7.4Mb
Flavors: r-oldrel-macos-arm64, r-oldrel-macos-x86_64