Skip to contents

Model Fitting

Functions for compiling and fitting Bayesian mixture cure models.

bmcm_stan()
bmcm_stan
precompile_bmcm_model()
Precompile bmcm model

Visualization

Functions to create visual outputs of the fitted models.

plot_S_joint()
Plot survival curves for joint model and all treatments
cf_forest_plot()
Cure fraction forest plot using Stan output
cf_forest_cutpoint()
Cure fraction forest plot using cut-point Stan output
geom_kaplan_meier()
Geom for Kaplan-Meier ggplot
grid_arrange_shared_legend()
Use single legend for grid of plots

Data Preparation & Helpers

Internal and helper functions used to manipulate and prepare data.

prep_S_joint_data()
Prepare data for survival plot
prep_S_joint_data(<bmcm>)
Prepare data for survival plot
prep_S_joint_data(<default>)
already extracted matrix
prep_latent_data()
Prepare Stan data in latent model
prep_S_data()
Prepare posterior survival data for plotting
prep_bg_data()
Prepare background data
default_prior_latent()
Default prior latent variable
create_stancode()
Create Stan code from component parts