Tutorials › Generalized Linear Models › Why Case-Control Sampling Preserves Logistic Slopes

Case-Control and Sampling Designs · Tutorial 964 of 981

Why Case-Control Sampling Preserves Logistic Slopes

Learn why outcome-only sampling shifts logistic log odds by a constant while preserving every covariate slope, and when that conclusion is valid.

Advanced 10 min read

What You'll Learn

  • State the selection condition that makes the logistic slope result valid
  • Derive the selected-sample conditional odds from Bayes' rule
  • Verify slope preservation with numerical case-control calculations
  • Distinguish preservation of slopes from preservation of the intercept
  • Recognize how covariate-dependent selection can change slopes
  • Identify modeling and support conditions needed for interpretation

Why the Sampling Mechanism Matters

In a prospective study, the numbers of people with and without an outcome arise from the population being studied. In a case-control study, researchers instead select people according to outcome status, often sampling more cases than would occur naturally. That changes the outcome frequency in the observed sample. The important question is whether it also changes the logistic relationship between outcome and covariates.

The answer depends on how selection is carried out. If, within each outcome group, selection does not depend on the covariates, it multiplies the outcome odds by the same factor at every covariate value. A constant multiplication changes the log-odds intercept, but not its covariate slopes. The argument is an exact identity for conditional probabilities; it does not require the outcome to be rare.

Definition: Let \(Y\in\{0,1\}\) be an outcome, \(X\) a covariate vector, and \(S=1\) indicate inclusion in the analyzed sample. Outcome-group-only sampling means that there are constants \(s_0,s_1\), with \(0<s_0,s_1\leq 1\), such that \(P(S=1\mid Y=y,X=x)=s_y\) for \(y=0,1\) and all covariate values \(x\) in the population support. Thus selection can differ between cases and noncases, but within either outcome group it is constant across covariates.

Suppose the population conditional distribution follows the logistic regression model \(\operatorname{logit}P(Y=1\mid X=x)=\alpha+x^\mathsf{T}\beta\), where \(\operatorname{logit}(p)=\log\{p/(1-p)\}\). Here \(\alpha\) is the population intercept and \(\beta\) is the vector of population slopes. We derive the corresponding conditional model among selected individuals.

The Selection Identity

Write \(p(x)=P(Y=1\mid X=x)\) for the population outcome probability and \(p_S(x)=P(Y=1\mid X=x,S=1)\) for the probability conditional on inclusion. Assume \(P(S=1\mid X=x)>0\) at covariate values under consideration. By the definition of conditional probability, the selected-sample odds are

$$ \frac{p_S(x)}{1-p_S(x)} = \frac{P(Y=1,S=1\mid X=x)} {P(Y=0,S=1\mid X=x)}. $$

Applying the selection condition to the numerator and denominator gives the central identity.

Theorem: Under outcome-group-only sampling, at every \(x\) for which the conditional probabilities are defined, \(0<P(Y=1\mid X=x)<1\), and selection has positive probability, \[ \frac{P(Y=1\mid X=x,S=1)}{P(Y=0\mid X=x,S=1)} = \frac{s_1}{s_0} \frac{P(Y=1\mid X=x)}{P(Y=0\mid X=x)}. \] If the population outcome model is logistic with linear predictor \(\alpha+x^\mathsf{T}\beta\), then the selected-sample conditional model is logistic with linear predictor \(\alpha+\log(s_1/s_0)+x^\mathsf{T}\beta\). In particular, its covariate slope vector is \(\beta\).

The result follows directly from the joint conditional probabilities. The proof also makes clear which part depends on the sampling design.

1
Express each selected outcome probability.
Using conditional probability and the sampling condition, \(P(Y=1,S=1\mid X=x)=s_1p(x)\), while \(P(Y=0,S=1\mid X=x)=s_0\{1-p(x)\}\).
2
Form the selected odds.
The ratio of these probabilities is \(\{s_1/s_0\}\{p(x)/(1-p(x))\}\). The factors \(s_1,s_0\) are constant in \(x\).
3
Take logarithms and substitute the population model.
The log of the selected odds is \(\log(s_1/s_0)+\operatorname{logit}p(x)=\alpha+\log(s_1/s_0)+x^\mathsf{T}\beta\). The added term is constant in \(x\), so every covariate coefficient remains \(\beta\).

This identity is a statement about the conditional outcome distribution among selected individuals. It does not say that the sample has the same case fraction as the population, nor that its intercept equals the population intercept. It also does not say that every feature of the joint distribution of \(X\) and \(Y\) is unchanged.

Worked Consequences

Worked Example: A Binary Exposure and Unequal Sampling

Suppose \(X\in\{0,1\}\) and the population model is \(\operatorname{logit}P(Y=1\mid X=x)=-2+x\log 3\). Cases are sampled with probability \(s_1=0.5\), and noncases with probability \(s_0=0.2\), independently of exposure within each outcome group. Find the selected model and check its odds ratio numerically.

The sampling odds multiplier is \(s_1/s_0=0.5/0.2=2.5\). Therefore the selected logit is \[ -2+\log(2.5)+x\log 3. \] The intercept has changed, but the coefficient of \(x\) is still \(\log 3\), so the selected odds ratio comparing \(X=1\) with \(X=0\) is \(e^{\log 3}=3\).

At \(x=0\), the population odds are \(e^{-2}\); after selection they are \(2.5e^{-2}\). Hence \[ P(Y=1\mid X=0,S=1) =\frac{2.5e^{-2}}{1+2.5e^{-2}} =\frac{2.5}{e^2+2.5} \approx 0.2528. \] At \(x=1\), the population odds are \(e^{-2}e^{\log 3}=3e^{-2}\); the selected odds are \(7.5e^{-2}\). Thus \[ P(Y=1\mid X=1,S=1) =\frac{7.5e^{-2}}{1+7.5e^{-2}} =\frac{7.5}{e^2+7.5} \approx 0.5037. \] The selected odds are \(2.5e^{-2}\) and \(7.5e^{-2}\), so their ratio is \((7.5e^{-2})/(2.5e^{-2})=3\), confirming the slope calculation.

Worked Example: Two Covariates

Let the population model be \(\operatorname{logit}P(Y=1\mid X_1=x_1,X_2=x_2)=-1.5+0.7x_1-0.4x_2\). Suppose cases are sampled with probability \(0.6\) and noncases with probability \(0.15\), with no further dependence on either covariate. Determine the selected coefficients, and compare the selected odds at two covariate profiles.

The sampling odds multiplier is \(0.6/0.15=4\), so the intercept shift is \(\log 4\approx1.3863\). The selected linear predictor is \[ (-1.5+\log 4)+0.7x_1-0.4x_2 \approx -0.1137+0.7x_1-0.4x_2. \] The slope of \(X_1\) remains \(0.7\), and the slope of \(X_2\) remains \(-0.4\). For fixed \(x_2\), increasing \(x_1\) by one multiplies the odds by \(e^{0.7}\approx2.014\), both before and after selection. For fixed \(x_1\), increasing \(x_2\) by one multiplies the odds by \(e^{-0.4}\approx0.6703\) in both distributions.

For a direct profile comparison, take \((x_1,x_2)=(0,0)\) and \((1,1)\). The population log-odds difference is \[ (0.7-0.4)-0=0.3, \] so the population odds ratio is \(e^{0.3}\approx1.350\). The selected log-odds at the two profiles are \(-0.1137\) and \(-0.1137+0.7-0.4=0.1863\); their difference is also \(0.3\). The selected odds ratio is therefore the same \(e^{0.3}\), as required.

Worked Example: Why Covariate-Independent Selection Is Essential

Suppose \(X\in\{0,1\}\) and the population model has intercept \(0\) and slope \(\log 2\). The population odds are \(1\) at \(X=0\) and \(2\) at \(X=1\), giving a population odds ratio of \(2\). Now let noncases have selection probability \(s_0(x)=0.5\) at both exposure values, but let cases have probability \(s_1(0)=0.25\) and \(s_1(1)=0.5\).

At \(X=0\), the selection odds multiplier is \(0.25/0.5=0.5\), so the selected odds are \(1(0.5)=0.5\), and the selected probability is \(0.5/(1+0.5)=1/3\). At \(X=1\), the multiplier is \(0.5/0.5=1\), so the selected odds are \(2(1)=2\), and the selected probability is \(2/(1+2)=2/3\).

The selected odds ratio is \(2/0.5=4\), not \(2\). Equivalently, the selected log-odds difference is \(\log 2-\log 0.5=\log 4\), rather than \(\log 2\). The selection multiplier varies with \(X\), so its logarithm contributes to the slope. This design does not satisfy outcome-group-only sampling.

What the Result Does and Does Not Guarantee

More generally, the proof establishes a useful odds-ratio statement that does not depend on coding a covariate as binary. For any two covariate values \(x\) and \(x'\) with defined probabilities, the selected log-odds contrast equals the population contrast:

$$ \operatorname{logit}p_S(x)-\operatorname{logit}p_S(x') = \operatorname{logit}p(x)-\operatorname{logit}p(x'). $$

The constant \(\log(s_1/s_0)\) cancels when subtracting. Thus, if the population model is logistic and linear in the specified covariates, the selected distribution has the same covariate contrasts and the same slopes. The result applies to categorical indicators, continuous predictors, and interaction terms included in the linear predictor: all their coefficients are unchanged under the stated sampling condition. The intercept is the constant term, so it is the part that absorbs the sampling odds multiplier.

Several qualifications matter in practice. First, the population logistic specification must be correct for the slope claim to identify the population model's \(\beta\) as the selected model's coefficient vector. If the true log odds are not linear in the chosen predictors, outcome-group-only selection still adds a constant to the true log odds function. However, fitting a misspecified linear logistic model can produce different best-fitting slopes because the selected sample may have a different covariate distribution.

Second, selection must have positive probability in both outcome groups over the covariate values being compared. If an outcome group is never observed in a region, its conditional odds there cannot be recovered from the selected sample. Third, a coefficient can be identified only when the design contains enough covariate variation to distinguish the model terms; the selection identity cannot fix a rank-deficient design or guarantee a finite estimate in a particular data set.

Finally, preserving the conditional slopes is not the same as preserving every aspect of inference. The selected sample has been assembled under an outcome-dependent design, and its outcome prevalence is generally not the population prevalence. This tutorial's result concerns the conditional logistic relationship and its slopes; it does not by itself justify treating the observed sample proportion as a population risk or settle how uncertainty should be estimated.

Common Mistake

A common mistake is to reason that because the sample contains an artificially large proportion of cases, every logistic regression coefficient must be biased. That conclusion treats all coefficients as if they played the same role. Under outcome-group-only sampling, the case-to-noncase sampling ratio multiplies the odds by a constant at every covariate value. Taking logarithms adds a constant, which changes the intercept but leaves covariate contrasts unchanged. The opposite mistake is to claim that case-control sampling always preserves slopes. The numerical counterexample above shows why that is false when selection probabilities vary with covariates within outcome groups.

Key takeaway: If \(P(S=1\mid Y=y,X=x)=s_y\) is constant in \(x\) within each outcome group, then selected odds equal population odds times \(s_1/s_0\). A correctly specified population logistic model consequently has the same selected-sample slopes, while its constant term changes.

Check Your Understanding

Use the selection identity to answer the following questions.

  1. In words, state the condition on selection probabilities that is needed for the logistic slopes to be preserved.
  2. If \(s_1=0.3\) and \(s_0=0.1\), by what factor are the outcome odds multiplied among selected individuals?
  3. Why does a factor that is constant across \(x\) change the intercept but not the slope in a logistic model?
  4. In the third worked example, what feature of the design makes the selected odds ratio differ from the population odds ratio?
  5. Does the slope-preservation identity imply that the selected sample's outcome proportion estimates the population prevalence? Explain briefly.
Clinical Biostats