The goal of rstanbmcm is to jointly model two event time distributions (e.g. time to disease progression and time to death) within a Bayesian relative survival mixture cure model framework, using the Stan engine called from R.
You can install the development version from GitHub with:
# install.packages("devtools") devtools::install_github("StatisticsHealthEconomics/rstanbmcm")
Mixture cure models are increasingly popular in health problems and in particular in oncology. A Bayesian paradigm allows the explicitly incorporation of uncertainties and principled synthesis of prior knowledge such as via expert elicitation or previous trials. By extending current methods to account for the dependence between event times we leverage additional information to make better inferences and decisions.
data/surv_input_data.RData
: Individual-level patient data. This is cleaned data from the previous frequentist n8thangreen/mixture_cure_model
package. The fields are:
OSage
: age at OS eventPFSage
: age at PFS eventos
: time of OSos_event
: censoring indicatorpfs
: time of PFSpfs_event
: censoring indicatorTRTA
: treatment nameSEX
: male or femaleCOUNTRY
: abbreviatedACOUNTRY
: full namePFS_rate
: background mortality at time of PFS event from life tablesOS_rate
: background mortality at time of OS event from life tablesThe Stan engine can be called either with the compile C code or with the Stan script without precompiling.
inst/stan
and the compiled code in src/
scripts/
There are two runner scripts:
scripts/stan_checkmate.R
: Run Stan mixture cure model with separate model for PFS and OS data.scripts/stan_checkmate_joint.R
: Run Stan mixture cure model with joint model for PFS and OS data.Because the Stan output files are large, we do not save a single list of all model outputs as a single objects. Instead stan_filenames.RData
is a list of file names of the model outputs and each output is saved in a separate file. The file name formats are:
stan_<distn>_<event type>_<treatment name>.Rds
stan_<distn>_<distn>_<treatment name>.Rds
Please note that this project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.