View source: R/getSimulatedData.R
addStaggeredEntry | R Documentation |
This function adds staggered study entry times to a simulated data set with illness-death model structure.
addStaggeredEntry(simData, N, accrualParam, accrualValue)
simData |
( |
N |
( |
accrualParam |
( |
accrualValue |
( |
This returns a data set containing a single simulated study containing accrual times,
i.e. staggered study entry.
This is a helper function of getSimulatedData()
.
simData <- data.frame(
id = c(1, 1, 2, 3), from = c(0, 1, 0, 0), to = c(1, 2, "cens", 2),
entry = c(0, 3, 0, 0),
exit = c(3, 5.3, 5.6, 7.2), censTime = c(6.8, 6.8, 5.6, 9.4)
)
addStaggeredEntry(simData, 3, accrualParam = "time", accrualValue = 5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.