CRAN Task View: Survival Analysis
|Maintainer:||Arthur Allignol and Aurelien Latouche|
|Contact:||arthur.allignol at fdm.uni-freiburg.de|
Survival analysis, also called event history analysis in social science,
or reliability analysis in engineering, deals with time until occurrence
of an event of interest. However, this failure time may not be observed
within the relevant time period, producing so-called censored observations.
This task view aims at presenting the useful R packages for the analysis
of time to event data.
Please let the
something is inaccurate or missing.
Standard Survival Analysis
Estimation of the Survival Distribution
function from the
computes the Kaplan-Meier estimator for truncated and/or censored data.
(replacement of the Design package)
proposes a modified version of the
package implements a fast algorithm and some features
not included in
Various confidence intervals and confidence bands for the Kaplan-Meier estimator
are implemented in the
the Kaplan-Meier estimator.
provides a weighted
survival curve for each level of categorical variables with
computes the Kaplan-Meier estimator from
histogram data. The
plots the survival function using a
variant of the Kaplan-Meier estimator in a hospitalisation risk
presmoothed estimates of the main quantities used for
right-censored data, i.e., survival, hazard and density functions.
package permits to compute the Kaplan-Meier
estimator following Pollock et al. (1998). The
package provides several functions for computing confidence
intervals of the survival distribution (e.g., beta product
confidence procedure). The
implements the modified jackknife estimator of the Kaplan-Meier
package offers various
length-bias corrections to survival curve estimation.
Nonparametric maximum likelihood estimation (NPMLE):
package provides several ways to compute the NPMLE
of the survival distribution for various censoring and truncation
can also be used to compute the MLE for interval-censored data.
permits to compute the NPMLE of the cumulative distribution
function for left- and right-censored data.
function in package
computes the NPMLE
for interval-censored data.
implements several algorithms permitting to analyse possibly doubly
truncated survival data.
package permits to fit an univariate
distribution by maximum likelihood. Data can be interval censored.
to estimate the hazard function through kernel methods for right-censored data.
the instantaneous hazard from the Kaplan-Meier estimator.
to estimate the hazard function using splines.
package aims at estimating the hazard function for interval
compares survival curves using the Fleming-Harrington G-rho family of test.
implements a permutation version of the
logrank test and a version of the logrank that adjusts for
implements the shift-algorithm by Streitberg and Roehmel for
computing exact conditional p-values and quantiles, possibly for censored data.
the logrank test reformulated as a linear rank test.
package performs tests using maximally selected
package implements logrank and Wilcoxon type tests
for interval-censored data.
Three generalised logrank tests and a score test for interval-censored data
are implemented in the
compares 2 hazard ratios.
implements a two stage procedure for comparing
package proposes to test the equality of
two survival distributions based on the Gini index.
package implements statistical tests to
compare two survival curves with recurrent events.
package offers several tests based on the
Fleming-Harrington class for comparing surival curves with right-
and interval-censored data.
package fits the Cox model.
package propose some extensions to the
function. The package
implements the Firth's penalised maximum likelihood bias reduction
method for the Cox model. An implementation of weighted
estimation in Cox regression can be found in
package proposes a robust implementation
of the Cox model.
fits Cox models
with possibly time-varying effects. The
permits to fit Cox models with multiple fractional polynomial.
fits Cox models for covariates with
A Cox model model can be fitted to data from
complex survey design using the
package implements the
Cox model for interval-censored data using the ICM-algorithm.
time-varying coefficient models for interval censored and right
censored survival data using a Bayesian Cox model, a spline based
Cox model or a transformation model. The
package computes the Cox proportional hazards model with shape
constrained hazard functions. The
implements the Cox model using an active set algorithm for dummy
variables of ordered factors.
computes goodness-of-fit methods for
the Cox proportional hazards model. The proportionality
assumption can be checked using the
package calculates concordance
probability estimate for the Cox model, as does
in the latter package draws a
quantile curve of the survival distribution as a function of
package computes simultaneous
tests and confidence intervals for the Cox model and other
parametric survival models. The
Bioconductor proposes a resampling based multiple hypothesis
testing that can be applied to the Cox model. Testing
coefficients of Cox regression models using a Wald test with a
sandwich estimator of variance can be done using
permits to plot visualisation of the relative importance of
covariates in a proportional hazards model.
Parametric Proportional Hazards Model:
survival) fits a parametric
proportional hazards model. The
packages implement a proportional hazards
model with a parametric baseline hazard. The
translates an AFT model to a proportional
hazards form. The
function that fits a hazard regression
model, using splines to model the baseline hazard. Hazards can be,
but not necessarily, proportional. The
implements the model of Royston and Parmar (2002). The model uses
natural cubic splines for the baseline survival function, and
proportional hazards, proportional odds or probit functions for
Accelerated Failure Time (AFT) Models:
function in package
can fit an accelerated failure time model.
A modified version of
is implemented in the
function). It permits to use some of the
package also proposes an implementation of the AFT model
An AFT model with an error distribution assumed to be a mixture of G-splines
is implemented in the
A least-square principled implementation of the AFT model can be found in the
package implements the Simulation-Extrapolation algorithm for the
AFT model, that can be used when covariates are subject to measurement error.
A robust version of the accelerated failure time model can be found in
fit the additive hazards model of Aalen in
also proposes an implementation
of the Cox-Aalen model (that can also be used to perform the Lin, Wei and
Ying (1994) goodness-of-fit for Cox regression models) and the
partly parametric additive risk model of McKeague and Sasieni.
Buckley-James model, though the latter does it without
an intercept term.
can fit other types
of models depending on the chosen distribution,
a tobit model.
package provides the
which is a wrapper of
to fit the tobit model.
An implementation of the tobit model for cross-sectional data and panel data
can be found in the
package provides implementation of
the proportional odds model and of the proportional excess hazards
package computes the pseudo-observation for
modelling the survival function based on the Kaplan-Meier estimator
and the restricted mean.
fits parametric time-to-event models, in which
any parametric distribution can be used to model the survival
probability, and where one of the parameters is a linear function
of covariates. The
provides a multiplicative relative risk and
an additive excess risk model for interval-censored data.
package can fit vector generalised linear and
additive models for censored data. The
package implements the generalised additive model for location,
scale and shape that can be fitted to censored data.
produces local regression estimates. The
function included in the
package implements a
conditional quantile regression model for censored data.
package fits shared parameter models for the
joint modelling of a longitudinal response and event times. The
temporal process regression model is implemented in
package. Aster models, which combine aspects
of generalized linear models and Cox models, are implemented in
package implements conditional logistic
regression for survival data as an alternative to the Cox model
when hazards are non-proportional.
extension of the
package, fits latent variable models
for censored outcomes via a probit link formulation.
General Multistate Models:
function from package
can be fitted for any
transition of a multistate model. It can also be used for
comparing two transition hazards, using correspondence between
multistate models and time-dependent covariates. Besides, all the
regression methods presented above can be used for multistate
models as long as they allow for left-truncation.
package provides convenient functions for
estimating and plotting the cumulative transition hazards in any
multistate model, possibly subject to right-censoring and
permits to estimate and
plot the transition probabilities for any multistate model. It
also estimates the change of length of hospital stay. The
package estimates and plots transition
probabilities for any multistate models. It can also estimate the
variance of the Aalen-Johansen estimator, and handles
left-truncated data. It also implements the technique for
estimating the length of hospital stay included in
in the presence of left-truncation. The
package provides nonparametric estimation for
multistate models subject to right-censoring (possibly
state-dependent) and left-truncation. The
package permits to estimate hazards and probabilities, possibly
depending on covariates, and to obtain prediction probabilities in
the context of competing risks and multistate models. The
package contains functions for fitting general
continuous-time Markov and hidden Markov multistate models to
longitudinal data. Transition rates and output processes can be
modelled in terms of covariates.
Nonparametric estimates in illness-death models and other three
state models can be obtained with package
package permits to
estimate transition probabilities of an illness-death model or
three-state progressive model. The
fits illness-death model with possibly interval-censored data for
the transition time into the transient state. Weibull baseline
intensities or a semi-parametric approach with M-splines
approximation of baseline intensities is used.
Lexis objects as a way to represent, manipulate and summarise data
from multistate models. The
intended for analysing state or event sequences that describe life
package permits to describe and
analyse life histories following a multistate perspective on the
expected numbers of individuals in specified age classes or life
stages given survivorship probabilities from a transition matrix.
estimates the cumulative
incidence functions, but they can be compared in more than two samples.
The package also implements the Fine and Gray model for regressing the
subdistribution hazard of a competing risk.
stratified and clustered data. The
performs a Kaplan-Meier multiple imputation to recover missing
potential censoring information from competing risks events,
permitting to use standard right-censored methods to analyse
cumulative incidence functions. The
implements stepwise covariate selection for the Fine and Gray
computes pseudo observations for
modelling competing risks based on the cumulative incidence
does flexible regression modelling for competing risks data based
on the on the inverse-probability-censoring-weights and direct binomial regression approach.
implements risk regression for competing risks data,
along with other extensions of existing packages useful for survival analysis and
competing risks data.
package estimates the conditional probability of a competing event, aka.,
the conditional cumulative incidence. It also implements a proportional-odds model using either
the temporal process regression or the pseudo-value approaches.
can also be used to estimate the cumulative incidence function.
package estimates event-specific incidence rates,
rate ratios, event-specific incidence proportions and cumulative incidence functions.
provides summary measures for
competing risk such as ensemble CIF.
Recurrent event data:
package can be used to analyse recurrent event
function of the
fits the Anderson-Gill model for recurrent events, model that can
also be fitted with the
package. The latter
also permits to fit joint frailty models for joint modelling of
recurrent events and a terminal event. The
package proposes implementations of several models for recurrent
events data, such as the Peña-Strawderman-Hollander,
Wang-Chang estimators, and MLE estimation under a Gamma Frailty
implements the conditional GEE for recurrent event gap times.
permits to estimate the bivariate
distribution of two gap times.
package proposes several functions to deal
with relative survival data. For example,
computes a relative
fits an additive model and
fits the Cox model of Andersen et al. for relative survival, while
fits a Cox model in transformed time.
package permits to fit relative survival models like
the proportional excess and additive excess models.
package implements methods for
population-based survival analysis, like the proportional hazard
relative survival model and the join point relative survival model.
package computes relative survival,
absolute excess risk and standardized mortality ratio based on
French death rates.
Random Effect Models
Frailty terms can be added
survival. A mixed-effects Cox model is
implemented in the
function in the
package fits the Clayton-Oakes-Glidden model.
package fits fully parametric frailty models
via maximisation of the marginal likelihood.
package fits proportional hazards
models with a shared Gamma frailty to right-censored and/or
left-truncated data using a penalised likelihood on the hazard
function. The package also fits additive and nested frailty models
that can be used for, e.g., meta-analysis and for hierarchically
clustered data (with 2 levels of clustering), respectively. A
proportional hazards model with mixed effects can be fitted using
package fits a
linear mixed-effects model for left-censored data. The Cox model
using h-likelihood estimation for the frailty terms can be fitted
package implements a linear mixed effects model for censored data
with Student-t or normal distributions. The
package fits joint models for event and censoring times,
Joint modelling of time-to-event and longitudinal
package allows the analysis
of repeated measurements and time-to-event data via joint random effects
Multivariate survival refers to the analysis of unit, e.g., the
survival of twins or a family. To analyse such data, we can estimate
the joint distribution of the survival times
can estimate bivariate
survival data subject to interval censoring.
package implements various statistical models
for multivariate event history data, e.g., multivariate cumulative
incidence models, bivariate random effects probit models,
fits through a Bayesian approach a proportional hazards
model for right and interval-censored data.
package proposes an implementation of a bivariate
computes a Bayesian model averaging for
Cox proportional hazards models.
fits a Bayesian
semiparametric AFT model.
in the same package
fits a Linear Dependent Dirichlet Process Mixture of survival models.
performs an MCMC estimation
of normal mixtures for censored data.
A MCMC for Gaussian linear regression with left-, right- or interval-censored
data can be fitted using the
package estimates the hazard function from censored
data in a Bayesian framework.
the log posterior density for a Weibull proportional-odds regression model.
fits generalised linear mixed models using MCMC
to right-, left- and interval censored data.
package aims at drawing inference on
age-specific mortality from capture-recapture/recovery data when
some or all records have missing information on times of birth
and death. Covariates can also be included in the model.
package performs joint modelling of
longitudinal and time-to-event data under a bayesian approach.
Bayesian parametric and semiparametric estimation for
semi-competing risks data is available via the
packages implement CART-like trees that can be used with
package implements recursive partitioning for survival
can perform logic regression.
implements K-adaptive partitioning and recursive
partitioning algorithms for censored survival data
implements bagging for survival data.
package fits random forest
to survival data,
while a variant of the random forest is implemented in
Another implementation is proposed in the
Regularised and shrinkage methods:
package implements a L1 regularised Cox
proportional hazards model.
An L1 and L2 penalised Cox models are available in
package computes a nearest shrunken centroid
for survival gene expression data.
A high dimensional Cox model using univariate shrinkage is available
package implements the lassoed principal components
package implements the LASSO and elastic net estimator for the
additive risk model.
the Lasso and elastic-net penalized Cox's regression using the cockail algorithm.
package permits to fit Cox models with a combination of
lasso and group lasso regularisation.
Gradient boosting for the Cox model is implemented in the
package includes a generic gradient boosting algorithm
for the construction of prognostic and diagnostic models for right-censored data.
implements permutation-based testing procedure to test
the additional predictive value of high-dimensional data. It is based on
provides routines for fitting the Cox proportional hazards model
and the Fine and Gray model by likelihood based boosting.
the supervised principal components for survival data.
package can construct index models for survival
outcomes, that is, construct scores based on a training dataset.
package fits Cox proportional hazards
model using the compound covariate method.
provides partial least squares regression and various techniques
for fitting Cox models in high dimensionnal settings.
Predictions and Prediction Performance
package provides utilities to plot prediction error
curves for several survival models
implements prediction error techniques which can
be computed in a parallelised way. Useful for high-dimensional
package permits to estimate time-dependent
ROC curves and time-dependent AUC with censored data, possibly
with competing risks.
computes time-dependent ROC curves and time-dependent AUC from
censored data using Kaplan-Meier or Akritas's nearest neighbour estimation method
(Cumulative sensitivity and dynamic specificity).
implements time-dependent ROC curves,
AUC and integrated AUC of Heagerty and Zheng (Biometrics, 2005).
Various time-dependent true/false positive rates and
Cumulative/Dynamic AUC are implemented in the
package provides several functions to
assess and compare the performance of survival models.
C-statistics for risk prediction models with censored survival
data can be computed via the
package implements the integrated
discrimination improvement index and the category-less net
reclassification index for comparing competing risks prediction
package proposes power calculation for weighted
Log-Rank tests in cure rate models.
permits to calculate sample size based on
proportional hazards mixture cure models.
package provides power and sample size
calculation for survival analysis (with a focus towards
package performs power
calculation for joint modelling of time-to-event and longitudinal
Power analysis and sample size calculation for SNP association
studies with time-to-event outcomes can be done using
package permits to generate data wih one
binary time-dependent covariate and data stemming from a
progressive illness-death model.
package permits the user to simulate
complex survival data, in which event and censoring times could be
conditional on an user-specified list of (possibly time-dependent)
package permits to simulate
complex survival cohort data (e.g., multiple events, recurrent
package proposes some functions for
simulating complex event history data.
package also permits to simulate and analyse
multistate models. The package allows for a general specification
of the transition hazard functions, for non-Markov models and
for dependencies on the history.
is the companion package to "Dynamic Prediction
in Clinical Survival Analysis".
Inverse probability weights can be estimated using the
These can be used to fit marginal structural models to estimate causal effects
from observational data.
implements several types of bootstrap techniques for right-censored data.
package estimates the current
cumulative incidence and the current leukaemia free survival function.
package provides functions for performing meta-analyses
of gene expression data and to predict patients' survival and risk assessment.
provides tools for individual patient data meta-analysis, mixed-level meta-analysis with patient
level data and mulivariate survival estimates for aggregate studies.
package includes the data sets from Klein
and Moeschberger (1997). Some supplementary data sets and
functions can be found in the
that accompanies Aitkin et al. (2009),
that accompanies Davidson (2003)
that accompanies Maindonald, J.H. and Braun,
W.J. (2003, 2007) also contain survival data sets.
package permits to construct, validate and
calibrate nomograms stemming from complex right-censored survey
package compute the MLE of a density
(log-concave) possibly for interval censored data.
package fits parametric
Transform-both-sides models used in reliability analysis