getSimulatedData: 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)
)
Value
This returns a data frame with one row per transition per individual.
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:
id (integer): patient id.
from (numeric): starting state of the transition.
to (character): final state of the transition.
entry (numeric): entry time of the transition on the individual time scale.
exit (numeric): exit time of the transition on the individual time scale.
entryAct (numeric): entry time of the transition on study time scale.
exitAct (numeric): exit time of the transition on study time scale.
censAct (numeric): censoring time of the individual on study time scale.