survextrap1.0.1 package

Bayesian Flexible Parametric Survival Modelling and Extrapolation

cumhaz

Estimates of cumulative hazard from a survextrap model

get_cum_backhaz

Cumulative background hazards

get_draws

Posterior draws from a survextrap model

hazard_ratio

Hazard ratio against time in a survextrap model

hazard

Estimates of hazard from a survextrap model

hrtime

Hazard ratio between high and low values of the hazard over time

irmst

Incremental restricted mean survival time

mean.survextrap

Mean survival time

mspline_basis

Evaluate an M-spline basis matrix at the specified times.

mspline_constant_coefs

Determine M-spline basis coefficients which give a constant function.

mspline_init

Create a default M-spline model structure

mspline_list_init

Validate an M-spline object supplied as a list, choosing defaults if n...

mspline_plotdata

Data for plotting an M-spline function, showing how it is built up fro...

mspline_plotsetup

Get basis for an illustration of an M-spline with given knots.

mspline_spec

Make default M-spline knot specification given a survival dataset.

msplinemodel_init

Create an M-spline survival model, both structure and parameters.

p_hr

Derive a normal prior for the log hazard ratio parameter based on a gu...

p_meansurv

Derive a normal prior for the log hazard scale parameter based on a gu...

plot_hazard_ratio

Plot hazard ratio against time from a survextrap model

plot_hazard

Plot hazard curves from a survextrap model

plot_mspline

Plot a M-spline function, showing how it is built up from its basis

plot_survival

Plot survival curves from a survextrap model

plot.survextrap

Plot method for survextrap model objects

print_priors

Print the priors used in a fitted survextrap model

print.survextrap

Print a fitted survextrap model

prior_haz_const

Summarises the prior for the constant hazard implied by a particular p...

prior_haz

Determine priors for time-varying hazards and hazard ratios

prior_hr

Summarises the prior for the hazard ratio implied by a particular prio...

prior_pred

Simulate a dataset from the prior predictive distribution of survival ...

prior_sample_hazard

Generate and/or plot a sample from the prior distribution of M-spline ...

prior_sample

Sample from the joint prior of parameters in a survextrap model

priors

Prior distributions and options

rmst

Restricted mean survival time

standardise_to

Constructor for a standardising population used for survextrap outputs

summary.survextrap

Posterior summary statistics for parameters of survextrap models

survextrap-package

The 'survextrap' package.

survextrap

Flexible Bayesian parametric survival models

survival

Estimates of survival from a survextrap model

Survmspline_wane

M-spline survival distribution under treatment effect waning

Survmspline

M-spline survival distribution

Survival analysis using a flexible Bayesian model for individual-level right-censored data, optionally combined with aggregate data on counts of survivors in different periods of time. An M-spline is used to describe the hazard function, with a prior on the coefficients that controls over-fitting. Proportional hazards or flexible non-proportional hazards models can be used to relate survival to predictors. Additive hazards (relative survival) models, waning treatment effects, and mixture cure models are also supported. Priors can be customised and calibrated to substantive beliefs. Posterior distributions are estimated using 'Stan', and outputs are arranged in a tidy format. See Jackson (2023) <doi:10.1186/s12874-023-02094-1>.

  • Maintainer: Christopher Jackson
  • License: GPL (>= 3)
  • Last published: 2026-01-13