Closed sdaza closed 3 years ago
Hi and apologies for the delayed response.
The package cannot currently do this because it does not simulate right censored data. If you did not care about the status
column, then you could fit a parametric multi-state model with flexsurv
and then simulate it as in the multi-state modeling vignette ignoring the costs and QALYs part.
If you need the status indicator, I believe you could estimate time to right censoring for each transition (e.g., with flexsurv
). You would then use these distributions to simulate time to right censoring for each transition. A patient would be censored (i.e., status = 0
) if the right censoring time was less than the actual time to the next state. The observed time
would be the minimum of the right censoring time and the "latent" time simulated with hesim
.
An alternative option is to try mstate::mssample()
which looks like it has a cens
argument.
As an additional follow-up, this can be implemented in hesim
fairly easily with minor extensions to the existing functionality. I've done so in a 3-state case. I'm going to close this issue and open a new issue requesting this as a feature enhancement.
Hello,
Thanks for your nice package.
I wonder if there anyway to recreate individual simulated data with states and time info. Example: