rstpm2

An R package for generalised survival models

https://github.com/mclements/rstpm2

Science Score: 36.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
  • Academic publication links
  • Committers with academic emails
    1 of 12 committers (8.3%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (10.4%) to scientific vocabulary

Keywords from Contributors

weighted
Last synced: 10 months ago · JSON representation

Repository

An R package for generalised survival models

Basic Info
  • Host: GitHub
  • Owner: mclements
  • Language: R
  • Default Branch: master
  • Homepage:
  • Size: 8.89 MB
Statistics
  • Stars: 27
  • Watchers: 7
  • Forks: 12
  • Open Issues: 5
  • Releases: 6
Created about 13 years ago · Last pushed 10 months ago
Metadata Files
Readme Changelog

README.md

rstpm2: An R package for link-based survival models

NOTE: versions 1.4.1 and 1.4.2 of rstpm2 included a critical bug in the predict function for type in "hr", "hdiff", "meanhr" or "marghr".

Introduction

This package provides link-based survival models that extend the Royston-Parmar models, a family of flexible parametric models. There are two main classes included in this package:

A. The class stpm2 is an R version of stpm2 in Stata with some extensions, including:

  1. Multiple links (log-log, -probit, -logit);

  2. Left truncation and right censoring (with experimental support for interval censoring);

  3. Relative survival;

  4. Cure models (where we introduce the nsx smoother, which extends the ns smoother);

  5. Predictions for survival, hazards, survival differences, hazard differences, mean survival, etc;

  6. Functional forms can be represented in regression splines or other parametric forms;

  7. The smoothers for time can use any transformation of time, including no transformation or log(time).

B. Another class pstpm2 is the implementation of the penalised models and corresponding penalized likelihood estimation methods. The main aim is to represent another way to deal with non-proportional hazards and adjust for potential continuous confounders in functional forms, not limited to proportional hazards and linear effect forms for all covariates. Functional forms can be represented in penalized regression splines (all mgcv smoothers ) or other parametric forms.

Some examples

The default for the parametric model is to use the Royston Parmar model, which uses a natural spline for the transformed baseline for log(time) with a log-log link.

require(rstpm2) data(brcancer) fit <- stpm2(Surv(rectime,censrec==1)~hormon,data=brcancer,df=3) plot(fit,newdata=data.frame(hormon=0),type="hazard")

(Hazard plot)

The default for the penalised model is similar, using a thin-plate spline for the transformed baseline for log(time) with a log-log link. The advantage of the penalised model is that there is no need to specify the knots or degrees of freedom for the baseline smoother.

fit <- pstpm2(Surv(rectime,censrec==1)~hormon,data=brcancer) plot(fit,newdata=data.frame(hormon=0),type="hazard")

(Hazard plot 2)

Owner

  • Login: mclements
  • Kind: user
  • Location: Stockholm
  • Company: Karolinska Institutet

GitHub Events

Total
  • Issues event: 6
  • Issue comment event: 5
  • Push event: 8
  • Pull request event: 2
Last Year
  • Issues event: 6
  • Issue comment event: 5
  • Push event: 8
  • Pull request event: 2

Committers

Last synced: about 1 year ago

All Time
  • Total Commits: 766
  • Total Committers: 12
  • Avg Commits per committer: 63.833
  • Development Distribution Score (DDS): 0.055
Past Year
  • Commits: 33
  • Committers: 2
  • Avg Commits per committer: 16.5
  • Development Distribution Score (DDS): 0.03
Top Committers
Name Email Commits
Mark Clements m****s@k****e 724
Xingrong Liu x****u@k****e 15
unknown l****n@D****e 7
Benjamin Christoffersen b****d@g****m 6
bakynkozhayev b****v@k****e 3
Lasse Hjort Jakobsen s****y@a****k 3
unknown l****n@D****e 2
Liu Xingrong l****n@m****e 2
Tomas Kalibera t****a@g****m 1
Dirk Eddelbuettel e****d@d****g 1
bakynkozhayev b****v@n****z 1
Mark Clements m****s@L****l 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 10 months ago

All Time
  • Total issues: 33
  • Total pull requests: 4
  • Average time to close issues: over 1 year
  • Average time to close pull requests: about 13 hours
  • Total issue authors: 18
  • Total pull request authors: 3
  • Average comments per issue: 2.12
  • Average comments per pull request: 1.25
  • Merged pull requests: 4
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 3
  • Pull requests: 1
  • Average time to close issues: N/A
  • Average time to close pull requests: 2 days
  • Issue authors: 2
  • Pull request authors: 1
  • Average comments per issue: 0.67
  • Average comments per pull request: 4.0
  • Merged pull requests: 1
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • alexploner (5)
  • ellessenne (4)
  • enochytchen (4)
  • aghaynes (3)
  • Luigi-Annic (2)
  • markdanese (2)
  • LasseHjort (2)
  • ghost (2)
  • entjos (2)
  • anddis (1)
  • mikesweeting (1)
  • NickSauve (1)
  • LivUllmann (1)
  • RobertReynolds1 (1)
  • MoserGitHub (1)
Pull Request Authors
  • boennecd (2)
  • kalibera (2)
  • eddelbuettel (1)
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 2
  • Total downloads:
    • cran 9,982 last-month
  • Total docker downloads: 43,526
  • Total dependent packages: 15
    (may contain duplicates)
  • Total dependent repositories: 11
    (may contain duplicates)
  • Total versions: 33
  • Total maintainers: 1
cran.r-project.org: rstpm2

Smooth Survival Models, Including Generalized Survival Models

  • Versions: 27
  • Dependent Packages: 14
  • Dependent Repositories: 11
  • Downloads: 9,982 Last month
  • Docker Downloads: 43,526
Rankings
Docker downloads count: 0.6%
Dependent packages count: 5.0%
Downloads: 6.1%
Average: 6.1%
Forks count: 6.3%
Dependent repos count: 8.8%
Stargazers count: 10.1%
Maintainers (1)
Last synced: 10 months ago
conda-forge.org: r-rstpm2
  • Versions: 6
  • Dependent Packages: 1
  • Dependent Repositories: 0
Rankings
Dependent packages count: 28.8%
Dependent repos count: 34.0%
Average: 37.3%
Forks count: 40.9%
Stargazers count: 45.3%
Last synced: 10 months ago

Dependencies

DESCRIPTION cran
  • R >= 3.0.2 depends
  • methods * depends
  • splines * depends
  • survival * depends
  • Rcpp >= 0.10.2 imports
  • bbmle >= 1.0.20 imports
  • deSolve * imports
  • fastGHQuad * imports
  • graphics * imports
  • mgcv * imports
  • parallel * imports
  • stats * imports
  • utils * imports
  • eha * suggests
  • flexsurv * suggests
  • ggplot2 * suggests
  • lattice * suggests
  • mstate * suggests
  • readstata13 * suggests
  • scales * suggests
  • survPen * suggests
  • testthat * suggests
  • timereg * suggests