Why Stratification Changes the Intercept Story
In a case-control study, cases and controls are selected rather than sampled in their population proportions. If that selection is performed separately within strata, such as hospitals or age groups, each stratum can have a different ratio of case to control sampling fractions. The resulting sample can still carry information about a common logistic slope, but its stratum-specific intercepts generally do not equal the population intercepts.
The distinction matters for two different tasks. Estimating associations may be possible from the sampled logistic model, while predicting absolute risks requires accounting for how cases and controls were sampled in each stratum. The derivation below makes clear which quantities change and which do not.
The assumption about sampling is consequential: within a given outcome and stratum, inclusion must not depend further on covariates. The fractions may differ across strata and between cases and controls. The model also assumes that the population slope \(\beta\) is common to all strata; it does not require the population baseline risks to be equal.
From Population Risk to Sampled Risk
Among people with covariates \(x\) in stratum \(h\), the sampled case probability follows from conditioning on inclusion. The population case and noncase probabilities are multiplied by their respective inclusion probabilities, then normalized by the total inclusion probability.
Taking the odds cancels the normalizing denominator. This gives the central identity for stratified case-control sampling.
This result is about the conditional outcome model among included people. It does not say that the sample has the population distribution of \(X\), nor that the sample proportion of cases estimates population prevalence. It says that, under the stated selection assumption, the sampled conditional odds at fixed \(x,h\) are the population conditional odds multiplied by a stratum-specific constant.
Worked Example: Computing Sampled Risks in Two Strata
Suppose \(X\) is binary and the population model has \(\alpha_1=\alpha_2=-3\) and \(\beta=\log 2\). In stratum 1, let \(\rho_{11}=0.40\) and \(\rho_{01}=0.20\); in stratum 2, let \(\rho_{12}=0.10\) and \(\rho_{02}=0.50\). Find the population and sampled risks at \(X=1\).
At \(X=1\), the population log odds in either stratum are \(-3+\log 2\), so the population odds are \(2e^{-3}\approx0.09957\). The population risk is therefore \(0.09957/(1+0.09957)\approx0.0906\).
For stratum 1, the sampling-fraction ratio is \(0.40/0.20=2\). The sampled odds are \(2(0.09957)=0.19915\), and the sampled risk is \(0.19915/(1+0.19915)\approx0.1661\). Equivalently, \(\delta_1=\log 2\), so the sampled log odds are \(-3+\log2+\log2\).
For stratum 2, the ratio is \(0.10/0.50=0.2\). The sampled odds are \(0.2(0.09957)=0.01991\), giving sampled risk \(0.01991/(1+0.01991)\approx0.0195\). Here \(\delta_2=\log(0.2)\). The population risks agree across strata in this example, but the sampled risks differ substantially because the sampling ratios differ.
Likelihood Contributions and the Common Slope
For a sample modeled as independent observations conditional on their covariates and strata, let observation \(i\) have outcome \(y_i\in\{0,1\}\), covariate vector \(x_i\), and stratum \(h_i\). With sampled intercepts \(\gamma_h\), its Bernoulli likelihood contribution is \(q_{h_i}(x_i)^{y_i}\{1-q_{h_i}(x_i)\}^{1-y_i}\). Multiplying contributions gives the sampled conditional likelihood.
This likelihood uses the sampled intercepts \(\gamma_h\), not the population intercepts \(\alpha_h\), unless the sampling-fraction ratios are incorporated. For an individual case, the contribution is the fitted sampled probability \(q_h(x)\); for an individual control, it is \(1-q_h(x)\).
More formally, under the selection assumption and a correctly specified population model, the sampled conditional distribution itself belongs to the logistic family with parameters \((\gamma_1,\ldots,\gamma_H,\beta)\). If this sampled model is identifiable and regular, its likelihood is maximized at those sampled-model parameters in the population limit. The common slope parameter in that model is the same \(\beta\) as in the population model. As with any likelihood fit, finite-sample estimates need not equal the true parameters; separation or insufficient covariate variation can also prevent a finite, identifiable estimate.
Worked Example: Building the Sampled Likelihood
Consider four sampled observations. Two are in stratum 1: a case with \(x=0\), and a control with \(x=1\). Two are in stratum 2: a control with \(x=0\), and a case with \(x=1\). Let \(\gamma_1=-1\), \(\gamma_2=0.5\), and \(\beta=\log2\). Write and evaluate their joint conditional likelihood.
The four linear predictors, in the order listed, are \(-1\), \(-1+\log2\), \(0.5\), and \(0.5+\log2\). Applying the case contribution \(q\) and the control contribution \(1-q\), the likelihood is
The four factors are approximately \(0.26894\), \(0.57612\), \(0.37754\), and \(0.76730\). Their product is approximately \(0.0449\). For example, the second factor is the probability of a control at predictor \(-1+\log2\approx-0.30685\), namely \(1-\operatorname{expit}(-0.30685)\approx0.57612\). Using the sampled intercepts in these contributions is essential: the observations came from the sampled, not population, conditional outcome distribution.
Why Each Stratum Needs Its Own Intercept
The preservation of a common slope relies on allowing every stratum’s intercept to absorb its own sampling shift. If the model instead forces one shared intercept, then the stratum-specific terms \(\delta_h\) cannot generally be represented. When stratum membership is associated with covariates, this omitted structure can distort the fitted slope.
Worked Example: A Shared Intercept Can Confound the Slope
Let \(X\) be binary and suppose the population risk is \(0.20\) at both \(X=0\) and \(X=1\) in both strata. Thus the population slope is zero. Suppose all sampled observations with \(X=0\) are in stratum 1, where \(\rho_{11}/\rho_{01}=4\), and all sampled observations with \(X=1\) are in stratum 2, where \(\rho_{12}/\rho_{02}=1/4\). Compare their sampled risks.
The population odds are \(0.20/0.80=0.25\). At \(X=0\), the sampled odds are \(4(0.25)=1\), so the sampled risk is \(1/(1+1)=0.50\). At \(X=1\), the sampled odds are \((1/4)(0.25)=0.0625\), so the sampled risk is \(0.0625/(1+0.0625)=1/17\approx0.0588\).
A logistic regression with one shared intercept and a slope for \(X\), ignoring stratum, sees lower sampled risk at \(X=1\) than at \(X=0\). It can therefore attribute a negative slope to \(X\), even though the population slope is zero. The correct stratified sampled model has separate intercepts, allowing the different selection shifts to be represented without assigning them to \(X\).
Correcting Intercepts and Predicting Population Risk
If the sampling-fraction ratios are known and a fitted sampled model gives \(\hat\gamma_h\) and \(\hat\beta\), the population intercept estimate is obtained by subtracting the stratum-specific shift. The resulting stratum-specific population risk follows by applying the inverse-logit function. This correction is about the intercept; it does not require changing the common slope under the model assumptions.
A pooled risk for a target population is not generally obtained by averaging stratum intercepts and then applying the inverse logit. If the target population has stratum proportions \(w_h\), where \(w_h\geq0\) and \(\sum_{h=1}^H w_h=1\), its risk at a specified covariate value \(x\) is the weighted average of the stratum-specific risks:
Worked Example: Correcting and Pooling Risks
Suppose fitted sampled intercepts are \(\hat\gamma_1=-1\) and \(\hat\gamma_2=0.5\), with \(\hat\beta=\log2\) for a binary covariate. The known case-to-control sampling-fraction ratios are 2 in stratum 1 and \(1/2\) in stratum 2. For \(x=0\), calculate the corrected stratum risks and the pooled risk when the target stratum proportions are \(w_1=0.7\) and \(w_2=0.3\).
In stratum 1, \(\hat\alpha_1=-1-\log2\approx-1.6931\), so \(\hat p_1(0)=\operatorname{expit}(-1.6931)\approx0.1554\). In stratum 2, \(\hat\alpha_2=0.5-\log(1/2)=0.5+\log2\approx1.1931\), giving \(\hat p_2(0)=\operatorname{expit}(1.1931)\approx0.7673\).
The target-population pooled risk is \(0.7(0.1554)+0.3(0.7673)\approx0.1088+0.2302=0.3390\). For comparison, the uncorrected sampled risks at \(x=0\) would be \(\operatorname{expit}(-1)\approx0.2689\) and \(\operatorname{expit}(0.5)\approx0.6225\), whose weighted average is about \(0.3750\). That number describes neither the corrected stratum risks nor their target-population average.
Conditions, Interpretation, and a Common Pitfall
The derivation depends on the selection mechanism and model, not merely on calling a study “case-control.” Within each stratum, inclusion must depend on outcome through \(\rho_{1h}\) and \(\rho_{0h}\), but not additionally on \(X\). Both fractions must be positive so sampled cases and controls can represent the corresponding population groups. The population logistic model must also be correctly specified with a common slope and stratum-specific intercepts. If the true slope varies by stratum, a single common slope is not the correct population model.
A common mistake is to treat the sample case proportion as the population prevalence, or to correct all strata using one overall intercept shift. The first ignores outcome-dependent sampling; the second ignores that \(\rho_{1h}/\rho_{0h}\) can vary with \(h\). The correction must use each stratum’s own log ratio. Further, the target weights \(w_h\) in a pooled prediction must describe the target population, not automatically the sampled study. The sampling design may alter how many people from each stratum appear in the data.
Check Your Understanding
Answer each question using the sampling assumptions stated in this tutorial.
- In stratum \(h\), the case and control sampling fractions are \(0.30\) and \(0.10\). What is the sampled-minus-population intercept shift?
- Why does a stratum-specific intercept allow the common population slope to be preserved when sampling ratios differ across strata?
- What additional selection condition is needed beyond having different case and control sampling fractions?
- A fitted sampled intercept is \(0.8\), and the known case-to-control sampling-fraction ratio is \(3\). What is the corresponding corrected population intercept?
- Why can target-population pooled risk not generally be calculated by averaging stratum intercepts before applying the inverse logit?