Main Content

Analysis of Lifetime Data

Nonparametric and semiparametric methods for analyzing reliability and survival data

In lifetime data analysis, the outcome of interest is the time until an event occurs. Some common time-to-event examples are the:

  • Time until infection, recurrence of a disease, or recovery in health sciences

  • Duration of unemployment or a recession in economics

  • Time until the failure of a machine part or the lifetime of light bulbs in engineering

Survival analysis is a set of statistical techniques that are well suited to data sets that contain time-to-event information for a range of categorical or noncategorical predictor values, such as hospital readmission times for patients of various ages who are smokers or nonsmokers. In many cases, some of the data is censored, meaning that an event occurred before the start of the study or has not yet occurred, or the event time is only known within a finite interval.

Accelerated lifetime analysis provides a way to predict the lifetimes of industrial components when you cannot directly obtain time-to-failure data under normal operating conditions. For example, the mean lifetime of a light bulb might be much longer than the feasible timescale for an experimental study. By gathering failure time data on a component when it is subjected to abnormal stressor levels, such as high or low ambient temperature or humidity, you can model the component's lifetime characteristics and determine quantities such as the failure rate and mean failure time under normal operating conditions.

To perform survival analysis:

  • Fit a model to your data. Use one or more of the functions listed on this page under Lifetime Data Analysis or Cox Proportional Hazards Models.

  • Plot or otherwise analyze the fitted model using the methods in the examples listed on this page under Topics, or using Cox Proportional Hazards Models functions. The fitcox function provides an object-oriented way to fit a Cox proportional hazards model. The resulting CoxModel object contains many statistics and methods for analysis. coxphfit is an older function for fitting Cox models that also enables code generation.

To perform accelerated lifetime analysis:

  • Fit a model to your data by creating an AcceleratedLifeModel object using the fitacclife function. This function allows you to specify the type of life stress model and life distribution that best suits your data.

  • Use one or more of the methods listed on this page under Accelerated Lifetime Analysis to compute mean failure times, distribution functions, and failure probabilities at specific stressor levels, and to create plots.

Functions

expand all

ksdensityKernel smoothing function estimate for univariate and bivariate data
mleMaximum likelihood estimates
mlecovAsymptotic covariance of maximum likelihood estimators
evfitExtreme value parameter estimates
expfitExponential parameter estimates
gamfitGamma parameter estimates
lognfitLognormal parameter estimates
normfitNormal parameter estimates
wblfitWeibull parameter estimates
fitdistFit probability distribution object to data
ecdfEmpirical cumulative distribution function
ecdfhistHistogram based on empirical cumulative distribution function
plotSurvivalPlot survival function of Cox proportional hazards model
probplotProbability plots
wblplotWeibull probability plot

Fit Accelerated Lifetime Model

fitacclifeFit accelerated life model (Since R2026a)

AcceleratedLifeModel Methods

accelfactorAcceleration factors of accelerated life model (Since R2026a)
coefciConfidence intervals for accelerated life model coefficients (Since R2026a)
distfcnDistribution functions of accelerated life model (Since R2026a)
distplotPlot distribution functions of accelerated life model (Since R2026a)
icdfInverse cumulative distribution function of accelerated life model (Since R2026a)
meanfailplotPlot failure times of accelerated life model (Since R2026a)
meanfailtimeMean failure times and life distribution coefficients of accelerated life model (Since R2026a)
probplotPlot failure probabilities of accelerated life model (Since R2026a)

Fit Cox Proportional Hazards Model

coxphfitCox proportional hazards regression

Fit CoxModel Object

fitcoxCreate Cox proportional hazards model

CoxModel Methods

coefciConfidence interval for Cox proportional hazards model coefficients
discardResidualsRemove residuals from Cox model (Since R2022b)
hazardratioEstimate Cox model hazard relative to baseline
linhyptestLinear hypothesis tests on Cox model coefficients
plotSurvivalPlot survival function of Cox proportional hazards model
survivalCalculate survival of Cox proportional hazards model

Objects

CoxModelCox proportional hazards model
AcceleratedLifeModelAccelerated life model for lifetime analysis (Since R2026a)

Topics