Simulatorยค
PyMSM can be used as a simulator\sampler for saved models
See COVID hospitalization example
We can save a model for later use, and then configure a simulator to generate simulated paths
from pymsm.simulation import MultiStateSimulator
mssim = MultiStateSimulator(
competing_risks_models_list,
terminal_states=[5, 6],
update_covariates_fn=covid_update_covariates_function,
covariate_names=covariate_cols,
)
And now we can sample paths from this simulator