Package: survextrap 0.8.15

survextrap: Survival Extrapolation with a Flexible Parametric Model and External Data

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 hierarchical prior on the coefficients to control overfitting. Proportional hazards or flexible non-proportional hazards models can be used to relate survival to predictors. Mixture cure models, additive hazards (relative survival) models and waning treatment effects 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 See Jackson (2023) <doi:10.48550/arXiv.2306.03957>.

Authors:Christopher Jackson [aut, cre, cph], Iain Timmins [ctb]

survextrap_0.8.15.tar.gz
survextrap_0.8.15.zip(r-4.5)survextrap_0.8.15.zip(r-4.4)survextrap_0.8.15.zip(r-4.3)
survextrap_0.8.15.tgz(r-4.4-x86_64)survextrap_0.8.15.tgz(r-4.4-arm64)survextrap_0.8.15.tgz(r-4.3-x86_64)survextrap_0.8.15.tgz(r-4.3-arm64)
survextrap_0.8.15.tar.gz(r-4.5-noble)survextrap_0.8.15.tar.gz(r-4.4-noble)
survextrap.pdf |survextrap.html
survextrap/json (API)
NEWS

# Install 'survextrap' in R:
install.packages('survextrap', repos = c('https://chjackson.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/chjackson/survextrap/issues

Uses libs:
  • c++– GNU Standard C++ Library v3
Datasets:
  • cetux - Datasets for evaluation of cetuximab in head and neck cancer
  • cetux_bh - Datasets for evaluation of cetuximab in head and neck cancer
  • cetux_seer - Datasets for evaluation of cetuximab in head and neck cancer
  • colons - Colon cancer survival data
  • curedata - Simulated data for testing mixture cure models

On CRAN:

53 exports 7 stars 1.95 score 60 dependencies 10 scripts

Last updated 3 months agofrom:ca68e6a3be. Checks:OK: 1 NOTE: 8. Indexed: yes.

TargetResultDate
Doc / VignettesOKAug 30 2024
R-4.5-win-x86_64NOTEAug 30 2024
R-4.5-linux-x86_64NOTEAug 30 2024
R-4.4-win-x86_64NOTEAug 30 2024
R-4.4-mac-x86_64NOTEAug 30 2024
R-4.4-mac-aarch64NOTEAug 30 2024
R-4.3-win-x86_64NOTEAug 30 2024
R-4.3-mac-x86_64NOTEAug 30 2024
R-4.3-mac-aarch64NOTEAug 30 2024

Exports:cumhazdsurvmsplinedsurvmspline_waneget_drawshazardhazard_ratiohrtimehsurvmsplineHsurvmsplinehsurvmspline_waneHsurvmspline_waneirmstmean_survmsplinemean_survmspline_wanemspline_basismspline_constant_coefsmspline_initmspline_list_initmspline_plotdatamspline_plotsetupmspline_specmsplinemodel_initp_betap_gammap_hrp_meansurvp_normalp_tplot_hazardplot_hazard_ratioplot_msplineplot_prior_hazardplot_survivalprint_priorsprior_haz_constprior_haz_sdprior_hrprior_hr_sdprior_predprior_sample_hazardpsurvmsplinepsurvmspline_waneqsurvmsplineqsurvmspline_wanermstrmst_survmsplinermst_survmspline_wanersurvmsplinersurvmspline_wanestandardise_tostandardize_tosurvextrapsurvival

Dependencies:abindbackportsbbmlebdsmatrixBHcallrcheckmateclicolorspacedescdistributionalfansifarverfastGHQuadgenericsggplot2gluegridExtragtableinlineisobandlabelinglatticelifecycleloomagrittrMASSMatrixmatrixStatsmgcvmunsellmvtnormnlmenumDerivpillarpkgbuildpkgconfigposteriorprocessxpsQuickJSRR6RColorBrewerRcppRcppArmadilloRcppEigenRcppParallelrlangrstanrstpm2scalessplines2StanHeaderssurvivaltensorAtibbleutf8vctrsviridisLitewithr

Details of methods behind survextrap

Rendered frommethods.Rmdusingknitr::rmarkdownon Aug 30 2024.

Last update: 2024-07-01
Started: 2022-06-30

Examples of using survextrap

Rendered fromexamples.Rmdusingknitr::rmarkdownon Aug 30 2024.

Last update: 2023-12-28
Started: 2022-06-30

Priors in survextrap models

Rendered frompriors.Rmdusingknitr::rmarkdownon Aug 30 2024.

Last update: 2023-10-24
Started: 2023-03-30

Readme and manuals

Help Manual

Help pageTopics
The 'survextrap' package.survextrap-package
Datasets for evaluation of cetuximab in head and neck cancercetux cetux_bh cetux_seer
Colon cancer survival datacolons
Estimates of cumulative hazard from a survextrap modelcumhaz
Simulated data for testing mixture cure modelscuredata
Posterior draws from a survextrap modelget_draws
Estimates of hazard from a 'survextrap' modelhazard
Hazard ratio against time in a survextrap modelhazard_ratio
Hazard ratio between high and low values of the hazard over timehrtime
Incremental restricted mean survival timeirmst
Mean survival timemean.survextrap
Evaluate an M-spline basis matrix at the specified times.mspline_basis
Determine M-spline basis coefficients which give a constant function.mspline_constant_coefs
Create a default M-spline model structuremspline_init
Validate an M-spline object supplied as a list, choosing defaults if needed.mspline_list_init
Data for plotting an M-spline function, showing how it is built up from its basismspline_plotdata
Get basis for an illustration of an M-spline with given knots.mspline_plotsetup
Make default M-spline knot specification given a survival dataset.mspline_spec
Create an M-spline survival model, both structure and parameters.msplinemodel_init
Derive a normal prior for the log hazard ratio parameter based on a guess at the hazard ratiop_hr
Derive a normal prior for the log hazard scale parameter based on a guess at survival timesp_meansurv
Plot hazard curves from a survextrap modelplot_hazard
Plot hazard ratio against time from a survextrap modelplot_hazard_ratio
Plot a M-spline function, showing how it is built up from its basisplot_mspline
Plot survival curves from a survextrap modelplot_survival
Plot method for survextrap model objectsplot.survextrap
Print the priors used in a fitted survextrap modelprint_priors
Print a fitted survextrap modelprint.survextrap
Determine priors for time-varying hazards and hazard ratiosprior_haz prior_haz_sd prior_hr_sd
Summarises the prior for the constant hazard implied by a particular prior on the hazard scale parameter and spline specification.prior_haz_const
Summarises the prior for the hazard ratio implied by a particular prior on the log hazard ratioprior_hr
Simulate a dataset from the prior predictive distribution of survival times in an M-spline survival model.prior_pred
Sample from the joint prior of parameters in a survextrap modelprior_sample
Generate and/or plot a sample from the prior distribution of M-spline hazard curvesplot_prior_hazard prior_sample_hazard
Prior distributions and optionspriors p_beta p_gamma p_normal p_t
Restricted mean survival timermst
Constructor for a standardising population used for survextrap outputsstandardise_to standardize_to
Posterior summary statistics for parameters of survextrap modelssummary.survextrap
Flexible Bayesian parametric survival modelssurvextrap
Estimates of survival from a 'survextrap' modelsurvival
M-spline survival distributiondsurvmspline Hsurvmspline hsurvmspline mean_survmspline psurvmspline qsurvmspline rmst_survmspline rsurvmspline Survmspline
M-spline survival distribution under treatment effect waningdsurvmspline_wane Hsurvmspline_wane hsurvmspline_wane mean_survmspline_wane psurvmspline_wane qsurvmspline_wane rmst_survmspline_wane rsurvmspline_wane Survmspline_wane