survextrap
Survival Extrapolation With a Flexible Parametric Model and External Data
Science Score: 49.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 2 DOI reference(s) in README -
✓Academic publication links
Links to: arxiv.org -
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (7.8%) to scientific vocabulary
Repository
Survival Extrapolation With a Flexible Parametric Model and External Data
Basic Info
- Host: GitHub
- Owner: chjackson
- License: gpl-3.0
- Language: R
- Default Branch: master
- Homepage: https://chjackson.github.io/survextrap/
- Size: 43 MB
Statistics
- Stars: 12
- Watchers: 3
- Forks: 5
- Open Issues: 3
- Releases: 4
Metadata Files
README.md
survextrap
survextrap is an R package for parametric survival modelling with either or both of:
- A standard individual-level, right-censored survival dataset, e.g.
| Survival time | Death | Predictors... |
|---|---|---|
| 2 years | Yes | |
| 5 years | No | |
| etc... |
- (optionally) "External" data sources in the following aggregate "count" form:
| Follow-up period | Number | Predictors... | ||
|---|---|---|---|---|
| Start time $t$ | End time $u$ | Alive at $t$ | Still alive at $u$ | |
| $t_{1}$ | $u_{1}$ | $n_{1}$ | $r_{1}$ | |
| $t_{2}$ | $u_{2}$ | $n_{2}$ | $r_{2}$ | |
| etc... | ||||
Any number of rows can be supplied for the "external" data, and the time intervals do not have to be distinct or exhaustive.
Many forms of external data that might be useful for survival extrapolation (such as population data, registry data or elicited judgements) can be manipulated into this common "count" form.
Principles
Extrapolations from short-term individual level data should be done using explicit data or judgements about how risk will change over time.
Extrapolations should not rely on standard parametric forms (e.g. Weibull, log-normal, gamma...) that are only used out of convention and do not have interpretations as plausible mechanisms for how risk will change over time.
Instead of selecting (or averaging) traditional parametric models, an arbitrarily flexible parametric model should be used, that adapts to give the optimal fit to the short-term and long-term data in combination.
How it works
Bayesian multiparameter evidence synthesis is used to jointly model all sources of data and judgements.
An M-spline is used to represent how the hazard changes through time (as in rstanarm). The Bayesian fitting method automatically chooses the optimal level of smoothness and flexibility. Spline "knots" should span the period covered by the data, and any future period where there is a chance that the hazard may vary. Then if there is no data in the future period, the uncertainty will be acknowledged and the predicted hazards will have wide credible intervals.
A proportional hazards model or a flexible non-proportional hazards model can be used to describe the relation of survival to predictors.
Mixture cure, relative survival and treatment effect waning models are supported.
It has an R interface, designed to be friendly to those familiar with standard R modelling functions.
Stan is used under the surface to do MCMC (Hamiltonian Monte Carlo) sampling from the posterior distribution, in a similar fashion to rstanarm and survHE.
Estimates and posterior summaries and samples for outputs, such as survival, hazard and (restricted) mean survival, can easily be extracted.
Technical details of the methods
The model is fully described in a paper: Jackson, BMC Medical Research Methodology (2023). See also vignette("methods").
vignette("priors") goes into detail on how prior distributions and judgements can be specified in survextrap - an important but often-neglected part of Bayesian analysis.
Evaluation of the methods
Two papers by Timmins et al. describe simulation studies that show good performance of the methods for (a) short-term estimation from individual-level data and (b) extrapolation including external data.
Examples of how to use it
vignette("examples") gives a rapid tour of each feature, using simple textbook examples and simulated data.
The cetuximab case study is a more in-depth demonstration of how survextrap could be used in a typical health technology evaluation, based on clinical trial, disease registry, general population and elicited data. This vignette accompanies Section 4 of the preprint paper.
Slides from presentations about survextrap
Installation
The package can be installed in the usual way from CRAN, as:
install.packages("survextrap")
The latest development version on Github can be installed as
remotes::install_github("chjackson/survextrap")
or more easily as (but a day behind the code on Github)
install.packages("survextrap", repos=c('https://chjackson.r-universe.dev',
'https://cloud.r-project.org'))
Please give feedback and suggestions if you use it. These can be posted on github issues, or email.
Owner
- Name: Chris Jackson
- Login: chjackson
- Kind: user
- Website: http://twitter.com/cjackstats
- Repositories: 22
- Profile: https://github.com/chjackson
Statistician and programmer
GitHub Events
Total
- Issues event: 5
- Watch event: 5
- Issue comment event: 14
- Push event: 11
- Fork event: 2
Last Year
- Issues event: 5
- Watch event: 5
- Issue comment event: 14
- Push event: 11
- Fork event: 2
Issues and Pull Requests
Last synced: 10 months ago
All Time
- Total issues: 1
- Total pull requests: 0
- Average time to close issues: 2 months
- Average time to close pull requests: N/A
- Total issue authors: 1
- Total pull request authors: 0
- Average comments per issue: 10.0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 1
- Pull requests: 0
- Average time to close issues: 2 months
- Average time to close pull requests: N/A
- Issue authors: 1
- Pull request authors: 0
- Average comments per issue: 10.0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- irtimmins (3)
- mikesweeting (1)
Pull Request Authors
- mikesweeting (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- cran 559 last-month
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 1
- Total maintainers: 1
cran.r-project.org: survextrap
Bayesian Flexible Parametric Survival Modelling and Extrapolation
- Homepage: https://github.com/chjackson/survextrap
- Documentation: http://cran.r-project.org/web/packages/survextrap/survextrap.pdf
- License: GPL (≥ 3)
-
Latest release: 1.0
published about 1 year ago
Rankings
Maintainers (1)
Dependencies
- R >= 3.5.0 depends
- survival * depends
- Rcpp >= 0.12.0 imports
- dplyr * imports
- ggplot2 * imports
- gridExtra * imports
- loo * imports
- magrittr * imports
- methods * imports
- posterior * imports
- rstan >= 2.18.1 imports
- rstpm2 * imports
- splines2 * imports
- survminer * imports
- tidybayes * imports
- tidyr * imports
- SHELF * suggests
- flexsurvcure * suggests
- knitr * suggests
- rmarkdown * suggests
- rstantools >= 2.2.0 suggests
- testthat * suggests
- actions/checkout v2 composite
- r-lib/actions/check-r-package v2 composite
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-r-dependencies v2 composite
- JamesIves/github-pages-deploy-action 4.1.4 composite
- actions/checkout v2 composite
- r-lib/actions/setup-pandoc v2 composite
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-r-dependencies v2 composite
- actions/checkout v2 composite
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-r-dependencies v2 composite