| simulate.flexsurvreg {flexsurv} | R Documentation |
Simulate datasets from a fitted flexsurvreg model
## S3 method for class 'flexsurvreg' simulate( object, nsim = 1, seed = NULL, censtime = NULL, vectorised = TRUE, ... )
object |
Object returned by flexsurvreg |
nsim |
Number of datasets to simulate |
seed |
Random number seed. This is returned with the result of this
function as described in |
censtime |
Right-censoring time, or vector of right-censoring times of the same size as the data used to fit the model. |
vectorised |
Set to |
... |
Currently unused. |
A data frame with nsim pairs of columns named
"sim_1","event_1" and so on, containing the simulated event or
censoring times, and an indicator for whether the event was observed.