Description Usage Arguments Value
View source: R/sim_state_occupancy.R
Simulate state occupancy of new patients for a given number of days.
1 | sim_state_occupancy(fit, trans, newdata, nday)
|
fit |
multi-state model (or list of models, one per possible transition) estimated with flexsurv::flexsurvreg |
trans |
matrix describing the possible transitions |
newdata |
dataframe containing the covariates of the new patients (one row per new patient) |
nday |
number of days to simulate |
a matrix containing the number of patients per state (rows) and per day (cols)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.