A mlr3::TaskGenerator calling simsurv::simsurv() from package simsurv.

This generator currently only exposes a small subset of the flexibility of simsurv, and just creates a small data set with the following numerical covariates:

• treatment: Bernoulli distributed with log hazard ratio -0.5.

• height: Normally distributed with log hazard ratio 1.

• weight: normally distributed with log hazard ratio 0.

See simsurv::simsurv() for an explanation of the hyperparameters.

## Format

TaskGeneratorSimsurv$new() mlr_task_generators$get("simsurv")

generator = mlr3::mlr_task_generators$get("simsurv") task = generator$generate(200)
task$head()#> eventtime status height treatment weight #> 1: 0.5112581 1 216.7085 1 69.59443 #> 2: 4.2510644 1 184.3172 0 87.36638 #> 3: 5.0000000 0 190.3246 0 71.23857 #> 4: 5.0000000 0 192.3718 1 69.53663 #> 5: 4.5993390 1 165.4968 1 69.31986 #> 6: 5.0000000 0 183.5906 1 71.03173plot(task$survfit())