Riley 2020 - Anticipating the Cox-Snell R2 and Its Maximum

Summary

The shrinkage and optimism criteria need one hard-to-know input: the anticipated Cox-Snell of the new model, which measures signal:noise. For continuous outcomes it is the ordinary . For binary and survival outcomes it is capped at max(), which depends on the outcome proportion: 0.75, 0.74, 0.71, 0.63, 0.48, 0.33 and 0.11 at prevalence 0.5, 0.4, 0.3, 0.2, 0.1, 0.05 and 0.01. Nagelkerke’s rescales it to . Fig 4 gives three ways to choose : (1) take it from existing models in the same setting; (2) convert from reported C statistic, LR statistic, Royston’s D or other pseudo-s, adjusting for optimism; (3) default to , i.e. , or 0.5 when “direct” mechanistic predictors are present.

Overview

Every overfitting-based sample size depends on how much signal the model is expected to find. Anticipating plays the role that anticipating an effect size plays in a trial power calculation (p. 3): external evidence and expert opinion are needed, and when unsure the choice should be conservative (smaller , hence larger ).

Main Content

Definition: Cox-Snell (p. 3; Cox & Snell 1989)

is a generalised coefficient of determination. Standard form (not printed in the PDF):

with the null-model likelihood and LR the likelihood-ratio . For linear regression with normal errors it equals the usual , the proportion of outcome variance explained. It reflects the signal:noise ratio: near 1 means patterns are easy to detect and more parameters can be estimated; near 0 means overfitting is likely and fewer parameters can be estimated reliably.

Definition: max( ) and Nagelkerke (pp. 3-4)

For binary and time-to-event outcomes is bounded by , attained by a perfect model. It depends on the outcome proportion or rate and is often much less than 1. For continuous outcomes the maximum is 1.

Nagelkerke’s rescales: , called “a fundamental overall measure of model fit” (p. 4).

max( ) for logistic regression (p. 3; derivation in supplementary S5)

outcome proportion 0.50.40.30.20.10.050.01
max()0.750.740.710.630.480.330.11

Reconstruction (S5 not in the PDF). For a binary outcome, , so

This reproduces the table: 0.750, 0.740, 0.705, 0.632, 0.478, 0.328, 0.106.

Consequence: “the anticipated R2cs might be small, even for a model with potentially good performance” (p. 3). At a prevalence of 0.05, an excellent model still has .

Fig 4: how to choose the anticipated (p. 11)

Choosing before data collection (Fig 4)

  1. Use values reported directly for existing models. Look for reported (or requestable) for prediction models in the same or similar population, outcome and time point. Sources: systematic reviews of prediction models (ref 36) and model registries (e.g. Tufts PACE, ref 37). When the new model updates or extends an existing model in the same setting with similar outcome proportion, the existing model’s is a conservative value for the new one.
  2. Derive from other reported performance measures. Riley et al. 2019 (Part II) show how to recover from the likelihood-ratio statistic, the C statistic (AUC), Royston’s D, or other pseudo-s: Nagelkerke’s, McFadden’s, O’Quigley’s, Royston’s, and Royston & Sauerbrei’s. If the value comes from a development study, adjust it for optimism first to get an honest estimate.
  3. No existing information: default. Assume , i.e. (Fig 4: “such that 15% of the total variance is explained”). Medical diagnosis and prognosis are generally low signal:noise, with commonly 0.1-0.2. Exception: with “direct” (mechanistic) predictors, such as the baseline version of the outcome (smoking status at baseline to predict smoking at one year) or direct process measures (physiological function in intensive care to predict death within 48 h), use , i.e. .

Examples

Applying the default (Example 1, p. 4-5)

Pre-eclampsia, , so . Assume conservatively 15% of variability explained: .

Using a reported adjusted value (Example 2, p. 5)

Recurrent VTE model: C statistic 0.69, adjusted , “corresponding to 8% of the total variation”. This value is used directly as the conservative anticipated .

Verified max( ) (python)

import math
maxR2 = lambda p: 1 - math.exp(2*(p*math.log(p) + (1-p)*math.log(1-p)))
print([round(maxR2(p), 2) for p in (.5, .4, .3, .2, .1, .05, .01)])
# [0.75, 0.74, 0.71, 0.63, 0.48, 0.33, 0.11]

Marketing-analytics illustration (not from the paper)

For a conversion model with base rate 0.02, . A “decent” model at has . With 40 candidate features, B3 then needs users, about 266 conversions (EPP 6.6). The low base rate keeps the event count modest, but the low signal pushes up. For a weekly aggregate-KPI regression (continuous), the anticipated should be an out-of-sample figure from comparable past models, adjusted for optimism, not the in-sample fit that trend and seasonality inflate.

Connections

See Also