View source: R/getSimulatedData.R
getOneToTwoRows | R Documentation |
This function creates transition entry and exit times from the intermediate state to the absorbing state for an existing data frame containing the exit times out of the initial state.
getOneToTwoRows(simDataOne, transition)
simDataOne |
( |
transition |
( |
This returns a data frame with one row per patient for the second transition,
i.e. the transition out of the intermediate
state. This is a helper function of getSimulatedData()
.
simDataOne <- data.frame(
id = c(1:3), to = c(1, 1, 1), from = c(0, 0, 0), entry = c(0, 0, 0),
exit = c(3, 5.6, 7.2), censTime = c(6.8, 5.9, 9.4)
)
transition <- exponential_transition(1, 1.6, 0.3)
getOneToTwoRows(simDataOne, transition)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.