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 socalled 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. The Task View is also on
github. Feel free to open
an
issue
or submit a pull request.
Standard Survival Analysis
Estimation of the Survival Distribution

KaplanMeier:
The
survfit
function from the
survival
package
computes the KaplanMeier 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 KaplanMeier estimator
are implemented in the
km.ci
package.
plot.Surv
of package
eha
plots
the KaplanMeier estimator.
The
NADA
package includes a function to compute the KaplanMeier
estimator for leftcensored data.
svykm
in
survey
provides a weighted
KaplanMeier estimator.
nested.km
in
NestedCohort
estimates the
survival curve for each level of categorical variables with
missing data. The
kaplanmeier
function
in
spatstat
computes the KaplanMeier estimator from
histogram data. The
MAMSE
package permits to compute a
weighted KaplanMeier estimate. The
KM
function in
package
rhosp
plots the survival function using a
variant of the KaplanMeier estimator in a hospitalisation risk
context. The
survPresmooth
package computes
presmoothed estimates of the main quantities used for
rightcensored data, i.e., survival, hazard and density functions.
The
asbio
package permits to compute the KaplanMeier
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
lbiassurv
package offers
various lengthbias corrections to survival curve
estimation. NonParametric confidance bands for the KaplanMeier
estimator can be computed using the
kmconfband
package.
The
kmc
package implements the KaplanMeier 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 KaplanMeier
estimators. The
tranSurv
package permits to estimate a
survival distribution in the presence of dependent lefttruncation
and rightcensoring. The
condSURV
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
intervalcensored data.

NonParametric 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 intervalcensored data.
dblcens
permits to compute the NPMLE of the cumulative
distribution function for left and rightcensored data.
The
icfit
function in package
interval
computes the NPMLE for intervalcensored 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 intervalcensored data.

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.
Hazard Estimation

The
muhaz
package permits
to estimate the hazard function through kernel methods for rightcensored data.

The
epi.insthaz
function from
epiR
computes
the instantaneous hazard from the KaplanMeier estimator.

polspline,
gss
and
logspline
allow
to estimate the hazard function using splines.

The
ICE
package aims at estimating the hazard function for interval
censored data.

The
bshazard
package provides nonparametric smoothing
of the hazard through Bsplines.
Testing

The
survdiff
function in
survival
compares survival curves using the FlemingHarrington Grho family of test.
NADA
implements this class of tests for leftcensored
data.

clinfun
implements a permutation version of the
logrank test and a version of the logrank that adjusts for
covariates.

The
exactRankTests
implements the shiftalgorithm by Streitberg and Roehmel for
computing exact conditional pvalues and quantiles, possibly for censored data.

SurvTest
in the
coin
package implements
the logrank test reformulated as a linear rank test.

The
maxstat
package performs tests using maximally selected
rank statistics.

The
interval
package implements logrank and Wilcoxon type tests
for intervalcensored data.

Three generalised logrank tests and a score test for intervalcensored data
are implemented in the
glrt
package.

survcomp
compares 2 hazard ratios.

The
TSHRC
implements a two stage procedure for comparing
hazard functions.

The
Survgini
package proposes to test the equality of
two survival distributions based on the Gini index.

The
FHtest
package offers several tests based on the
FlemingHarrington class for comparing surival curves with right
and intervalcensored data.

The
LogrankA
package provides a logrank test for which
aggregated data can be used as input.

The short term and long term hazard ratio model for two samples
survival data can be found in the
YPmodel
package.

The
controlTest
implements a nonparametric twosample
procedure for comparing the median survival time.

The
survRM2
package performs twosample comparison
of the restricted mean survival time

The
emplik2
package permits to compare two samples
with censored data using empirical likelihood ratio tests.
Regression Modelling

Cox model:
The
coxph
function in
the
survival
package fits the Cox model.
cph
in the
rms
package and
the
eha
package propose some extensions to the
coxph
function. 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.
timecox
in package
timereg
fits Cox models
with possibly timevarying effects. The
mfp
package
permits to fit Cox models with multiple fractional
polynomial. The
NestedCohort
fits Cox models for
covariates with missing data. A Cox model model can be fitted to
data from complex survey design using the
svycoxph
function in
survey. The
multipleNCC
package
fits Cox models using a weighted partial likelihood for nested
casecontrol studies. The
MIICD
package implements
Pan's (2000) multiple imputation approach to Cox models for
interval censored data. The
ICsurv
package fits Cox
models for intervalcensored data through an EM algorithm.
The
dynsurv
package fits timevarying 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
CPHshape
package computes
the Cox proportional hazards model with shape constrained hazard
functions. 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
isoph
allows nonparametric estimation of
an isotonic covariate effect for proportional hazards
model. The
icenReg
package implements several models
for intervalcensored data, e.g., Cox, proportional odds, and
accelerated failure time models. A Cox type SelfExciting
Intensity model can be fitted to rightcensored 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 lefttruncated data using augmented information
from the marginal of the truncation times.
The
cumres
function in
gof
computes
goodnessoffit methods for the Cox proportional hazards model.
The proportionality assumption can be checked using
the
cox.zph
function in
survival.
The
CPE
package calculates concordance probability
estimate for the Cox model, as does the
coxphCPE
function in
clinfun. The
coxphQuantile
in
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
leastsquares means (and contrasts thereof) from linear models. In
particular, it provides support for
the
coxph,
survreg
and
coxme
functions. 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
paf
package permits to compute the
unadjusted/adjusted attributable fraction function from a Cox
proportional hazards model. 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 YangPrentice
(2005) Model.

Parametric Proportional Hazards 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
pphsm
in
rms
translates an AFT model to a proportional
hazards form. The
polspline
package includes
the
hare
function 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 rightcensored endpoint,
one intervalcensored covariate, and an arbitrary number of
noncensored covariates.

Accelerated Failure Time (AFT) Models:
The
survreg
function in package
survival
can
fit an accelerated failure time model. A modified version of
survreg
is implemented in the
rms
package
(
psm
function). 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 Gsplines is implemented in the
smoothSurv
package. The
NADA
package
proposes the front end of the
survreg
function for
leftcensored data. A leastsquare principled implementation of
the AFT model can be found in the
lss
package. The
simexaft
package implements the
SimulationExtrapolation 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. The
aftgee
package implements both rankbased estimates and least square
estimates (via generalised estimating equations) to the AFT
model. An alternative weighting scheme for parameter estimation in
the AFT model is proposed in the
imputeYn
package. The
AdapEnetClass
package implements elastic net
regularisation for the AFT model.

Additive Models:
Both
survival
and
timereg
fit the additive hazards model of Aalen in
functions
aareg
and
aalen,
respectively.
timereg
also proposes an implementation
of the CoxAalen model (that can also be used to perform the Lin,
Wei and Ying (1994) goodnessoffit for Cox regression models) and
the partly parametric additive risk model of McKeague and
Sasieni. A version of the CoxAalen model for interval censored
data is available in the
coxinterval
package. The
uniah
package fits shaperestricted
additive hazards models. The
addhazard
package contains
tools to fit additive hazards model to random sampling, twophase
sampling and twophase sampling with auxiliary information.

BuckleyJames Models:
The
bj
function in
rms
and
BJnoint
in
emplik
compute the
BuckleyJames model, though the latter does it without
an intercept term. The
bujar
package fits the BuckleyJames
model with highdimensional covariates (L2 boosting, regression
trees and boosted MARS, elastic net).

Other models:
Functions like
survreg
can fit other types of models depending on the chosen
distribution,
e.g.
, a tobit model. The
AER
package provides the
tobit
function, which is a
wrapper of
survreg
to fit the tobit model. An
implementation of the tobit model for crosssectional 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
pseudoobservation for modelling the survival function based on
the KaplanMeier estimator and the restricted
mean. The
fastpseudo
package dose the same for the
restricted mean survival time.
flexsurv
fits
parametric timetoevent 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
Icens
function in package
Epi
provides
a multiplicative relative risk and an additive excess risk model
for intervalcensored 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.censor
function
in
locfit
produces local regression estimates.
The
crq
function 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 nonproportional.
lava.tobit, an
extension of the
lava
package, fits latent variable models
for censored outcomes via a probit link
formulation. The
BGPhazard
package implements Markov
beta and gamma processes for modelling the hazard ratio for
discrete failure time data. The
surv2sampleComp
packages proposes some modelfree contrast comparison measures
such as difference/ratio of cumulative hazards, quantiles and
restricted mean. The
rstpm2
package provides linkbased
survival models that extend the RoystonParmar 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
flexPM
package fits a flexible parametric
regression model to possibly rightcensored, lefttruncated
data. The
ICGOR
fits the generalized odds rate hazards
model to intervalcensored data while
GORCure
generalized odds rate mixture cure model to intervalcensored
data. The
thregI
package permits to fit a threshold
regression model for intervalcensored data based on the
firsthittingtime of a boundary by the sample path of a Wiener
diffusion process. The
miCoPTCM
package fits
semiparametric promotion time cure models with possibly
mismeasured covariates. The
intercure
package
implements semiparametric cure rate estimators for interval
censored data. The
smcure
package permits to fit
semiparametric proportional hazards and accelerated failure time
mixture cure models. The
dynamichazard
package allows
to estimate various hazard models where the coefficients follow a
state equation. The estimation is then carried out with a
combination of an Extended Kalman Filter or Unscented Kalman
filter combined with an EM algorithm. The casebase 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.
Multistate Models

General Multistate Models:
The
coxph
function 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 timedependent covariates. Besides, all the
regression methods presented above can be used for multistate
models as long as they allow for lefttruncation.
The
mvna
package provides convenient functions for
estimating and plotting the cumulative transition hazards in any
multistate model, possibly subject to rightcensoring and
lefttruncation. The
etm
package estimates and plots transition
probabilities for any multistate models. It can also estimate the
variance of the AalenJohansen estimator, and handles
lefttruncated data. The
msSurv
package provides nonparametric estimation for
multistate models subject to rightcensoring (possibly
statedependent) and lefttruncation. The
mstate
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
msm
package contains functions for fitting general
continuoustime Markov and hidden Markov multistate models to
longitudinal data. Transition rates and output processes can be
modelled in terms of covariates. The
msmtools
package
provides utilities to facilitate the modelling of longitudinal
data under a multistate framework using the
msm
package.The
SemiMarkov
package can be used to fit
semiMarkov multistate models in continuous time. The
distribution of the waiting times can be chosen between the
exponential, the Weibull and exponentiated Weibull distributions.
Nonparametric estimates in illnessdeath models and other three
state models can be obtained with package
p3state.msm. The
TPmsm
package permits to
estimate transition probabilities of an illnessdeath model or
threestate progressive model. The
gamboostMSM
package
extends the
mboost
package to estimation in the
mulstistate model framework, while the
penMSM
package
proposes L1 penalised estimation. The
coxinterval
package permits to fit Cox models to the progressive illnessdeath
model observed under rightcensored survival times and interval
or rightcensored progression times. The
SmoothHazard
package fits proportional hazards models for the illnessdeath model
with possibly intervalcensored data for transition toward the
transient state. Lefttruncated and rightcensored data are also
allowed. The model is either parametric (Weibull) or
semiparametric with Msplines approximation of the baseline
intensities. The
TP.idm
package implement the estimator
of UnaAlvarez and MeiraMachado (2015) for nonMarkov
illnessdeath models.
The
Epi
package implements Lexis objects as a way to
represent, manipulate and summarise data from multistate models.
The
LexisPlotR
package, based on
ggplot2
,
permits to draw Lexis diagrams. The
TraMineR
package is
intended for analysing state or event sequences that describe life
courses. The
Biograph
package permits to describe and
analyse life histories following a multistate perspective on the
life course.
asbio
computes the expected numbers of
individuals in specified age classes or life stages given
survivorship probabilities from a transition matrix.

Competing risks:
The package
cmprsk
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.
crrSC
extends the
cmprsk
package to
stratified and clustered data. The
kmi
package
performs a KaplanMeier multiple imputation to recover missing
potential censoring information from competing risks events,
permitting to use standard rightcensored methods to analyse
cumulative incidence functions. The
crrstep
package
implements stepwise covariate selection for the Fine and Gray
model. Package
pseudo
computes pseudo observations for
modelling competing risks based on the cumulative incidence
functions.
timereg
does flexible regression modelling for
competing risks data based on the on the
inverseprobabilitycensoringweights and direct binomial
regression approach.
riskRegression
implements risk regression for competing
risks data, along with other extensions of existing packages
useful for survival analysis and competing risks data.
The
Cprob
package estimates the conditional probability
of a competing event, aka., the conditional cumulative
incidence. It also implements a proportionalodds model using
either the temporal process regression or the pseudovalue
approaches. Packages
survival
(via
survfit) and
prodlim
can also be used
to estimate the cumulative incidence function.
The
compeir
package estimates eventspecific incidence
rates, rate ratios, eventspecific incidence proportions and
cumulative incidence functions. The
NPMLEcmprsk
package implements the semiparametric mixture model for competing
risks data. The
MIICD
package implements Pan's (2000)
multiple imputation approach to the Fine and Gray model for
interval censored data. The
crskdiag
package provides
graphical and analytical approaches for checking the assumptions
of the Fine and Gray model. The
CFC
package permits to
perform Bayesian, and nonBayesian, causespecific competing risks
analysis for parametric and nonparametric 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 intervalcensored competing risks data.

Recurrent event data:
coxph
from the
survival
package can be used to analyse recurrent event
data. The
cph
function of the
rms
package
fits the AndersonGill 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.
Relative Survival

The
relsurv
package proposes several functions to deal
with relative survival data. For example,
rs.surv
computes a relative
survival curve.
rs.add
fits an additive model and
rsmul
fits the Cox model of Andersen et al. for relative survival, while
rstrans
fits a Cox model in transformed time.

The
timereg
package permits to fit relative survival models like
the proportional excess and additive excess models.

The
mexhaz
package allows fitting an hazard regression
model using different shapes for the baseline hazard. The model
can be used in the relative survival setting (excess mortality
hazard) as well as in the overall survival setting (overall
mortality hazard).

The
flexrsurv
package implements the models of Remontet
et al. (2007) and Mahboubi et al. (2011).

The
JPSurv
package implements methods for
populationbased survival analysis, like the proportional hazard
relative survival model and the join point relative survival model.

The
survexp.fr
package computes relative survival,
absolute excess risk and standardized mortality ratio based on
French death rates.

The
MRsurv
package permits to fit multiplicative
regression models for relative survival.

popEpi
allows for estimation of EdererII and Pohar
Perme relative / net survival as well as standardized mortality
ratios

The
ROCt
package implements timedependent ROC curves
and extensions to relative survival.
Random Effect Models

Frailties:
Frailty terms can be added in
coxph
and
survreg
functions in package
survival. A mixedeffects Cox model is implemented in
the
coxme
package. The
two.stage
function
in the
timereg
package fits the ClaytonOakesGlidden
model. The
parfm
package fits fully parametric frailty
models via maximisation of the marginal likelihood. The
frailtypack
package fits proportional hazards models
with a shared Gamma frailty to rightcensored and/or
lefttruncated 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., metaanalysis and for hierarchically
clustered data (with 2 levels of clustering), respectively. A
proportional hazards model with mixed effects can be fitted using
the
phmm
package. The
lmec
package fits a
linear mixedeffects model for leftcensored data. The Cox model
using hlikelihood estimation for the frailty terms can be fitted
using the
frailtyHL
package. The
tlmec
package implements a linear mixed effects model for censored data
with Studentt or normal distributions. The
frailtySurv
package simulates and fits semiparametric shared frailty models
under a wide range of frailty distributions. The
parfm
package implements parametric frailty models by maximum marginal
likelihood. The
PenCoxFrail
package provides a
regularisation approach for Cox frailty models through
penalisation. The
mexhaz
enables modelling of the
excess hazard regression model with timedependent and/or
nonlinear effect(s) and a random effect defined at the cluster
level. The
dynfrail
package Fits semiparametric dynamic
frailty models according to the methodology of Putter and van
Houwelingen (2015). The
frailtyEM
package contains
functions for fitting shared frailty models with a semiparametric
baseline hazard with the ExpectationMaximization
algorithm. Supported data formats include clustered failures with
left truncation and recurrent events in gaptime or AndersenGill
format

Joint modelling of timetoevent and longitudinal
data:
The
joineR
package allows the analysis
of repeated measurements and timetoevent data via joint random
effects models. The
joint.Cox
package performs Cox
regression and dynamic prediction under the joint frailtycopula
model between tumour progression and death for
metaanalysis.
JointModel
fits semiparametric
regression model for longitudinal responses and a semiparametric
transformation model for timetoevent
data. The
joineRML
package fits the joint model
proposed by Henderson and colleagues
(2000)
doi:10.1093/biostatistics/1.4.465
,
but extended to the case of multiple continuous longitudinal
measures.
Multivariate Survival
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

Joint modelling:
Both
Icens
and
MLEcens
can estimate bivariate
survival data subject to interval censoring.

The
mets
package implements various statistical models
for multivariate event history data, e.g., multivariate cumulative
incidence models, bivariate random effects probit models,
ClaytonOakes model.

The
MST
package constructs trees for multivariate
survival data using marginal and frailty models.

The
SurvCorr
package permits to estimate correlation
coefficients with associated confidence limits for bivariate,
partially censored survival times.
Bayesian Models

The
bayesSurv
package proposes an implementation of a bivariate
AFT model.

The package
BMA
computes a Bayesian model averaging for
Cox proportional hazards models.

The
DPsurvint
function in
DPpackage
fits a Bayesian
semiparametric AFT model.
LDDPsurvival
in the same package
fits a Linear Dependent Dirichlet Process Mixture of survival models.

NMixMCMC
in
mixAK
performs an MCMC estimation
of normal mixtures for censored data.

A MCMC for Gaussian linear regression with left, right or intervalcensored
data can be fitted using the
MCMCtobit
in
MCMCpack.

The
BayHaz
package estimates the hazard function from censored
data in a Bayesian framework.

The
weibullregpost
function in
LearnBayes
computes
the log posterior density for a Weibull proportionalodds regression model.

The
MCMCglmm
fits generalised linear mixed models using MCMC
to right, left and interval censored data.

The
BaSTA
package aims at drawing inference on
agespecific mortality from capturerecapture/recovery data when
some or all records have missing information on times of birth
and death. Covariates can also be included in the model.

The
JMbayes
package performs joint modelling of
longitudinal and timetoevent data under a bayesian approach.

Bayesian parametric and semiparametric estimation for
semicompeting risks data is available via the
SemiCompRisks
package.

The
psbcGroup
package implements penalized
semiparametric Bayesian Cox models with elastic net, fused lasso and
group lasso priors.

The
spatsurv
package fits a Bayesian parametric
proportional hazards model for which events have been geolocated.

The
PReMiuM
package implements Bayesian clustering
using a Dirichlet process mixture model to censored responses.

The
spBayesSurv
package provides Bayesian model fitting
for several survival models including spatial copula, linear
dependent Dirichlet process mixture model, anova Dirichlet process
mixture model, proportional hazards model and marginal spatial
proportional hazards model.

The
IDPSurvival
package implements nonparametric
survival analysis techniques using a prior nearignorant Dirichlet
Process.

The
ICBayes
packages permits to fit Bayesian
semiparametric regression survival models (proportional hazards
model, proportional odds model, and probit model) to
intervalcensored timetoevent data

The
BayesPiecewiseICAR
package fits a piecewise
exponential hazard to survival data using a Hierarchical Bayesian
model.
HighDimensional Data

Recursive partitioning:
rpart
implements CARTlike trees that can be used with
censored outcomes.
The
party
package implements recursive partitioning for survival
data.
LogicReg
can perform logic regression.
kaps
implements Kadaptive partitioning and recursive
partitioning algorithms for censored survival data.
The
DStree
package implements trees and bagged trees
for discretetimes survival data. The
LTRCtrees
package
provides recursive partition algorithms designed for fitting
survival tree with lefttruncated and right censored
data. The package also
Joint modelling of timetoevent and longitudinal
data:
The
joineR
package allows the analysis
of repeated measurements and timetoevent data via joint random
effects models. The
joint.Cox
package performs Cox
regression and dynamic prediction under the joint frailtycopula
model between tumour progression and death for
metaanalysis.
JointModel
fits semiparametric
regression model for longitudinal responses and a semiparametric
transformation model for timetoevent data.
Multivariate Survival
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

Joint modelling:
Both
Icens
and
MLEcens
can estimate bivariate
survival data subject to interval censoring.

The
mets
package implements various statistical models
for multivariate event history data, e.g., multivariate cumulative
incidence models, bivariate random effects probit models,
ClaytonOakes model.

The
MST
package constructs trees for multivariate
survival data using marginal and frailty models.

The
SurvCorr
package permits to estimate correlation
coefficients with associated confidence limits for bivariate,
partially censored survival times.
Bayesian Models

The
bayesSurv
package proposes an implementation of a bivariate
AFT model.

The package
BMA
computes a Bayesian model averaging for
Cox proportional hazards models.

The
DPsurvint
function in
DPpackage
fits a Bayesian
semiparametric AFT model.
LDDPsurvival
in the same package
fits a Linear Dependent Dirichlet Process Mixture of survival models.

NMixMCMC
in
mixAK
performs an MCMC estimation
of normal mixtures for censored data.

A MCMC for Gaussian linear regression with left, right or intervalcensored
data can be fitted using the
MCMCtobit
in
MCMCpack.

The
BayHaz
package estimates the hazard function from censored
data in a Bayesian framework.

The
weibullregpost
function in
LearnBayes
computes
the log posterior density for a Weibull proportionalodds regression model.

The
MCMCglmm
fits generalised linear mixed models using MCMC
to right, left and interval censored data.

The
BaSTA
package aims at drawing inference on
agespecific mortality from capturerecapture/recovery data when
some or all records have missing information on times of birth
and death. Covariates can also be included in the model.

The
JMbayes
package performs joint modelling of
longitudinal and timetoevent data under a bayesian approach.

Bayesian parametric and semiparametric estimation for
semicompeting risks data is available via the
SemiCompRisks
package.

The
psbcGroup
package implements penalized
semiparametric Bayesian Cox models with elastic net, fused lasso and
group lasso priors.

The
spatsurv
package fits a Bayesian parametric
proportional hazards model for which events have been geolocated.

The
PReMiuM
package implements Bayesian clustering
using a Dirichlet process mixture model to censored responses.

The
spBayesSurv
package provides Bayesian model fitting
for several survival models including spatial copula, linear
dependent Dirichlet process mixture model, anova Dirichlet process
mixture model, proportional hazards model and marginal spatial
proportional hazards model.

The
IDPSurvival
package implements nonparametric
survival analysis techniques using a prior nearignorant Dirichlet
Process.

The
ICBayes
packages permits to fit Bayesian
semiparametric regression survival models (proportional hazards
model, proportional odds model, and probit model) to
intervalcensored timetoevent data

The
BayesPiecewiseICAR
package fits a piecewise
exponential hazard to survival data using a Hierarchical Bayesian
model.
HighDimensional Data

Recursive partitioning:
rpart
implements CARTlike trees that can be used with
censored outcomes.
The
party
package implements recursive partitioning for survival
data.
LogicReg
can perform logic regression.
kaps
implements Kadaptive partitioning and recursive
partitioning algorithms for censored survival data.
The
DStree
package implements trees and bagged trees
for discretetimes survival data. The
LTRCtrees
package
provides recursive partition algorithms designed for fitting
survival tree with lefttruncated and right censored data. The
package also includes an implementation of recursive partitioning
(conditional inference trees) for intervalcensored
data.
bnnSurvival
implements a bootstrap aggregated
version of the knearest neighbors survival probability prediction
method.

Random forest:
Package
ipred
implements
bagging for survival data. The
randomForestSRC
package
fits random forest to survival data, while a variant of the random
forest is implemented in
party. A faster implementation
can be found in package
ranger. An alternative
algorithm for random forests is implemented in
icRSF.

Regularised and shrinkage methods:
The
glmnet
package provides procedures for fitting the
entire lasso or elasticnet regularization path for Cox models.
The
glmpath
package implements a L1 regularised Cox
proportional hazards model. An L1 and L2 penalised Cox models are
available in
penalized. The
pamr
package
computes a nearest shrunken centroid for survival gene expression
data. A high dimensional Cox model using univariate shrinkage is
available in
uniCox. The
lpc
package
implements the lassoed principal components method.
The
ahaz
package implements the LASSO and elastic net
estimator for the additive risk model. The
fastcox
package implements the Lasso and elasticnet penalized Cox's
regression using the cockail algorithm. The
SGL
package permits to fit Cox models with a combination of lasso and
group lasso regularisation.
CoxRidge
fits Cox models
with penalized ridgetype (ridge, dynamic and weighted dynamic)
partial likelihood. The
hdnom
package implements 9
types of penalised Cox regression methods and provides methods for
model validation, calibration, comparison, and nomogram
visualisation. Another implementation of regularised Cox models
can be found in
Coxnet. A penalised version of the Fine
and Gray model can be found
in
crrp. The
Cyclops
package implements
cyclic coordinate descent for the Cox proportional hazards model.

Boosting:
Gradient boosting for the Cox model is implemented in the
gbm
package.
The
mboost
package includes a generic gradient boosting algorithm
for the construction of prognostic and diagnostic models for rightcensored data.
globalboosttest
implements permutationbased testing procedure to test
the additional predictive value of highdimensional data. It is based on
mboost.
CoxBoost
provides routines for fitting the Cox proportional hazards model
and the Fine and Gray model by likelihood based boosting.

Other:
The
superpc
package implements
the supervised principal components for survival data.
The
AIM
package can construct index models for survival
outcomes, that is, construct scores based on a training dataset.
The
compound.Cox
package fits Cox proportional hazards
model using the compound covariate method.
plsRcox
provides partial least squares regression and various techniques
for fitting Cox models in high dimensionnal
settings. The
rsig
package implements feature selection
algorithms based on subsampling and averaging linear models
obtained from the Lasso algorithm for predicting survival risk.
Predictions and Prediction Performance

The
pec
package provides utilities to plot prediction error
curves for several survival models

peperr
implements prediction error techniques which can
be computed in a parallelised way. Useful for highdimensional
data.

The
timeROC
package permits to estimate timedependent
ROC curves and timedependent AUC with censored data, possibly
with competing risks.

survivalROC
computes timedependent ROC curves and timedependent AUC from
censored data using KaplanMeier or Akritas's nearest neighbour estimation method
(Cumulative sensitivity and dynamic specificity).

tdROC
can be used to compute timedependent ROC curve
from censored survival data using nonparametric weight
adjustments.

risksetROC
implements timedependent ROC curves,
AUC and integrated AUC of Heagerty and Zheng (Biometrics, 2005).

Various timedependent true/false positive rates and
Cumulative/Dynamic AUC are implemented in the
survAUC
package.

The
survcomp
package provides several functions to
assess and compare the performance of survival models.

Cstatistics for risk prediction models with censored survival
data can be computed via the
survC1
package.

The
survIDINRI
package implements the integrated
discrimination improvement index and the categoryless net
reclassification index for comparing competing risks prediction
models.

The
survAccuracyMeasures
package provides functions for
estimating the AUC, TPR(c), FPR(c), PPV(c), and NPV(c) for
survival data.

The
SurvRank
package provides functions for the
estimation of the prediction accuracy in a unified survival AUC
approach.

The
compareC
package permits to compare C indices
with rightcensored survival outcomes

The
APtools
package provide tools to estimate the
average positive predictive values and the AUC for risk scores or
marker.
Power Analysis

The
CR
package proposes power calculation for weighted
LogRank tests in cure rate models.

The
NPHMC
permits to calculate sample size based on
proportional hazards mixture cure models.

The
powerSurvEpi
package provides power and sample size
calculation for survival analysis (with a focus towards
epidemiological studies).

Power analysis and sample size calculation for SNP association
studies with timetoevent outcomes can be done using
the
survSNP
package.
Simulation

The
genSurv
package permits to generate data wih one
binary timedependent covariate and data stemming from a
progressive illnessdeath model.

The
PermAlgo
package permits the user to simulate
complex survival data, in which event and censoring times could be
conditional on an userspecified list of (possibly timedependent)
covariates.

The
prodlim
package proposes some functions for
simulating complex event history data.

The
gems
package also permits to simulate and analyse
multistate models. The package allows for a general specification
of the transition hazard functions, for nonMarkov models and
for dependencies on the history.

The
simMSM
package provides functions for simulating
complex multistate models data with possibly nonlinear baseline
hazards and nonlinear covariate effects.

The
simPH
package implements tools for simulating and
plotting quantities of interest estimated from proportional
hazards models.

The
survsim
package permits to simulate simple and
complex survival data such as recurrent event data and competing
risks.

The
simsurv
package enables the user to simulate
survival times from standard parametric survival distributions
(exponential, Weibull, Gompertz), 2component mixture distributions,
or a userdefined hazard or log hazard function. Time dependent
effects (i.e. nonproportional hazards) can be included by
interacting covariates with linear time or some transformation of
time.

The
MicSim
package provides routines for performing
continuoustime microsimulation for population projection. The
basis for the microsimulation are a multistate model, Markov or
nonMarkov, for which the transition intensities are specified, as
well as an initial cohort.

The
SimHaz
package permits to simulate data with a
dichotomous timedependent exposure.

The
SimSCRPiecewise
package can be used to simulate
univariate and semicompeting risks data given covariates and
piecewise exponential baseline hazards.
Graphics
This section tries to list some specialised plot functions that might be
useful in the context of event history analysis.

The
rms
package proposes
functions for plotting survival curves with the at risk table aligned to
the x axis.
prodlim
extends this to the competing risks
model.

The
plot.Hist
function in
prodlim
permits
to draw the states and transitions that characterize a multistate
model.

The
Epi
package provides many plot functions for
representing multistate data, in particular Lexis diagrams.

The
compeir
package provide multistatetype graphics
for competing risks, in which the thickness of the transition
arrows from the initial event to each competing event describes
the particular amount of every incidence rate.

The
FamEvent
generates timetoevent outcomes for
families that habour genetic mutation under different sampling
designs and estimates the penetrance functions for family data
with ascertainment correction.
Miscellaneous

The
survminer
package contains the
function
ggsurvplot
for drawing survival curves with
the 'number at risk' table. Other functions are also available for
visual examinations of cox model assumptions.

The
InformativeCensoring
package multiple imputation
methods for dealing with informative censoring.

The
discSurv
provides data transformations, estimation
utilities, predictive evaluation measures and simulation functions for
discrete time survival analysis.

dynpred
is the companion package to "Dynamic Prediction
in Clinical Survival Analysis".

Package
boot
proposes the
censboot
function that
implements several types of bootstrap techniques for rightcensored data.

The
currentSurvival
package estimates the current
cumulative incidence and the current leukaemia free survival function.

The
survJamda
package provides functions for performing metaanalyses
of gene expression data and to predict patients' survival and risk assessment.

ipdmeta
provides tools for individual patient data metaanalysis, mixedlevel metaanalysis with patient
level data and mulivariate survival estimates for aggregate studies.

The
KMsurv
package includes the data sets from Klein
and Moeschberger (1997). Some supplementary data sets and
functions can be found in the
OIsurv
package. The
package
SMIR
that accompanies Aitkin et al. (2009),
SMPracticals
that accompanies Davidson (2003)
and
DAAG
that accompanies Maindonald, J.H. and Braun,
W.J. (2003, 2007) also contain survival data sets.

The
SvyNom
package permits to construct, validate and
calibrate nomograms stemming from complex rightcensored survey
data.

The
logconcens
package compute the MLE of a density
(logconcave) possibly for interval censored data.

The
TBSSurvival
package fits parametric
Transformbothsides models used in reliability analysis

The
OutlierDC
package implements algorithms to detect outliers
based on quantile regression for censored data.

The
coarseDataTools
package implements an EM algorithm
to estimate the relative case fatality ratio between two groups.

The
GSSE
package proposes a fully efficient sieve
maximum likelihood method to estimate genotypespecific distribution
of timetoevent outcomes under a nonparametric model

power and sample size calculation based on the difference in
restricted mean survival times can be performed using
the
SSRMST
package.

The
AHR
package allows for the estimation of
multivariate average hazard ratios as defined by Kalbfleisch and
Prentice.

The
survMisc
provides miscellaneous routines to help in
the analysis of rightcensored survival data.

Accompanying data sets to the book
Applied Survival Analysis
Using R
can be found in package
asaur.