Survival Distributions in R

Overview

This page summarizes common parametric distributions in R, based on the R functions shown in the table below.

Parametric survival distributions in R
DistributionDensityCDFHazardCumulative hazardRandom sample
Exponentialdexppexpflexsurv::hexpflexsurv::Hexprexp
Weibull (AFT) dweibullpweibullflexsurv::hweibullflexsurv::Hweibullrweibull
Gammadgammapgammaflexsurv::hgammaflexsurv::Hgammargamma
Lognormal dlnormplnormflexsurv::hlnormflexsurv::Hlnormrlnorm
Gompertz flexsurv::dgompertzflexsurv::pgompertzflexsurv::hgompertzflexsurv::Hgompertzflexsurv::rgompertz
Log-logistic flexsurv::dllogisflexsurv::pllogisflexsurv::hllogisflexsurv::Hllogisflexsurv::rllogis
Generalized gamma (Prentice 1975) flexsurv::dgengammaflexsurv::pgengammaflexsurv::hgengammaflexsurv::Hgengammaflexsurv::rgengamma

General Survival Distributions

Survival function:

Hazard function:

Cumulative hazard function:

Median:

Exponential Distribution

Notation: = rate

Density:

Survival:

Hazard:

Cumulative hazard:

Mean:

Median:

Regression:

Weibull Distribution

Notation: = shape, = scale, = gamma function

Density:

Survival:

Hazard:

Cumulative hazard:

Mean:

Median:

Regression:

Notes: The exponential distribution is a special case of the Weibull with and

Gamma Distribution

Notation: = shape, = rate, is the lower incomplete gamma function

Density:

Survival:

Mean:

Regression:

Lognormal Distribution

Notation: = mean, = variance, is the CDF of the standard normal distribution

Density:

Survival:

Mean:

Median:

Regression

Gompertz Distribution

Notation: = shape, = rate

Density:

Survival:

Hazard:

Cumulative Hazard:

Median:

Regression:

Notes: When the Gompertz distribution is equivalent to the exponential with constant hazard and rate .

Log-logistic Distribution

Notation: = shape, = scale

Density:

Survival:

Hazard:

Median:

Mean: If , else undefined

Regression:

Generalized Gamma Distribution

Notation: = location parameter, = scale parameter, = shape parameter

Density:

Regression:

Notes: Simplifies to lognormal when , Weibull when , exponential when , and gamma when