getDatasetWideFormat {simIDM} | R Documentation |
Conversion of a Data Set from One Row per Transition to One Row per Patient
Description
Conversion of a Data Set from One Row per Transition to One Row per Patient
Usage
getDatasetWideFormat(data)
Arguments
data |
( |
Details
The output data set contains the following columns:
id (
integer
): patient id.trt
integer
): treatment id.PFStime (
numeric
): event time of PFS event.CensoredPFS (
logical
): censoring indicator for PFS event.PFSevent (
logical
): event indicator for PFS event.OStime (
numeric
): event time of OS event.CensoredOS (
logical
): censoring indicator for OS event.OSevent (
logical
): event indicator for OS event.recruitTime (
numeric
): time of recruitment.OStimeCal (
numeric
): OS event time at calendar time scale.PFStimeCal (
numeric
): PFS event time at calendar time scale.
Value
This function returns a data set with one row per patient and endpoints PFS and OS.
Examples
transition1 <- exponential_transition(h01 = 1.2, h02 = 1.5, h12 = 1.6)
transition2 <- exponential_transition(h01 = 1, h02 = 1.3, h12 = 1.7)
transition3 <- exponential_transition(h01 = 1.1, h02 = 1, h12 = 1.5)
simData <- getOneClinicalTrial(
nPat = c(30, 20, 30), transitionByArm = list(transition1, transition2, transition3),
dropout = list(rate = 0, time = 12),
accrual = list(param = "time", value = 0)
)
getDatasetWideFormat(simData)