| summary.survextrap | R Documentation |
Posterior summary statistics for parameters of
survextrap models. The summary statistics presented by default
include the posterior median and 95% credible intervals,
alongside the Rhat convergence diagnostic and the bulk effective
sample size (as computed by the posterior package). For
models fitted by optimisation rather than MCMC, the posterior
mode is always returned.
Any other posterior summary can be computed if the appropriate
function to compute it is supplied in summ_fns.
## S3 method for class 'survextrap'
summary(object, summ_fns = NULL, ...)
object |
A fitted model object as returned by |
summ_fns |
A list of functions to calculate different posterior summaries
from the MCMC sample. This is passed to See the examples below for different ways this can be used. Defaults to Many useful such functions are provided with the |
... |
Summary functions can also be supplied in separate
arguments here. They will then be added to those supplied in
|
A data frame (actually a tibble) of summary
statistics for the model parameters.
The parameters, as indicated in the variable column, are:
alpha: Baseline log hazard scale. If there are covariates, this
describes the log hazard scale with continuous covariates set to
zero, and factor covariates set to their baseline levels. Note
that this is not the log hazard, which also depends on the spline
coefficients and basis. See hazard to extract the
actual hazard.
coefs: Coefficients of the M-spline basis terms. If a
non-proportional hazards model was fitted, these are with
covariates set to zero or baseline levels.
loghr: Log hazard ratios for each covariate in the model. For
cure models, this refers to covariates on survival for uncured
people. For non-proportional hazards models, these are the
multiplicative effects of covariates on the hazard scale
parameter. See the methods vignette
for a full description of this model.
hr: Hazard ratios (the exponentials of loghr).
pcure: Probability of cure (for cure models only). If there are
covariates on cure, this parameter describes the probability of
cure with continuous covariates set to zero, and factor covariates
set to their baseline levels.
logor_cure: Log odds ratio of cure for each covariate on cure.
or_cure: Odds ratios of cure (the exponentials of logor_cure).
nperr: Standardised departures from proportional hazards in the
non-proportional hazards model, defined as b^{(np)}_{ks} /
\sigma^{(np)}_s (see the methods vignette
for definitions of these).
hrsd: Smoothness standard deviations \tau_s for the
non-proportionality effects.
mod <- survextrap(Surv(years, status) ~ rx, data=colons, fit_method="opt")
summary(mod)
summary(mod, mean=mean)
summary(mod, list(mean=mean))
summary(mod, list(mean=mean, ess_tail=posterior::ess_tail))
summary(mod, mean=mean, ess_tail=posterior::ess_tail)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.