Survival Analysis

MIDAS provides two survival analysis methods:

  • Kaplan-Meier: Estimate survival curves and compare groups (log-rank test). Visually assess differences in survival between groups and test whether they differ
  • Cox Regression: Estimate the effect of covariates on hazard. Evaluate the simultaneous impact of multiple variables on survival time

See Survival Analysis Fundamentals for the mathematical background.

Data Requirements

Survival analysis requires two variables:

  • Time variable: Time to event (numeric)
  • Event variable: Whether the event occurred (0 = censored, 1 = event)

See Survival Analysis Fundamentals for how censoring is handled.

Kaplan-Meier

The Kaplan-Meier method is a nonparametric estimator of the survival function (formulation).

Basic Usage

  1. Select Analysis > Kaplan-Meier... from the menu bar
  2. Select the Time Variable
  3. Select the Event Variable (0/1 or boolean)
  4. Optionally select a Group Variable for group comparison
  5. Click Run Analysis

Understanding Results

Survival Curve

Plots survival probability S(t)S(t) against time. Displayed as a step function that decreases at each event time. Censoring times are marked with a + symbol on the curve. A + mark on a flat segment indicates that subjects were lost to follow-up during that interval. A pointwise confidence band (95% by default) is shown. A pointwise band consists of individual intervals at each time point and does not guarantee simultaneous coverage of the entire curve, computed using the log transformation method (details).

Adjust the confidence level with the Confidence Level slider.

Summary Statistics

ColumnDescription
GroupGroup name (when Group Variable is specified)
nNumber of observations
EventsNumber of events
MedianMedian survival time (time when S(t)=0.5S(t) = 0.5; NR if not reached)

Number at Risk

Shows the number of subjects still at risk (not yet experienced the event) at each time point.

Log-rank Test

Displayed when a Group Variable is specified. Tests whether survival curves differ between groups. The log-rank test has maximum power under the proportional hazards assumption. Power decreases when survival curves cross (details).

ItemDescription
Chi-squaredTest statistic
dfDegrees of freedom (= number of groups - 1)
p-valuep-value

Observed events, expected events, and their ratio (O/E) are also shown per group.

Notes

  • Rows with missing values in the time or event variable are automatically excluded

Adding to Reports

Click Add to Report to add the survival curve to a report.

Cox Regression

The Cox proportional hazards model is a semiparametric model that estimates the effect of covariates on hazard (formulation and theory).

Basic Usage

  1. Select Analysis > Cox Regression... from the menu bar
  2. Select the Time Variable
  3. Select the Event Variable
  4. Select one or more Covariates (numeric only)
  5. Click Run Analysis

To use categorical variables as covariates, convert them with Dummy Coding first.

Understanding Results

Coefficients

ColumnDescription
VariableVariable name
CoefficientRegression coefficient β\beta
Hazard Ratioexp(β)\exp(\beta)
95% CI95% confidence interval for the hazard ratio (fixed, not adjustable)
z valueWald statistic
p-valuep-value

A hazard ratio greater than 1 indicates that an increase in the covariate raises the hazard; less than 1 indicates it lowers the hazard. See Survival Analysis Fundamentals for detailed interpretation.

Model Fit

MetricDescription
Likelihood Ratio TestNull hypothesis: all β=0\beta = 0. Generally most stable in finite samples
Wald TestNull hypothesis: all β=0\beta = 0. Based on the estimated covariance matrix
Score TestEvaluated at β=0\beta = 0. Can be computed even when convergence is problematic

The three tests yield similar results in large samples. When they disagree, prefer the likelihood ratio test.

Notes

  • When convergence fails, a warning is displayed in the results. The Score test can still be computed in this case, providing a basis for assessing model usefulness
  • Tied events are handled using the Efron method (details)
  • Rows with missing values in the time, event, or any covariate variable are automatically excluded. Compare n (observations) in the results with the original row count to check how many rows were excluded

See also