powered by
Create a data table of health state transitions from a transition matrix describing the states and transitions in a multi-state model suitable for use with hesim_data.
hesim_data
create_trans_dt(trans_mat)
Returns a data.table::data.table in tidy format with three columns:
data.table::data.table
Health state transition ID.
The starting health state.
The health state that will be transitions to.
A transition matrix in the format from the mstate package. See IndivCtstmTrans.
mstate
IndivCtstmTrans
tmat <- rbind(c(NA, 1, 2), c(NA, NA, 3), c(NA, NA, NA)) create_trans_dt(tmat)
Run the code above in your browser using DataLab