View source: R/illustrative-analysis-helpers.R
make_mstate_refpat | R Documentation |
Utility function which allows to prepare one row of data.frame
to be fed into mstate::msfit
for prediction.
make_mstate_refpat(refpat, tmat, covs)
refpat |
A single-row data.frane containing the covariate values to predict |
tmat |
Transition matrix |
covs |
Covariates used in the cause-specific Cox models |
tmat <- mstate::trans.comprisk(2, c("REL", "NRM")) covs <- c("age_allo1_decades", "mdsclass") ref_pat <- dat_mds_synth[1, ] ref_pat[] make_mstate_refpat(ref_pat, tmat, covs)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.