Learn R Programming

mlr3proba (version 0.4.9)

mlr_task_generators_simsurv: Survival Task Generator for Package 'simsurv'

Description

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.

Arguments

Dictionary

This TaskGenerator can be instantiated via the dictionary mlr_task_generators or with the associated sugar function tgen():

mlr_task_generators$get("simsurv")
tgen("simsurv")

Super class

mlr3::TaskGenerator -> TaskGeneratorSimsurv

Methods

Public methods

Method new()

Creates a new instance of this R6 class.

Usage

TaskGeneratorSimsurv$new()

Method clone()

The objects of this class are cloneable with this method.

Usage

TaskGeneratorSimsurv$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

See Also

Dictionary of TaskGenerators: mlr3::mlr_task_generators

Examples

Run this code
# NOT RUN {
if (requireNamespace("simsurv", quietly = TRUE)) {
  generator = mlr3::mlr_task_generators$get("simsurv")
  task = generator$generate(20)
  task$head()
}
# }

Run the code above in your browser using DataLab