getSimulatedData {simIDM}R Documentation

Simulate Data Set from an Illness-Death Model

Description

This function creates a single simulated data set for a single treatment arm. It simulates data from an illness-death model with one row per transition and subject.

Usage

getSimulatedData(
  N,
  transition = exponential_transition(h01 = 1, h02 = 1, h12 = 1),
  dropout = list(rate = 0, time = 12),
  accrual = list(param = "time", value = 0)
)

Arguments

N

(int)
number of patients.

transition

(TransitionParameters)
transition parameters comprising hazards, corresponding intervals and weibull_rates, see exponential_transition(), piecewise_exponential() and weibull_transition() for details.

dropout

(list)
specifies drop-out probability. Random censoring times are generated using exponential distribution. dropout$rate specifies the drop-out probability per dropout$time time units. If dropout$rate is equal to 0, then no censoring is applied.

accrual

(list)
specifies accrual intensity. See addStaggeredEntry() for details.

Details

The output data set contains the following columns:

Value

This returns a data frame with one row per transition per individual.

Examples

getSimulatedData(
  N = 10,
  transition = exponential_transition(h01 = 1, h02 = 1.5, h12 = 1),
  dropout = list(rate = 0.3, time = 1),
  accrual = list(param = "time", value = 5)
)

[Package simIDM version 0.1.0 Index]