Tutorials › Statistical Genetics › Calibration-in-the-Large and Calibration Slope

Individual Risk and Clinical Utility · Tutorial 762 of 989

Calibration-in-the-Large and Calibration Slope

Use observed outcomes and predicted risks to separate overall risk misalignment from predictions that are too extreme or too moderate.

Advanced 11 min read

What You'll Learn

  • Define calibration-in-the-large using an intercept with the prediction coefficient fixed at one
  • Estimate and interpret the calibration slope from a logistic recalibration model
  • Distinguish systematic underprediction or overprediction from overly extreme or compressed predictions
  • Work through numerical examples using observed event proportions and predicted risks
  • Recognize the assumptions and limits of these diagnostics for fixed-horizon outcomes

Why Separate Calibration Level From Calibration Slope?

An absolute-risk prediction is useful only if its numerical values correspond adequately to observed event frequencies in the population and time period where it will be used. A model can rank people in a sensible order yet systematically give risks that are too high or too low. It can also give predictions whose spread is too wide or too narrow, even if the average predicted risk is close to the average observed risk. Calibration-in-the-large and the calibration slope summarize these two distinct features.

Consider predictions for an event by a specified time horizon. Let \(Y_i=1\) if person \(i\) experiences the event by that horizon and \(Y_i=0\) otherwise, and let \(p_i\) be that person’s predicted absolute risk. The logit of the predicted risk is \(z_i=\operatorname{logit}(p_i)=\log\{p_i/(1-p_i)\}\). The diagnostics below compare these predictions with outcomes in a validation sample; they do not establish that a prediction causes an outcome.

Definition: Calibration-in-the-large is the intercept \(a\) in a logistic model for the observed outcome that uses the predicted logit \(z_i\) as an offset, fixing its coefficient at one: \(\operatorname{logit}\{P(Y_i=1)\}=a+z_i\). Its ideal value is \(a=0\). The calibration slope \(b\) is the coefficient of \(z_i\) in the logistic recalibration model \(\operatorname{logit}\{P(Y_i=1)\}=a+bz_i\), with an intercept estimated as well. The ideal slope is \(b=1\).

The offset in calibration-in-the-large is important: this diagnostic estimates a shift in overall level without also changing the spread of predictions. By contrast, the slope comes from a model in which both the intercept and slope are free. Thus, its estimate is not simply the coefficient from the calibration-in-the-large model, and the intercept estimated jointly with the slope need not equal calibration-in-the-large.

Reading the Intercept and Slope

In the calibration-in-the-large model, a positive \(a\) shifts predicted log-odds upward; the predictions, on average, are too low for the validation outcomes. A negative \(a\) shifts them downward; predictions are, on average, too high. These are overall tendencies, not guarantees that every risk group is miscalibrated in the same direction. A value near zero indicates little overall level shift, but does not demonstrate calibration across the entire range of predicted risks.

The slope describes how strongly observed log-odds vary with predicted log-odds after allowing a constant shift. If \(b<1\), observed differences are less pronounced than the predictions imply: high predictions tend to be too high and low predictions tend to be too low, after accounting for the intercept. This is often described as predictions being too extreme. If \(b>1\), observed differences are more pronounced: predictions tend to be too moderate, with high predictions too low and low predictions too high after accounting for the intercept. A slope of one means the fitted relationship has the same log-odds spread as the predictions, not that every subgroup is perfectly calibrated.

Diagnostic patternTypical interpretationWhat it does not establish
Calibration-in-the-large \(a>0\)Overall predictions tend to be too lowThat all risk groups are underpredicted
Calibration-in-the-large \(a<0\)Overall predictions tend to be too highThat ranking or risk spread is correct
Calibration slope \(b<1\)Predictions tend to be too extremeThat a constant intercept shift alone will fix calibration
Calibration slope \(b>1\)Predictions tend to be too moderateThat the overall risk level is correct

Estimating Calibration-in-the-Large

For independent individuals with fully observed binary outcomes by a common horizon, estimate \(a\) by fitting a logistic regression with \(z_i\) as an offset and \(a\) as the intercept. In a simple case where every individual has the same predicted risk \(p\), the estimate has a direct form. If the observed event proportion is \(\hat p\), the fitted risk is \(\operatorname{expit}(a+\operatorname{logit}(p))\), where \(\operatorname{expit}(u)=1/(1+\exp(-u))\). Setting this fitted risk equal to \(\hat p\) gives \(a=\operatorname{logit}(\hat p)-\operatorname{logit}(p)\).

Worked Example: Diagnosing Overall Underprediction

Suppose a hypothetical validation sample contains 200 people, each with a predicted 10-year event risk of 12%. By 10 years, 30 people have experienced the event. Assume each person’s event status is known and the predictions apply to this same population and horizon. Estimate calibration-in-the-large.

The observed event proportion is \(\hat p=30/200=0.15\), while the average predicted risk is \(p=0.12\). Since every prediction is the same, the offset-model estimate is the difference between their logits:

$$ \hat a=\operatorname{logit}(0.15)-\operatorname{logit}(0.12) =\log\left(\frac{0.15}{0.85}\right)-\log\left(\frac{0.12}{0.88}\right) \approx -1.73460-(-1.99243)=0.25783. $$

The positive estimate indicates overall underprediction in this sample. Adding the estimate to the predicted logit gives \(-1.99243+0.25783=-1.73460\), whose expit is 0.15. Thus the fitted risk is 15%, matching the observed event proportion. This example assesses only the overall level; because everyone has the same predicted risk, it cannot assess whether predictions are too spread out or too compressed.

Estimating and Interpreting the Slope

To estimate the calibration slope, fit the logistic model \(\operatorname{logit}\{P(Y_i=1)\}=a+bz_i\) with both coefficients free. The intercept permits an overall shift while the slope estimates the relationship between predicted and observed log-odds. In typical validation data, estimation uses the individual outcomes and predictions, rather than treating a few groups as the entire data set. The following grouped example makes the arithmetic transparent because the fitted model reproduces each group’s observed proportion exactly.

Worked Example: A Slope Above One

In hypothetical validation data, 100 people were assigned a predicted risk of 10% and another 100 a predicted risk of 40%. There were 5 events in the first group and 50 in the second. Assume independent observations and complete event ascertainment by the stated horizon. Calculate the logistic recalibration slope and intercept.

The two predicted logits are \(z_1=\operatorname{logit}(0.10)\approx-2.19722\) and \(z_2=\operatorname{logit}(0.40)\approx-0.40547\). The observed event proportions are 0.05 and 0.50, with logits \(\operatorname{logit}(0.05)\approx-2.94444\) and \(\operatorname{logit}(0.50)=0\). The fitted line through these two points has slope

$$ \hat b=\frac{0-(-2.94444)}{-0.40547-(-2.19722)} =\frac{2.94444}{1.79175}\approx1.643. $$

Using the second group to obtain the intercept gives \(\hat a=0-\hat b(-0.40547)\approx0.6663\). The fitted logits are therefore approximately \(-2.9444\) for the first group and 0 for the second, corresponding to risks of 5% and 50%. The slope above one indicates that the difference in observed log-odds between these groups is greater than the difference in their predicted logits. In this example, the 10% prediction is above the observed 5%, while the 40% prediction is below the observed 50%: the predictions are too moderate. The positive jointly estimated intercept should not be substituted for calibration-in-the-large, which fixes the slope at one.

A Calibration Model as a Risk Adjustment

The fitted recalibration model can also be used to illustrate how a predicted risk changes under the estimated intercept and slope. For a given original risk \(p\), calculate \(z=\operatorname{logit}(p)\), then map it to \(\operatorname{expit}(\hat a+\hat b z)\). This calculation is an adjustment implied by the fitted model, not a guarantee that the adjusted risk will be calibrated in a new population. Its usefulness depends on the validation data being relevant to the population and outcome horizon of interest.

Worked Example: A Slope Below One

Suppose a hypothetical validation analysis estimates a joint recalibration intercept of \(-0.20\) and a calibration slope of \(0.80\). What adjusted risk corresponds to an original predicted risk of 5%? Assume the logistic recalibration model is suitable for the setting in which this illustrative adjustment is applied.

First, the original predicted logit is \(z=\operatorname{logit}(0.05)=\log(0.05/0.95)\approx-2.94444\). The adjusted log-odds are

$$ -0.20+0.80(-2.94444)=-2.55555. $$

Converting back to risk gives

$$ \operatorname{expit}(-2.55555) =\frac{1}{1+\exp(2.55555)} \approx0.07205. $$

The adjusted risk is about 7.205%, or 7.21% to three significant figures. Although the slope below one pulls a negative predicted logit toward zero, the negative intercept shifts log-odds downward. In this case their combined effect changes the 5% prediction to approximately 7.21%. The slope alone does not determine whether a particular risk rises or falls; the intercept and the original logit both matter.

Justification: Why the Offset Intercept Tracks Overall Level

For the calibration-in-the-large model, write \(q_i(a)=\operatorname{expit}(a+z_i)\). Under independent Bernoulli outcomes, the log-likelihood for \(a\), apart from constants, is \(\ell(a)=\sum_i [Y_i\log q_i(a)+(1-Y_i)\log\{1-q_i(a)\}]\). Since \(dq_i/da=q_i(1-q_i)\), differentiating gives the score

$$ \frac{d\ell(a)}{da}=\sum_i\{Y_i-q_i(a)\}. $$

At a finite maximum-likelihood estimate, the score is zero, so \(\sum_i q_i(\hat a)=\sum_i Y_i\). The total fitted number of events therefore equals the observed number of events. When every \(z_i\) is the same, all fitted probabilities are equal, and this equality says that the fitted risk equals the observed event proportion, as used in the first example. With varying predictions, the equality concerns the overall totals; it does not require each risk stratum to match its observed event rate.

The slope model has a different purpose: it asks how observed log-odds change as predicted log-odds change, while estimating a free intercept. Both parameters are obtained by maximizing the Bernoulli likelihood for that model. This distinction is why an estimated joint intercept and calibration slope should be reported as a pair when describing the recalibration relationship, while calibration-in-the-large is specifically assessed with slope fixed at one.

Assumptions, Limits, and a Common Pitfall

These logistic formulations directly apply when the target is a binary event by a fixed horizon and outcome status is adequately observed for the validation individuals. Predictions and observed outcomes must refer to the same event definition, horizon, and target population. If follow-up is censored before the horizon, treating an individual without a recorded event as a known non-event can bias calibration estimates; appropriate survival or competing-risk calibration methods are needed instead. Dependence between observations, such as clustering, also affects standard errors and should be handled in the analysis.

Neither statistic summarizes every form of miscalibration. A model can have \(a\) near zero and \(b\) near one yet show curved or subgroup-specific discrepancies that cancel in the aggregate. Calibration plots and other checks can reveal patterns that a single intercept and slope cannot. Estimates are also subject to sampling variability, especially when events are few or predictions occupy a narrow range.

  • Common mistake: “Calibration-in-the-large is the intercept from a model that estimates both intercept and slope.” Correction: Calibration-in-the-large fixes the coefficient of predicted logit at one; the jointly estimated intercept belongs to the separate slope model.
  • Common mistake: “A slope below one means all risks are too high.” Correction: It usually indicates predictions are too extreme: high risks tend to be too high and low risks too low after accounting for the intercept.
  • Common mistake: “An intercept near zero and slope near one prove perfect calibration.” Correction: They indicate little global shift and an approximately correct log-odds spread, but can miss nonlinear or subgroup-specific errors.
Key takeaway: Calibration-in-the-large measures a global log-odds shift with slope fixed at one; the calibration slope measures whether predicted log-odds are too spread out or too compressed while allowing a separate intercept. Interpret them together, in the population and time horizon for which the risks are intended.

Check Your Understanding

Answer each question using the definitions and distinctions in this tutorial.

  1. In a calibration-in-the-large model, what is fixed at one, and what does a positive intercept indicate?
  2. Explain the usual interpretation of a calibration slope below one, including how low and high predictions tend to compare with outcomes.
  3. A validation sample has an observed event proportion higher than its average predicted risk. What direction of calibration-in-the-large intercept would this suggest, and why?
  4. Why is the jointly estimated intercept from the calibration-slope model not automatically the calibration-in-the-large estimate?
  5. Why can an intercept near zero and a slope near one fail to reveal all calibration problems?
Clinical Biostats