Tutorials › Statistical Genetics › Case-Control Ascertainment and Risk Calibration

Selection and Bias in Prediction · Tutorial 786 of 989

Case-Control Ascertainment and Risk Calibration

Learn to correct absolute-risk estimates from case-control data and understand what an intercept correction can—and cannot—change about polygenic-score performance.

Advanced 10 min read

What You'll Learn

  • Explain how outcome-dependent sampling changes observed disease prevalence.
  • Derive the intercept shift between a target population and a case-control sample.
  • Recalibrate score-based absolute risks to a specified target prevalence.
  • Distinguish intercept recalibration from changes to score discrimination.
  • Identify assumptions that make a prevalence-based correction appropriate.

Why Case-Control Sampling Changes Absolute Risk

Case-control studies are often efficient for evaluating genetic associations and polygenic scores: investigators select a set number of people with disease and without disease, then measure their scores. This design deliberately changes the proportion of cases in the analyzed data. As a result, the sample’s case fraction is generally not the disease prevalence in the population where absolute risk is needed.

That difference matters for prediction. A logistic model fitted to case-control data can, under specific sampling assumptions, estimate score effects on the log-odds scale correctly while giving misleading absolute risks if its sample intercept is used without adjustment. The central task is to separate the score’s relative ordering of risk from the baseline risk level set by prevalence.

Definition: Let \(Y=1\) denote disease and \(Y=0\) no disease. The target prevalence \(K\) is \(P_t(Y=1)\) in the population where absolute risks are intended to apply. The sample prevalence \(q\) is the observed fraction of cases in the case-control sample. Under case-control ascertainment, \(q\) is commonly set by design and need not estimate \(K\).

For example, a study might recruit equal numbers of cases and controls, so \(q=0.50\), even when the disease prevalence in the target population is \(K=0.10\). A model that assigns risks as if half of the target population had disease will generally overstate absolute risk. The size of the error depends on the sampling design and model; it is not repaired merely by having a large case-control sample.

When the Logistic Slopes Are Preserved

Write \(X\) for a predictor, such as a polygenic score \(S\), or a vector of predictors. Suppose the target-population disease model is logistic:

$$ \operatorname{logit} P_t(Y=1\mid X) =\alpha_t+\beta^\top X, \qquad \operatorname{logit}(p)=\log\!\left(\frac{p}{1-p}\right). $$

Assume people are sampled with probability \(\pi_1\) if they are cases and probability \(\pi_0\) if they are controls. The key conditions are that these probabilities depend on disease status but, within each disease group, do not depend further on \(X\); cases and controls represent the corresponding groups in the target population; disease status is defined consistently; and the target logistic model is correctly specified. Under these conditions, selection changes the intercept but not the slopes.

To see why, let \(P_s\) denote probabilities in the ascertained sample. By Bayes’ rule, the sample odds for a given \(X\) are the target odds multiplied by the ratio of sampling probabilities:

$$ \frac{P_s(Y=1\mid X)}{P_s(Y=0\mid X)} = \frac{\pi_1P_t(Y=1\mid X)} {\pi_0P_t(Y=0\mid X)} = \frac{\pi_1}{\pi_0} \frac{P_t(Y=1\mid X)}{P_t(Y=0\mid X)}. $$

Taking logarithms gives the sample model. Since the multiplier \(\pi_1/\pi_0\) is constant across \(X\), it adds a constant to the log-odds and leaves every slope unchanged.

$$ \operatorname{logit} P_s(Y=1\mid X) = \left(\alpha_t+\log\frac{\pi_1}{\pi_0}\right) +\beta^\top X. $$

This result does not say that any model fitted to case-control data automatically transports to a target population. If selection within case or control groups depends on the score, if the model is misspecified, or if the target population differs in relevant ways, the simple intercept-only correction need not suffice.

Correcting the Intercept Using Prevalence

The preceding result can be expressed using the sample and target prevalences. Under the stated sampling conditions, the sampling odds ratio is related to the prevalence odds:

$$ \operatorname{logit}(q) = \operatorname{logit}(K)+\log\frac{\pi_1}{\pi_0}. $$

Thus, if a logistic model fitted in the case-control sample has intercept \(\alpha_s\), its target-population counterpart is obtained by shifting the intercept by the difference between target and sample prevalence logits. The slope vector stays fixed.

Result: With outcome-dependent sampling that is independent of predictors within outcome groups, the prevalence-based intercept correction is $$ \alpha_t = \alpha_s+\operatorname{logit}(K)-\operatorname{logit}(q). $$ The corrected absolute risk at predictors \(X\) is \(\operatorname{expit}(\alpha_t+\beta^\top X)\), where \(\operatorname{expit}(z)=1/(1+e^{-z})\). In a finite sample, the observed \(q\) is a plug-in estimate of the sample prevalence; uncertainty in \(K\), \(q\), and the fitted coefficients should be considered when reporting uncertainty.

Worked Example: Correcting a Case-Control Model’s Baseline Risk

Suppose a hypothetical case-control study has sample prevalence \(q=0.50\), and a target population has disease prevalence \(K=0.10\). A fitted sample model for a score \(S\) is \(\operatorname{logit}P_s(Y=1\mid S)=-1.20+0.80S\). Assume the sampling and model conditions above hold. Find the corrected intercept and compare the predicted risk at \(S=0\).

The prevalence-logit difference is \(\operatorname{logit}(0.10)-\operatorname{logit}(0.50) =\log(0.10/0.90)-\log(0.50/0.50) =-2.1972-0=-2.1972\). Therefore, \(\alpha_t=-1.20-2.1972=-3.3972\), while the score slope remains \(0.80\).

At \(S=0\), the uncorrected sample model gives \(\operatorname{expit}(-1.20)=1/(1+e^{1.20})=0.2315\), or about 23.15%. The corrected target-population model gives \(\operatorname{expit}(-3.3972)=1/(1+e^{3.3972})\approx0.0324\), or about 3.24%.

These are model-based risks for a person with score \(S=0\), not the overall prevalence. The target prevalence is 10%; an individual at the reference score can have a risk below that prevalence if higher scores are also represented in the target population.

Calibrating Risks to a Target Prevalence

A prevalence-based intercept shift is one route to calibrated absolute risk. Another is to use a representative target-population score distribution and choose the intercept so that the average predicted risk equals the known target prevalence. This is called calibration in the large: it aligns the mean predicted risk with the population event frequency, while leaving the score slope fixed.

For target-population scores \(S_1,\ldots,S_N\) and a fixed slope \(\beta\), choose \(\alpha\) to satisfy:

$$ \frac{1}{N}\sum_{i=1}^{N} \operatorname{expit}(\alpha+\beta S_i)=K. $$

The left-hand side is a continuous, strictly increasing function of \(\alpha\), since each term increases as \(\alpha\) increases. It approaches 0 as \(\alpha\) tends to negative infinity and 1 as \(\alpha\) tends to positive infinity. Therefore, for \(0<K<1\), there is a unique intercept solving this equation. In practice it can be found numerically. The score distribution used in this calculation should represent the target population; otherwise the mean predicted risk may not correspond to the population for which risks are reported.

Worked Example: Choosing an Intercept to Match Prevalence

Consider a hypothetical target population represented by three equally frequent score values, \(S=-1,0,1\). Fix the slope at \(\beta=0.80\), and suppose the target prevalence is \(K=0.10\). Find an intercept that makes the mean predicted risk 0.10.

For any proposed \(\alpha\), the three risks are \(\operatorname{expit}(\alpha-0.80)\), \(\operatorname{expit}(\alpha)\), and \(\operatorname{expit}(\alpha+0.80)\). The intercept must solve \(\{\operatorname{expit}(\alpha-0.80)+\operatorname{expit}(\alpha)+\operatorname{expit}(\alpha+0.80)\}/3=0.10\).

Numerical solution gives approximately \(\alpha=-2.3624\). Substitution gives risks of approximately \(\operatorname{expit}(-3.1624)=0.0406\), \(\operatorname{expit}(-2.3624)=0.0861\), and \(\operatorname{expit}(-1.5624)=0.1733\). Their mean is \((0.0406+0.0861+0.1733)/3=0.1000\) to four decimal places.

The three risks differ because the score differs, yet their population average matches the specified prevalence. This calibration is conditional on the chosen slope and the assumed target score distribution; it does not establish that the individual risks are otherwise correct.

Calibration and Discrimination Are Different

Calibration concerns agreement between predicted risks and observed disease frequencies. A model with good calibration assigns risks whose averages correspond to observed frequencies at relevant levels of prediction. Discrimination concerns how well the model ranks people with disease above people without disease; the area under the receiver operating characteristic curve (AUC) is a common ranking summary.

An intercept-only correction changes predicted risk values but preserves their ordering whenever the slope and predictors are unchanged. More generally, adding a constant to every linear predictor is a strictly increasing transformation of predicted risk, so the rankings—and hence the AUC—are unchanged, absent ties or numerical rounding. Calibration can therefore improve while discrimination remains exactly the same. Conversely, an unchanged AUC does not show that absolute risks are accurate.

Worked Example: Same Ranking, Different Absolute Risks

Use the hypothetical model from the first example: the sample model is \(-1.20+0.80S\), and the target-prevalence correction is \(-2.1972\). Compare four people with scores \(1.5,1.0,0.5,-0.5\).

The uncorrected linear predictors are \(0.00,-0.40,-0.80,-1.60\), giving sample-model risks \(\operatorname{expit}(0)=0.5000\), \(\operatorname{expit}(-0.40)=0.4013\), \(\operatorname{expit}(-0.80)=0.3100\), and \(\operatorname{expit}(-1.60)=0.1680\).

Subtracting \(2.1972\) from each predictor gives corrected risks of approximately \(\operatorname{expit}(-2.1972)=0.1000\), \(\operatorname{expit}(-2.5972)=0.0693\), \(\operatorname{expit}(-2.9972)=0.0476\), and \(\operatorname{expit}(-3.7972)=0.0219\), respectively.

Both sets rank the four people in the same order: the person with the highest score has the highest predicted risk, followed by the next-highest score, and so on. The numerical risks, however, are substantially different. The correction addresses the baseline risk level; it cannot make a poorly ranking score discriminate well.

Assumptions, Limits, and a Common Mistake

Before applying a correction, check what the sample represents and what prevalence is being targeted. In particular, cases and controls should be sampled representatively within their disease groups, the case and control definitions should match the target outcome, and the target prevalence should refer to the relevant population and time horizon. The logistic relationship should be adequate, and the score’s relationship with disease should transport to the target population. A prevalence correction alone does not repair biased score slopes, model misspecification, or differences in the score–disease relationship.

The simple intercept shift based on \(q\) and \(K\) follows from the outcome-dependent sampling model. When a representative target score distribution is available, solving for an intercept that makes the mean predicted risk equal \(K\) is a direct calibration-in-the-large procedure. These approaches are related but rely on different information: the former uses the case-control prevalence contrast under its sampling assumptions; the latter explicitly averages predictions over a target score distribution.

  • Common mistake: “The sample contains 50% cases, so the disease prevalence is 50%, and the fitted risks can be reported directly.” The case fraction may have been fixed by recruitment and is not generally a population prevalence.
  • Correction: Use the target prevalence and the sampling design to correct the model’s baseline risk, while checking that the assumptions supporting the correction are plausible.
  • Common mistake: “If the AUC is unchanged after recalibration, then the risk estimates were already valid.” An unchanged AUC only reflects preserved rankings; it does not establish calibration.
  • Correction: Assess absolute-risk calibration separately from discrimination, and report the target population and prevalence underlying the risks.
  • Common mistake: “An intercept correction fixes any case-control bias.” It corrects a constant outcome-dependent sampling shift, not selection that varies with score within outcome groups or changes in score effects across populations.
Key takeaway: Case-control ascertainment changes the sample disease prevalence and, under outcome-dependent sampling, shifts the logistic intercept while preserving slopes. Recalibrate absolute risks to the intended population; do not confuse this correction with improved discrimination.

Check Your Understanding

Answer each question using the sampling assumptions and distinctions developed above.

  1. A case-control study has sample prevalence \(q=0.40\), while its target population has prevalence \(K=0.08\). Write the prevalence-based correction to a fitted sample intercept.
  2. Under what condition on sampling within cases and controls is the logistic slope preserved by case-control ascertainment?
  3. Why can an individual with score \(S=0\) have a predicted target risk below the target population prevalence?
  4. What equation would you solve to calibrate the mean predicted risk to \(K\) using a representative set of target-population scores?
  5. Why does a pure intercept shift leave AUC unchanged but potentially change decisions made using a fixed absolute-risk threshold?
Clinical Biostats