getOneToTwoRows {simIDM} | R Documentation |
Transitions from the Intermediate State to the Absorbing State
Description
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.
Usage
getOneToTwoRows(simDataOne, transition)
Arguments
simDataOne |
( |
transition |
( |
Value
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()
.
Examples
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)
[Package simIDM version 0.1.0 Index]