Last updated on 2025-12-28 09:51:01 CET.
| Package | ERROR | OK |
|---|---|---|
| xtdml | 1 | 12 |
Current CRAN status: ERROR: 1, OK: 12
Version: 0.1.11
Check: examples
Result: ERROR
Running examples in 'xtdml-Ex.R' failed
The error most likely occurred in:
> ### Name: xtdml_plr
> ### Title: DML Method for Partially Linear Panel Models
> ### Aliases: xtdml_plr
>
> ### ** Examples
>
> # An illustrative example using a regression tree (`rpart`)
> library(mlr3)
> library(rpart)
> library(mlr3tuning)
Loading required package: paradox
> set.seed(1234)
>
> # Generate simulated dataset
> data = make_plpr_data(n_obs = 100, t_per = 5, dim_x = 10, theta = 0.5, rho=0.8)
>
> x_cols = paste0("X", 1:10)
>
> # Set up DML data environment
> obj_xtdml_data = xtdml_data_from_data_frame(data,
+ x_cols = x_cols, y_col = "y", d_cols = "d",
+ panel_id = "id",
+ time_id = "time",
+ approach = "fd-exact")
>
> # Set up DML estimation environment
> learner = lrn("regr.rpart")
> ml_l = learner$clone()
> ml_m = learner$clone()
>
> obj_xtdml = xtdml_plr$new(obj_xtdml_data,
+ ml_l = ml_l, ml_m = ml_m,
+ score = "orth-PO", n_folds = 3)
> # Set up a list of parameter grids
> param_grid = list("ml_l" = ps(cp = p_dbl(lower = 0.01, upper = 0.02),
+ maxdepth = p_int(lower = 2, upper = 10)),
+ "ml_m" = ps(cp = p_dbl(lower = 0.01, upper = 0.02),
+ maxdepth = p_int(lower = 2, upper = 10)))
>
> tune_settings = list(n_folds_tune = 3,
+ rsmp_tune = mlr3::rsmp("cv", folds = 3),
+ terminator = mlr3tuning::trm("evals", n_evals = 5),
+ tuner = tnr("grid_search", resolution = 10))
>
> obj_xtdml$tune(param_set = param_grid, tune_settings = tune_settings)
INFO [22:34:18.804] [bbotk] Starting to optimize 2 parameter(s) with '<OptimizerBatchGridSearch>' and '<TerminatorEvals> [n_evals=5, k=0]'
INFO [22:34:18.888] [bbotk] Evaluating 1 configuration(s)
INFO [22:34:18.915] [mlr3] Running benchmark with 3 resampling iterations
INFO [22:34:19.005] [mlr3] Applying learner 'regr.rpart' on task 'nuis_l' (iter 1/3)
INFO [22:34:19.073] [mlr3] Applying learner 'regr.rpart' on task 'nuis_l' (iter 2/3)
INFO [22:34:19.118] [mlr3] Applying learner 'regr.rpart' on task 'nuis_l' (iter 3/3)
INFO [22:34:19.168] [mlr3] Finished benchmark
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-windows-x86_64
These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.
Health stats visible at Monitor.