View source: R/getSimulatedData.R
getSimulatedData | R Documentation |
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.
getSimulatedData(
N,
transition = exponential_transition(h01 = 1, h02 = 1, h12 = 1),
dropout = list(rate = 0, time = 12),
accrual = list(param = "time", value = 0)
)
N |
( |
transition |
( |
dropout |
( |
accrual |
( |
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.
This returns a data frame with one row per transition per individual.
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)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.