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
- Select Analysis > Kaplan-Meier... from the menu bar
- Select the Time Variable
- Select the Event Variable (0/1 or boolean)
- Optionally select a Group Variable for group comparison
- Click Run Analysis
Understanding Results
Survival Curve
Plots survival probability 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
| Column | Description |
|---|---|
| Group | Group name (when Group Variable is specified) |
| n | Number of observations |
| Events | Number of events |
| Median | Median survival time (time when ; 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).
| Item | Description |
|---|---|
| Chi-squared | Test statistic |
| df | Degrees of freedom (= number of groups - 1) |
| p-value | p-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
- Select Analysis > Cox Regression... from the menu bar
- Select the Time Variable
- Select the Event Variable
- Select one or more Covariates (numeric only)
- Click Run Analysis
To use categorical variables as covariates, convert them with Dummy Coding first.
Understanding Results
Coefficients
| Column | Description |
|---|---|
| Variable | Variable name |
| Coefficient | Regression coefficient |
| Hazard Ratio | |
| 95% CI | 95% confidence interval for the hazard ratio (fixed, not adjustable) |
| z value | Wald statistic |
| p-value | p-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
| Metric | Description |
|---|---|
| Likelihood Ratio Test | Null hypothesis: all . Generally most stable in finite samples |
| Wald Test | Null hypothesis: all . Based on the estimated covariance matrix |
| Score Test | Evaluated at . 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
- Survival Analysis Fundamentals - Mathematical background of time-to-event data, Kaplan-Meier, and Cox model
- Tutorial: Kaplan-Meier Analysis - A practical example with sample data