Cox proportional hazards

Time-varying covariates and censoring

Continuously time-varying covariates

Four ways to handle ties: Breslow, exact partial likelihood, exact marginal likelihood, and Efron

Robust, cluster–robust, bootstrap, and jackknife standard errors

Stratified estimation

Shared frailty models

Sampling weights and survey data

Multiple imputation

Martingale, efficient score, Cox–Snell, Schoenfeld, and deviance residuals

Likelihood displacement values, LMAX values, and DFBETA influence measures

Harrell’s C, Somers’ D, and Gönen and Heller’s K statistics measuring concordance

Tests for proportional hazards

Graphs of estimated survivor, hazard, and cumulative hazard functions

Watch How to fit a Cox PH model and check PH assumption.

 

Competing-risks regression

Fine and Gray proportional subhazards model

Time-varying covariates

Robust, cluster–robust, bootstrap, and jackknife standard errors

Multiple imputation

Efficient score and Schoenfeld residuals

DFBETA influence measures

Subhazard ratios

Cumulative subhazard and cumulative incidence graphs

 

Parametric survival models

Weibull, exponential, Gompertz, lognormal, loglogistic, or generalized gamma model

Robust, cluster–robust, bootstrap, and jackknife standard errors

Stratified models

Individual-level frailty

Group-level or shared frailty

Sampling weights and survey data

Multiple imputation

Martingale-like, score, Cox–Snell, and deviance residuals

Graphs of estimated survivor, hazard, and cumulative hazard functions

Predictions and estimates

Mean or median time to failure

Mean or median log time

Hazard

Hazard ratios

Survival probabilities

 

Interval-censored parametric survival models 

Weibull, exponential, Gompertz, lognormal, loglogistic, or generalized gamma

Both proportional-hazards and accelerated failure-time metrics

Robust, cluster–robust, bootstrap, and jackknife standard errors

Stratified models

Sampling weights and survey data

Flexible modeling of ancillary parameters

Martingale-like, score, and Cox–Snell residuals

Graphs of estimated survivor, hazard, and cumulative hazard functions

Predictions and estimates

Mean or median time to failure

Mean or median log time

Hazard

Hazard ratios

Survival probabilities

Watch Parametric models for interval-censored survival-time data.

 

Finite mixtures of parametric survival models

Weibull, exponential, Gompertz, lognormal, loglogistic, or generalized gamma

Both proportional-hazards and accelerated failure-time metrics

Robust, cluster–robust, bootstrap, and jackknife standard errors

Sampling weights and survey data

Postestimation

 

Bayesian parametric survival models

Weibull, exponential, Gompertz, lognormal, loglogistic, or generalized gamma

Both proportional-hazards and accelerated failure-time metrics

Stratified models

Individual-level frailty

Group-level or shared frailty

Flexible modeling of ancillary parameters

Postestimation

 

Bayesian multilevel parametric survival models

Weibull, exponential, lognormal, loglogistic, or gamma

Both proportional-hazards and accelerated failure-time metrics

Two-, three-, and higher-level models

Nested and crossed random effects

Random intercepts and random coefficients

Flexible modeling of ancillary parameters

Postestimation

Treatment-effects estimation for observational survival-time data*

Regression adjustment

Inverse-probability weighting (IPW)

Doubly robust methods

IPW with regression adjustment

Weighted regression adjustment

Weibull, exponential, gamma, or lognormal outcome model

Average treatment effects (ATEs)

ATEs on the treated (ATETs)

Potential-outcome means (POMs)

Robust, bootstrap, and jackknife standard errors

Watch Treatment effects for survival models.

 

Random-effects parametric survival models*

Weibull, exponential, lognormal, loglogistic, or gamma model

Robust, cluster–robust, bootstrap, and jackknife standard errors

Watch Panel-data survival models.

 

Multilevel mixed-effects parametric survival models*

Weibull, exponential, lognormal, loglogistic, or gamma models

Robust and cluster–robust standard errors

Sampling weights and survey data

Marginal predictions and marginal means

Watch Multilevel survival analysis.

 

Structural equation models with survival outcomes*

Latent predictors of survival outcomes

Path models, growth curve models, and more

Weibull, exponential, lognormal, loglogistic, or gamma models

Survival outcomes with other outcomes

Sampling weights and survey data

Marginal predictions and marginal means

Watch Survival models for SEM.

 

Features of survival models

Single- or multiple-failure data

Left-truncation

Right-censoring

Time-varying regressors

Gaps

Recurring events

Start–stop format

Different types of failure events

Multiple time scales allowed

 

Postestimation Selector*

View and run all postestimation features for your command

Automatically updated as estimation commands are run

Watch Postestimation Selector.

 

Life tables and analysis

Graphs and tables of estimates and confidence intervals

Mean survival times and confidence intervals

Cox regression adjustments

Actuarial adjustments

Tests of equality: log-rank, Cox, Wilcoxon–Breslow–Gehan, Tarone–Ware, Peto–Peto–Prentice, and Fleming–Harrington

Tests for trend

Stratified test

Watch How to construct life tables.

Watch How to calculate the Kaplan–Meier survivor and Nelson–Aalen cumulative hazard functions.

Watch How to test the equality of survivor functions.

 

Power analysis

Solve for sample size, power, or effect size

Log-rank test of survival curves

Cox proportional hazards model

Clustered Data

Exponential regression

See all the power and sample size features.

 

Utilities

Create nested case–control datasets

Split and join time records

Convert snapshot data into time-span data

Watch How to set up your data for survival analysis.

 

Obtain summary statistics, confidence intervals, etc.

Confidence intervals for incidence-rate ratio and difference

Confidence intervals for means and percentiles of survival time

Tabulate failure rate

Calculate person-time (person-years), incidence rates, and standardized mortality/morbidity ratios (SMR)

Calculate rate ratios with the Mantel–Haenszel or Mantel–Cox method

Watch How to describe and summarize survival data.

Watch How to calculate incidence rates and incidence-rate ratios.

 

Graphs of survivor, hazard, or cumulative hazard function

Kaplan–Meier survival or failure function

Nelson–Aalen cumulative hazard

Graphs and comparative graphs

Confidence bands

Embedded risk tables

Adjustments for confounders

Stratification

Watch How to graph survival curves.

 

Additional resources

An Introduction to Survival Analysis Using Stata, Revised Third Edition by Mario Cleves, William Gould, and Yulia V. Marchenko

Flexible Parametric Survival Analysis Using Stata: Beyond the Cox Model by Patrick Royston and Paul C. Lambert

In the spotlight: Competing-risks regression

NetCourse 631: Introduction to Survival Analysis Using Stata