Main Content

Analysis of Lifetime Data

Nonparametric and semiparametric methods for analyzing reliability and survival data

Survival analysis is time-to-event analysis, that is, when the outcome of interest is the time until an event occurs. Examples of time-to-events are the time until infection, reoccurrence of a disease, or recovery in health sciences; the duration of unemployment in economics; the time until the failure of a machine part or the lifetime of light bulbs in engineering, and so on.

To perform survival analysis:

  • Fit a model to your data. Use one or more of the functions listed on this page underLifetime Data AnalysisorCox Proportional Hazards Models.

  • Plot or otherwise analyze the fitted model using the methods in the examples listed on this page underTopics, or usingCox Proportional Hazards Modelsfunctions.

Thefitcoxfunction provides an object-oriented way to fit a Cox proportional hazards model. The resultingCoxModelobject contains many statistics and methods for analysis.coxphfitis an older function for fitting Cox models that also enables code generation.

Functions

expand all

ksdensity Kernel smoothing function estimate for univariate and bivariate data
mle Maximum likelihood estimates
mlecov Asymptotic covariance of maximum likelihood estimators
evfit Extreme value parameter estimates
expfit Exponential parameter estimates
gamfit Gamma parameter estimates
lognfit Lognormal parameter estimates
normfit Normal parameter estimates
wblfit Weibull parameter estimates
fitdist Fit probability distribution object to data
dfittool Open Distribution Fitter app
ecdf Empirical cumulative distribution function
ecdfhist Histogram based on empirical cumulative distribution function
plotSurvival Plot survival function of Cox proportional hazards model
probplot Probability plots
wblplot Weibull probability plot

Fit Cox Proportional Hazards Model

coxphfit Cox proportional hazards regression

FitCoxModelObject

fitcox Create Cox proportional hazards model

CoxModelMethods

coefci Confidence interval for Cox proportional hazards model coefficients
hazardratio Estimate Cox model hazard relative to baseline
linhyptest Linear hypothesis tests on Cox model coefficients
plotSurvival Plot survival function of Cox proportional hazards model
生存 Calculate survival of Cox proportional hazards model

Objects

CoxModel Cox proportional hazards model

Topics