View source: R/estimateParams.R
prepareData | R Documentation |
Preparation of a Data Set to Compute Log-likelihood
prepareData(data)
data |
( |
The output data set contains the following columns:
id (integer
): patient id.
from (integer
): start event state.
to (integer
): end event state.
trans (integer
): transition (1, 2 or 3) identifier
1
: Transition from state 0 (stable) to 1 (progression).
2
: Transition from state 0 (stable) to 2 (death).
3
: Transition from state 1 (progression) to 2 (death).
entry (numeric
): time at which the patient begins to be at risk for the transition.
exit (numeric
): time at which the patient ends to be at risk for the transition.
status (logical
): event indicator for the transition.
This function returns a data set with one row per patient and transition, when the patient is at risk.
transition <- exponential_transition(h01 = 1.2, h02 = 1.5, h12 = 1.6)
simData <- getOneClinicalTrial(
nPat = c(30), transitionByArm = list(transition),
dropout = list(rate = 0.8, time = 12),
accrual = list(param = "time", value = 1)
)
prepareData(simData)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.