- using R Under development (unstable) (2025-12-18 r89199)
- using platform: x86_64-pc-linux-gnu
- R was compiled by
Debian clang version 21.1.7 (1)
Debian flang version 21.1.7 (1)
- running under: Debian GNU/Linux forky/sid
- using session charset: UTF-8
- checking for file ‘gKRLS/DESCRIPTION’ ... OK
- checking extension type ... Package
- this is package ‘gKRLS’ version ‘1.0.4’
- package encoding: UTF-8
- checking CRAN incoming feasibility ... [1s/1s] OK
- checking package namespace information ... OK
- checking package dependencies ... OK
- checking if this is a source package ... OK
- checking if there is a namespace ... OK
- checking for executable files ... OK
- checking for hidden files and directories ... OK
- checking for portable file names ... OK
- checking for sufficient/correct file permissions ... OK
- checking serialization versions ... OK
- checking whether package ‘gKRLS’ can be installed ... OK
See the install log for details.
- used C++ compiler: ‘Debian clang version 21.1.7 (1)’
- checking package directory ... OK
- checking for future file timestamps ... OK
- checking DESCRIPTION meta-information ... OK
- checking top-level files ... OK
- checking for left-over files ... OK
- checking index information ... OK
- checking package subdirectories ... OK
- checking code files for non-ASCII characters ... OK
- checking R files for syntax errors ... OK
- checking whether the package can be loaded ... [3s/4s] OK
- checking whether the package can be loaded with stated dependencies ... [3s/4s] OK
- checking whether the package can be unloaded cleanly ... [3s/4s] OK
- checking whether the namespace can be loaded with stated dependencies ... [2s/3s] OK
- checking whether the namespace can be unloaded cleanly ... [3s/3s] OK
- checking loading without being on the library search path ... [3s/4s] OK
- checking use of S3 registration ... OK
- checking dependencies in R code ... OK
- checking S3 generic/method consistency ... OK
- checking replacement functions ... OK
- checking foreign function calls ... OK
- checking R code for possible problems ... [21s/27s] OK
- checking Rd files ... [0s/1s] OK
- checking Rd metadata ... OK
- checking Rd line widths ... OK
- checking Rd cross-references ... OK
- checking for missing documentation entries ... OK
- checking for code/documentation mismatches ... OK
- checking Rd \usage sections ... OK
- checking Rd contents ... OK
- checking for unstated dependencies in examples ... OK
- checking line endings in C/C++/Fortran sources/headers ... OK
- checking pragmas in C/C++ headers and code ... OK
- checking compilation flags used ... OK
- checking compiled code ... OK
- checking examples ... [10s/11s] 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 [01:32:19.721] [mlr3] Applying learner 'classif.bam' on task 'nuis_m' (iter 1/2)
INFO [01:32:20.199] [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
- checking for unstated dependencies in ‘tests’ ... OK
- checking tests ... [70s/86s] ERROR
Running ‘testthat.R’ [70s/86s]
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 [01:32:27.260] [mlr3] Applying learner 'classif.bam' on task 'nuis_m' (iter 1/2)
INFO [01:32:28.096] [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
- checking PDF version of manual ... [5s/6s] OK
- checking HTML version of manual ... [2s/3s] OK
- checking for non-standard things in the check directory ... OK
- DONE
Status: 2 ERRORs