The Cox Regression Tab
The Cox Regression tab fits the Cox proportional hazards model, a semiparametric model that estimates the effect of covariates on hazard (formulation and theory). Evaluate the simultaneous impact of multiple variables on survival time. See Survival Analysis Fundamentals for the mathematical background.
To compare groups defined by a single categorical variable, use The Kaplan-Meier Tab.
Data Requirements
Cox regression requires a time variable, an event variable, and one or more covariates:
- Time variable: Time to event (numeric)
- Event variable: Indicates whether the event occurred. The following formats are supported:
- int64: 1 = event, 0 = censored
- Boolean: true = event, false = censored
- Covariates: Numeric columns with interval or ratio scale, or boolean columns
float64 columns cannot be selected as the event variable. If a column stores 0/1 values as decimals, convert it to int64 with The Convert Column Types Tab.
Columns whose scale is set to nominal or ordinal, as well as date/datetime columns, are grayed out in the covariate list and cannot be selected. To use categorical variables with three or more levels as covariates, convert them with Dummy Coding first (boolean variables can be selected directly).
See Survival Analysis Fundamentals for how censoring is handled. MIDAS only supports right censoring. Left censoring, interval censoring, and competing risks are not supported.
Basic Usage
- Select Analysis > Survival Analysis > Cox Regression... from the menu bar
- Select the Time Variable
- Select the Event Variable
- Select one or more Covariates
- Click Run Analysis

Understanding Results
Cox Proportional Hazards Regression

The upper coefficients table shows the following columns for each covariate.
| Column | Description |
|---|---|
| Variable | Variable name |
| Coef | Regression coefficient |
| SE | Standard error |
| HR | Hazard ratio |
| CI | Confidence interval for the hazard ratio. The column header reflects the selected confidence level (e.g., "95% CI") |
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.
Below the table, model fit metrics are reported.
| Metric | Description |
|---|---|
| Concordance Index | Harrell's C statistic. The proportion of comparable pairs where the risk score ordering agrees with the event ordering. 0.5 means no discrimination, 1.0 means perfect discrimination. The standard error in parentheses is based on the influence function |
| AIC | Akaike Information Criterion (), where is the partial log-likelihood and is the number of coefficients. Used for model comparison |
| Log Partial Likelihood | Partial log-likelihood , the basis for AIC |
Adjusted Survival Curve

The adjusted survival curve plots predicted survival probability for a specific set of covariate values . It is computed from the baseline cumulative hazard and the estimated coefficients (formulation).
Each covariate has an input field, defaulting to the sample mean. Changing a value updates the curve immediately, so you can compare predicted survival across different covariate profiles. Reset to Means restores the defaults.
Baseline Cumulative Hazard
Below the adjusted survival curve, the baseline cumulative hazard table lists the following values at each event time point.
| Column | Description |
|---|---|
| Time | Event time |
| At Risk | Number of subjects in the risk set |
| Events | Number of events at this time |
| H₀(t) | Cumulative baseline hazard |
| S₀(t) | Baseline survival function |
The baseline corresponds to all covariates set to zero. When zero is not a realistic value given the variable scales, use the adjusted survival curve with realistic covariate values (such as the sample mean) to inspect .
Proportional Hazards Diagnostics

Below the coefficients table and model fit statistics, MIDAS displays diagnostics for the proportional hazards assumption. The Cox model assumes that covariate effects are constant over time — this is the proportional hazards assumption (details). When it breaks down, can only be interpreted as a weighted average over time.
Proportional Hazards Diagnostics
Displays the correlation between scaled Schoenfeld residuals and time for each covariate (Grambsch & Therneau, 1994). Uses the KM time transformation .
| Column | Description |
|---|---|
| Variable | Variable name |
| rho | Pearson correlation between scaled Schoenfeld residuals and a Kaplan-Meier-based time transform. Values close to 0 are consistent with the assumption |
Covariates with a large absolute rho may have effects that change over time. Since rho alone does not reveal the pattern or severity of the departure, inspect the Schoenfeld residual plots below. MIDAS uses rho together with visual inspection of the plots, and does not display a test statistic or p-value.
Scaled Schoenfeld Residuals
For each covariate, plots scaled Schoenfeld residuals against time. The red curve is a LOESS smooth; the dashed gray line is the estimated coefficient . Under proportional hazards, residuals scatter randomly around and the LOESS line stays close to horizontal. An upward or downward trend in the LOESS line indicates that the covariate's effect varies over time.
Log-Log Survival Plot
Plots group-specific Kaplan-Meier estimates as versus . Select the grouping covariate from the Grouping Variable dropdown. When the selected covariate has five or fewer distinct values, each value forms its own group; with six or more, observations are split into two groups at the median. The median split is a convenience that discards some information from the continuous variable and may miss (or exaggerate) non-proportionality at the continuous scale. For continuous covariates, the Schoenfeld residual plot above is better suited for diagnosing the proportional hazards assumption. Under proportional hazards, the curves are approximately parallel. Curves that cross or change their separation over time suggest a violation.
When the diagnostics above suggest a violation of the proportional hazards assumption, approaches such as stratified Cox models or time-dependent covariate models can address it, but MIDAS does not currently support them. Interpret results with care, considering the severity of the violation and the goals of the analysis. If the goal is to compare groups defined by a single categorical variable, Kaplan-Meier with RMST is an alternative that does not rely on the proportional hazards assumption, although it cannot adjust for covariates.
Notes
- Tied events (multiple events at the same time) are handled using the Efron method (details)
- When convergence fails, the results show Convergence: No. Coefficient estimates may be unstable; consider reducing the number of covariates or rescaling covariates
- Separation (monotone likelihood): When a covariate separates the event ordering so strongly that its coefficient diverges, the partial likelihood has no finite maximum and the estimate does not exist. MIDAS stops the fit and reports an error that names the affected covariates. Check whether a covariate, or a category of one, perfectly determines which subject has the event at each event time, and whether there are too few events for the number of covariates. Remove or combine the separating covariate, or reduce the number of covariates, then refit
- Non-finite variance: When a covariate spans an extreme range, the variance computation can overflow or become undefined, so the standard errors cannot be computed and the fit stops with an error. Rescale or standardize the covariates, then refit
- Rows with missing values in the time, event, or any covariate variable are automatically excluded (listwise deletion; see Missing Data Mechanisms for validity conditions). When rows are excluded, the results show the number of excluded rows as "N rows excluded due to missing values."
See also
- Survival Analysis Fundamentals - Mathematical background of time-to-event data, Kaplan-Meier, and Cox model
- The Kaplan-Meier Tab - Estimating survival curves and comparing groups with RMST
- Tutorial: Kaplan-Meier Analysis - A practical example with sample data
References
- Grambsch, P. M. and Therneau, T. M. (1994). Proportional hazards tests and diagnostics based on weighted residuals. Biometrika, 81(3), 515--526. https://www.jstor.org/stable/2337123
Also available as a Markdown file.