Cox Regression NRI Reclassification Calculator in R

Compare two survival risk models with categorical NRI. Enter reclassification counts for events and non-events. Download complete results as CSV or PDF files easily.

Calculator

Enter counts from the reclassification table at your chosen Cox model time horizon.

Example Data Table

Group Correct upward or downward movement Wrong movement No movement Total
Events 42 moved up 18 moved down 140 200
Non-events 95 moved down 55 moved up 610 760

Formula Used

The categorical Net Reclassification Improvement is calculated as:

NRI = [P(up | event) - P(down | event)] + [P(down | non-event) - P(up | non-event)]

The event part rewards cases that move to a higher predicted risk group. The non-event part rewards controls that move to a lower predicted risk group.

Approximate variance is estimated with multinomial movement proportions:

SE = sqrt(Var(event component) + Var(non-event component))

The confidence interval is:

NRI ± Z × SE

R Workflow Example

library(survival)

old_model <- coxph(Surv(time, status) ~ age + sex, data = df)
new_model <- coxph(Surv(time, status) ~ age + sex + marker, data = df)

old_lp <- predict(old_model, type = "lp")
new_lp <- predict(new_model, type = "lp")

old_cat <- cut(old_lp, breaks = quantile(old_lp, c(0, .33, .66, 1)),
               include.lowest = TRUE)
new_cat <- cut(new_lp, breaks = quantile(new_lp, c(0, .33, .66, 1)),
               include.lowest = TRUE)

table(old_cat, new_cat, df$status)

How to Use This Calculator

Fit the old and new Cox models first. Choose a fixed survival time horizon. Create risk groups for both models. Then compare the old and new risk groups. Count events moving up, events moving down, non-events moving down, and non-events moving up. Enter unchanged counts too. Press calculate to see the total NRI, components, interval, z score, and p value.

Understanding Cox Model Reclassification NRI

Purpose of the Measure

Net Reclassification Improvement checks whether a newer Cox regression model sorts people into better risk groups. It compares the old model with the updated model. The updated model may include a new marker, score, treatment variable, or clinical factor. The goal is simple. Events should move upward. Non-events should move downward. These movements show better risk separation.

Event and Non-Event Logic

For subjects who experienced the outcome, an upward risk movement is helpful. A downward movement is harmful. For subjects who did not experience the outcome, a downward movement is helpful. An upward movement is harmful. The calculator measures both sides separately. Then it adds them to produce total NRI.

Why Cox Models Need Care

Cox regression works with survival time and censoring. Reclassification should therefore use a clear prediction time, such as three years or five years. The same time point should be used for both models. Risk categories must also be clinically meaningful. Arbitrary cutoffs can make the NRI difficult to interpret.

Using Results in Research

A positive NRI suggests improvement. A negative NRI suggests worse reclassification. A confidence interval crossing zero means the improvement may be uncertain. Researchers should also review calibration, discrimination, and clinical usefulness. NRI should not be reported alone. It is best used with C-index change, calibration plots, and decision curve analysis.

Practical Interpretation

Suppose the event component is 0.12 and the non-event component is 0.05. The total NRI is 0.17. This means the new model improved net classification by seventeen percentage points. The result is stronger when the interval is above zero. Always explain the event rate, sample size, risk cutoffs, and follow-up period. Clear reporting makes the statistic useful. It also helps readers judge whether the improvement is clinically meaningful, not only statistically significant. Use consistent data cleaning, validated outcomes, and transparent category definitions before trusting the final NRI estimate.

FAQs

1. What is NRI in a Cox regression model?

NRI measures whether a newer Cox model moves subjects into better risk categories than an older model. It checks event and non-event movement separately.

2. What is a good NRI value?

A positive NRI is usually better than zero. Larger positive values suggest stronger reclassification improvement, but clinical meaning depends on categories and study design.

3. Can this calculator use continuous NRI?

This version calculates categorical NRI. It uses upward, downward, and unchanged movement counts from defined risk groups.

4. Why are events and non-events treated differently?

Events should move to higher predicted risk. Non-events should move to lower predicted risk. The formula rewards those correct movements.

5. What does a negative NRI mean?

A negative NRI means the new model caused more incorrect net movement than correct movement. It may not improve risk classification.

6. Should I enter censored subjects?

Use counts from a valid survival reclassification method at a fixed time horizon. Handle censoring before preparing the movement table.

7. What standard error should I use?

You may use the calculator estimate. If your statistical software gives a bootstrap or robust standard error, enter it manually.

8. Can I export the result?

Yes. Submit the form with the CSV or PDF button. The exported file includes counts, NRI, interval, z score, and interpretation.

Related Calculators

Paver Sand Bedding Calculator (depth-based)Paver Edge Restraint Length & Cost CalculatorPaver Sealer Quantity & Cost CalculatorExcavation Hauling Loads Calculator (truck loads)Soil Disposal Fee CalculatorSite Leveling Cost CalculatorCompaction Passes Time & Cost CalculatorPlate Compactor Rental Cost CalculatorGravel Volume Calculator (yards/tons)Gravel Weight Calculator (by material type)

Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.