compare.surv.mods | R Documentation |
Compares the piecewise exponential model with 6 other standard parameteric models (see fit_surv_models()
). Note that exponential is a special case of the piecewise exponential, however, it is refit in JAGS to highlight the difference in statistical fit.
This functions computes the individual log-likelihood for the piecewise exponential model (see get.loglik()
) and compares the Widely Applicable Information Criterion (using the loo::loo-package
) and Pseudo-Marginal Likelihood (PML) with the other standard parametric models.
compare.surv.mods(
object,
max_predict = 10,
chng.num = "all",
plot.best = 3,
n.iter.jags = 2000,
n.thin.jags = NULL,
n.burnin.jags = NULL,
gof = "WAIC",
inc_waic = TRUE,
km_risk = 0.1,
gmp_haz_df = NULL,
gpm_post_data = TRUE,
col_km = "black",
final_chng_only = FALSE
)
object |
of class "changepoint". |
max_predict |
maximum survival time to be predicted for the survival models. Default is 10, however, depending on the timescale this should be changed. |
A list of with the following items:
model.comp: A dataframe with the PML and WAIC for the piecewise exponential model and the six parametric models fitted by JAGS.
jags.models: A list containing the posterior simulations of the 6 JAGS models (fit using the R2jags:jags function).
plot_Surv_all: A ggplot with the posterior mean survival probabilities for the time specified by max_predict.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.