|Maintainer:||Arthur Allignol, Aurelien Latouche|
|Contact:||arthur.allignol at gmail.com|
|Contributions:||Suggestions and improvements for this task view are very welcome and can be made through issues or pull requests on GitHub or via e-mail to the maintainer address. For further details see the Contributing guide.|
|Citation:||Arthur Allignol, Aurelien Latouche (2022). CRAN Task View: Survival Analysis. Version 2022-03-07. URL https://CRAN.R-project.org/view=Survival.|
|Installation:||The packages from this task view can be installed automatically using the ctv package. For example, |
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 maintainers know if something is inaccurate or missing, either via e-mail or by submitting an issue or pull request in the GitHub repository linked above.
survfit function from the survival package computes the Kaplan-Meier estimator for truncated and/or censored data. rms (replacement of the Design package) proposes a modified version of the
survfit function. The prodlim package implements a fast algorithm and some features not included in survival. Various confidence intervals and confidence bands for the Kaplan-Meier estimator are implemented in the km.ci package.
plot.Surv of package eha plots the Kaplan-Meier estimator. The NADA package includes a function to compute the Kaplan-Meier estimator for left-censored data.
svykm in survey provides a weighted Kaplan-Meier estimator. The
kaplan-meier function in spatstat computes the Kaplan-Meier estimator from histogram data. The
KM function in package rhosp plots the survival function using a variant of the Kaplan-Meier estimator in a hospitalisation risk context. The survPresmooth package computes presmoothed estimates of the main quantities used for right-censored data, i.e., survival, hazard and density functions. The asbio package permits to compute the Kaplan-Meier estimator following Pollock et al. (1998). The bpcp package provides several functions for computing confidence intervals of the survival distribution (e.g., beta product confidence procedure). The kmc package implements the Kaplan-Meier estimator with constraints. The landest package allows landmark estimation and testing of survival probabilities. The jackknifeKME package computes the original and modified jackknife estimates of Kaplan-Meier estimators. The tranSurv package permits to estimate a survival distribution in the presence of dependent left-truncation and right-censoring. The condSURV (archived) package provides methods for estimating the conditional survival function for ordered multivariate failure time data. The gte package implements the generalised Turnbull estimator proposed by Dehghan and Duchesne for estimating the conditional survival function with interval-censored data.
Non-Parametric maximum likelihood estimation (NPMLE): The
Icens package provides several ways to compute the NPMLE of the survival distribution for various censoring and truncation schemes. MLEcens can also be used to compute the MLE for interval-censored data. dblcens permits to compute the NPMLE of the cumulative distribution function for left- and right-censored data. The
icfit function in package interval computes the NPMLE for interval-censored data. The DTDA package implements several algorithms permitting to analyse possibly doubly truncated survival data.
npsurv computes the NPMLE of a survival function for general interval-censored data. The csci package provides confidence intervals for the cumulative distribution function of the event time for current status data, including a new method that is valid (i.e., exact).
Parametric: The fitdistrplus package permits to fit an univariate distribution by maximum likelihood. Data can be interval censored. The vitality package provides routines for fitting models in the vitality family of mortality models.
epi.insthazfunction from epiR computes the instantaneous hazard from the Kaplan-Meier estimator.
survdifffunction in survival compares survival curves using the Fleming-Harrington G-rho family of test. NADA implements this class of tests for left-censored data.
SurvTestin the coin package implements the logrank test reformulated as a linear rank test.
coxphfunction in the survival package fits the Cox model.
cphin the rms package and the eha package propose some extensions to the
coxphfunction. The package coxphf 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 coxphw. The coxrobust package proposes a robust implementation of the Cox model.
timecoxin package timereg fits Cox models with possibly time-varying effects. A Cox model model can be fitted to data from complex survey design using the
svycoxphfunction in survey. The multipleNCC package fits Cox models using a weighted partial likelihood for nested case-control studies. The MIICD (archived) package implements Pan’s (2000) multiple imputation approach to Cox models for interval censored data. The ICsurv package fits Cox models for interval-censored data through an EM algorithm. The dynsurv package fits 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 OrdFacReg package implements the Cox model using an active set algorithm for dummy variables of ordered factors. The survivalMPL package fits Cox models using maximum penalised likelihood and provide a non parametric smooth estimate of the baseline hazard function. A Cox model with piecewise constant hazards can be fitted using the pch package. The icenReg package implements several models for interval-censored data, e.g., Cox, proportional odds, and accelerated failure time models. A Cox type Self-Exciting Intensity model can be fitted to right-censored data using the coxsei package. The SurvLong contains methods for estimation of proportional hazards models with intermittently observed longitudinal covariates. The plac package provides routines to fit the Cox model with left-truncated data using augmented information from the marginal of the truncation times.
cox.zphfunction in survival. The
coxphCPEfunction in clinfun calculates concordance probability estimate for the Cox model. The
coxphQuantilein the latter package draws a quantile curve of the survival distribution as a function of covariates. The multcomp package computes simultaneous tests and confidence intervals for the Cox model and other parametric survival models. The lsmeans package permits to obtain least-squares means (and contrasts thereof) from linear models. In particular, it provides support for the
coxmefunctions. The multtest package on 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 the saws package. The rankhazard package permits to plot visualisation of the relative importance of covariates in a proportional hazards model. The smoothHR package provides hazard ratio curves that allows for nonlinear relationship between predictor and survival. The PHeval package proposes tools to check the proportional hazards assumption using a standardised score process. The ELYP package implements empirical likelihood analysis for the Cox Model and Yang-Prentice (2005) Model.
survreg(from survival) fits a parametric proportional hazards model. The eha and mixPHM packages implement a proportional hazards model with a parametric baseline hazard. The
pphsmin rms translates an AFT model to a proportional hazards form. The polspline package includes the
harefunction that fits a hazard regression model, using splines to model the baseline hazard. Hazards can be, but not necessarily, proportional. The flexsurv package 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 regression. The SurvRegCensCov package allows estimation of a Weibull Regression for a right-censored endpoint, one interval-censored covariate, and an arbitrary number of non-censored covariates.
survregfunction in package survival can fit an accelerated failure time model. A modified version of
survregis implemented in the rms package (
psmfunction). It permits to use some of the rms functionalities. The eha package also proposes an implementation of the AFT model (function
aftreg). An AFT model with an error distribution assumed to be a mixture of G-splines is implemented in the smoothSurv package. The NADA package proposes the front end of the
survregfunction for left-censored data. The simexaft 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 RobustAFT. The coarseDataTools package fits AFT models for interval censored data. An alternative weighting scheme for parameter estimation in the AFT model is proposed in the imputeYn package. The aftgee package implements recently developed inference procedures for the AFT models with both the rank-based approach and the least squares approach.
aalen, respectively. timereg 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. A version of the Cox-Aalen model for interval censored data is available in the coxinterval (archived) package. The uniah package fits shape-restricted additive hazards models. The addhazard package contains tools to fit additive hazards model to random sampling, two-phase sampling and two-phase sampling with auxiliary information.
bjfunction in rms and
BJnointin emplik compute the Buckley-James model, though the latter does it without an intercept term. The bujar package fits the Buckley-James model with high-dimensional covariates (L2 boosting, regression trees and boosted MARS, elastic net).
survregcan fit other types of models depending on the chosen distribution, e.g. , a tobit model. The AER package provides the
tobitfunction, which is a wrapper of
survregto fit the tobit model. An implementation of the tobit model for cross-sectional data and panel data can be found in the censReg package. The timereg package provides implementation of the proportional odds model and of the proportional excess hazards model. The invGauss package fits the inverse Gaussian distribution to survival data. The model is based on describing time to event as the barrier hitting time of a Wiener process, where drift towards the barrier has been randomized with a Gaussian distribution. The pseudo package computes the pseudo-observation for modelling the survival function based on the Kaplan-Meier estimator and the restricted mean. The fastpseudo package dose the same for the restricted mean survival time. flexsurv 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
Icensfunction in package Epi provides a multiplicative relative risk and an additive excess risk model for interval-censored data. The VGAM package can fit vector generalised linear and additive models for censored data. The gamlss.cens package implements the generalised additive model for location, scale and shape that can be fitted to censored data. The
locfit.censorfunction in locfit produces local regression estimates. The
crqfunction included in the quantreg package implements a conditional quantile regression model for censored data. The JM package fits shared parameter models for the joint modelling of a longitudinal response and event times. The temporal process regression model is implemented in the tpr package. Aster models, which combine aspects of generalized linear models and Cox models, are implemented in the aster and aster2 packages. The concreg package implements conditional logistic regression for survival data as an alternative to the Cox model when hazards are non-proportional. The surv2sampleComp packages proposes some model-free contrast comparison measures such as difference/ratio of cumulative hazards, quantiles and restricted mean. The rstpm2 package provides link-based survival models that extend the Royston-Parmar models, a family of flexible parametric models. The TransModel package implements a unified estimation procedure for the analysis of censored data using linear transformation models. The ICGOR fits the generalized odds rate hazards model to interval-censored data while GORCure generalized odds rate mixture cure model to interval-censored data. The thregI package permits to fit a threshold regression model for interval-censored data based on the first-hitting-time of a boundary by the sample path of a Wiener diffusion process. The miCoPTCM package fits semiparametric promotion time cure models with possibly mis-measured covariates. The smcure package permits to fit semiparametric proportional hazards and accelerated failure time mixture cure models. The case-base sampling approach for fitting flexible hazard regression models to survival data with single event type or multiple competing causes via logistic and multinomial regression can be found in package casebase. The intsurv package fits regular Cox cure rate model via an EM algorithm, regularized Cox cure rate model with elastic net penalty, and weighted concordance index for cure models.
coxphfunction from package survival 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.
survfit) and prodlim can also be used to estimate the cumulative incidence function. The NPMLEcmprsk package implements the semi-parametric mixture model for competing risks data. The CFC package permits to perform Bayesian, and non-Bayesian, cause-specific competing risks analysis for parametric and non-parametric survival functions. The gcerisk package provides some methods for competing risks data. Estimation, testing and regression modeling of subdistribution functions in the competing risks setting using quantile regressions can be had in cmprskQR. The intccr package permits to fit the Fine and Gray model as well other models that belong to the class of semiparametric generalized odds rate transformation models to interval-censored competing risks data.
coxphfrom the survival package can be used to analyse recurrent event data. The
cphfunction of the rms package fits the Anderson-Gill model for recurrent events, model that can also be fitted with the frailtypack package. The latter also permits to fit joint frailty models for joint modelling of recurrent events and a terminal event. The condGEE package implements the conditional GEE for recurrent event gap times. The reda package provides function to fit gamma frailty model with either a piecewise constant or a spline as the baseline rate function for recurrent event data, as well as some miscellaneous functions for recurrent event data. Several regression models for recurrent event data are implemented in the reReg package. The spef package includes functions for fitting semiparametric regression models for panel count survival data.
rs.survcomputes a relative survival curve.
rs.addfits an additive model and
rsmulfits the Cox model of Andersen et al. for relative survival, while
rstransfits a Cox model in transformed time.
survregfunctions in package survival. A mixed-effects Cox model is implemented in the coxme package. The
two.stagefunction in the timereg package fits the Clayton-Oakes-Glidden model. The frailtypack 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. The Cox model using h-likelihood estimation for the frailty terms can be fitted using the frailtyHL package. The frailtySurv package simulates and fits semiparametric shared frailty models under a wide range of frailty distributions. The PenCoxFrail package provides a regularisation approach for Cox frailty models through penalisation. The mexhaz enables modelling of the excess hazard regression model with time-dependent and/or non-linear effect(s) and a random effect defined at the cluster level. The frailtyEM package contains functions for fitting shared frailty models with a semi-parametric baseline hazard with the Expectation-Maximization algorithm. Supported data formats include clustered failures with left truncation and recurrent events in gap-time or Andersen-Gill format
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
NMixMCMCin mixAK performs an MCMC estimation of normal mixtures for censored data.
weibullregpostfunction in LearnBayes computes the log posterior density for a Weibull proportional-odds regression model.
This section tries to list some specialised plot functions that might be useful in the context of event history analysis.
plot.Histfunction in prodlim permits to draw the states and transitions that characterize a multistate model.
ggsurvplotfor drawing survival curves with the “number at risk” table. Other functions are also available for visual examinations of Cox model assumptions.
censbootfunction that implements several types of bootstrap techniques for right-censored data.
|Core:||cmprsk, eha, mstate, muhaz, rms, survival, timereg.|
|Regular:||addhazard, AER, aftgee, ahaz, APtools, asaur, asbio, aster, aster2, BaSTA, BayesPiecewiseICAR, bayesSurv, BMA, bnnSurvival, boot, bpcp, bshazard, bujar, casebase, censReg, CFC, clinfun, cmprskQR, coarseDataTools, coin, compareC, compound.Cox, concreg, condGEE, controlTest, coxme, coxphf, coxphw, coxrobust, coxsei, crrSC, csci, currentSurvival, Cyclops, DAAG, dblcens, discSurv, DTDA, dynpred, dynsurv, ELYP, emplik, emplik2, Epi, epiR, etm, exactRankTests, FamEvent, fastcox, fastpseudo, FHtest, fitdistrplus, flexrsurv, flexsurv, frailtyEM, frailtyHL, frailtypack, frailtySurv, gamboostMSM, gamlss.cens, gbm, gcerisk, gems, genSurv, GJRM, glmnet, glmpath, GORCure, gss, GSSE, gte, hdnom, icenReg, ICGOR, icRSF, ICsurv, IDPSurvival, imputeYn, InformativeCensoring, intccr, interval, intsurv, invGauss, ipred, jackknifeKME, JM, JMbayes, joineRML, joint.Cox, JointModel, km.ci, kmc, kmi, KMsurv, KONPsurv, landest, LearnBayes, LexisPlotR, locfit, logconcens, LogicReg, logspline, lpc, lsmeans, LTRCtrees, maxcombo, maxstat, mboost, MCMCglmm, MCMCpack, mets, mexhaz, miCoPTCM, MicSim, mixAK, mixPHM, MLEcens, msm, msmtools, MST, multcomp, multipleNCC, mvna, NADA, NPHMC, NPMLEcmprsk, npsurv, OrdFacReg, pamr, party, pch, pec, penalized, PenCoxFrail, penMSM, peperr, PermAlgo, PHeval, plac, plsRcox, polspline, powerSurvEpi, PReMiuM, prodlim, psbcGroup, pseudo, quantreg, randomForestSRC, ranger, rankhazard, reda, relsurv, reReg, rhosp, riskRegression, risksetROC, RobustAFT, rpart, rstanarm, rstpm2, saws, SemiCompRisks, SemiMarkov, SGL, simexaft, SimHaz, simMSM, simPH, SimSCRPiecewise, simsurv, SimSurvNMarker, smcure, SmoothHazard, smoothHR, smoothSurv, SMPracticals, spatstat, spBayesSurv, spef, SSRMST, superpc, surv2sampleComp, survAUC, survC1, SurvCorr, survexp.fr, survey, survIDINRI, survivalMPL, survivalROC, SurvLong, survminer, survMisc, survPresmooth, SurvRegCensCov, survRM2, survsim, survSNP, SvyNom, tdROC, thregI, timeROC, TP.idm, TPmsm, tpr, TraMineR, TransModel, tranSurv, TSHRC, uniah, VGAM, vitality, vsd, xgboost, YPmodel.|
|Archived:||condSURV, coxinterval, Cprob, ICBayes, joineR, MIICD, MRsurv, survJamda.|