The 'bmstate' package.
bmstate-package.RdBayesian multistate modeling of right-censored time-to-event data.
Transition matrix
For any analysis with this package, you will need a TransitionMatrix
which specifies the states and possible transitions between them.
This can be created directly with
TransitionMatrix$new() or using built-in functions for common
multistate systems such as transmat_illnessdeath.
Data format
See the function df_to_pathdata for how to create a
PathData object from your data frame and a given
TransitionMatrix.
Creating a model
You can create a model using
create_msm.
A model is represented by a MultistateModel
object, which has a MultistateSystem, which has a
TransitionMatrix.
Fitting a model
You can fit a model with 'Stan' using fit_stan.
Prediction with a fitted model
For predicting state visit risks over a time period using state path simulation, see the functions
generate_paths,p_state_visit, andp_state_visit_per_subject.For analytically solving state occupancy probabilities after some time, see
p_state_occupancy.