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 |
( |
transition |
( |
dropout |
( |
accrual |
( |
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.
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)
)