Tutorials › High-Dimensional Genomic Data Analysis › Odds Ratios Under Case-Control Sampling

Single-Variant GWAS · Tutorial 229 of 795

Odds Ratios Under Case-Control Sampling

Understand when a case-control logistic-regression slope estimates a population odds ratio and why its fitted intercept does not directly give disease prevalence.

Intermediate 12 min read

What You'll Learn

  • State the sampling conditions that preserve logistic-regression odds ratios.
  • Derive how case and control sampling shifts the model intercept.
  • Interpret a genotype coefficient under case-control sampling.
  • Distinguish a model intercept from population disease prevalence.
  • Recognize how exposure-dependent sampling can distort an odds ratio.
  • Compare case-control estimates with estimates from population-based sampling.

Why Sampling Design Matters

In a case-control study, investigators select people because they have or do not have a disease, then compare their genotypes or other exposures. The proportion of cases in the resulting sample is set by the design, not by the disease frequency in the population. This raises two different questions: does selecting on disease status change the genotype odds ratio, and what can the fitted logistic-regression intercept tell us?

Under standard sampling conditions, the answer to the first question is reassuring: outcome-based selection changes the intercept but leaves the exposure slopes unchanged. The answer to the second is more cautious: the fitted intercept reflects the case-to-control sampling ratio as well as the population model, so it does not directly estimate population prevalence.

Population and Sampled Logistic Models

Let \(Y=1\) indicate disease and \(Y=0\) indicate no disease. Let \(X\) be a genotype dosage, coded as 0, 1, or 2 copies of the effect allele, and let \(Z\) denote measured covariates. In the source population, suppose the conditional disease probability follows the logistic model

$$ \operatorname{logit}\{P(Y=1\mid X,Z)\} =\log\!\left(\frac{P(Y=1\mid X,Z)}{1-P(Y=1\mid X,Z)}\right) =\alpha+\beta X+\gamma^{T}Z. $$

Here, \(\beta\) is the change in conditional log odds of disease for one additional effect-allele copy, holding \(Z\) fixed. The corresponding per-allele odds ratio is \(\exp(\beta)\). The model must be appropriately specified for the covariates and genotype effect being analyzed; in particular, the linear predictor must represent the relevant conditional log odds.

Definition: Outcome-based case-control sampling selects observations with probabilities that depend on disease status but, within each disease group, do not depend on genotype or covariates in a way that changes the exposure comparison. In the simplest design, \(P(S=1\mid Y=1,X,Z)=\pi_1\) and \(P(S=1\mid Y=0,X,Z)=\pi_0\), where \(S=1\) means included in the sample and \(\pi_1,\pi_0\) are positive sampling probabilities.

This condition describes random sampling within the case group and within the control group. It is not enough that investigators call a study “case-control”: selection within either group must not favor particular genotypes in a way that varies across genotype values. The source population must also be the population to which the disease odds ratio is intended to refer, and the genotype and covariates must be measured comparably in cases and controls.

Why the Slope Is Preserved

Let \(P_s\) denote probabilities in the sampled data and \(P\) probabilities in the source population. By the definition of conditional probability, for fixed \(X,Z\),

$$ \frac{P_s(Y=1\mid X,Z)}{P_s(Y=0\mid X,Z)} = \frac{P(S=1\mid Y=1,X,Z)}{P(S=1\mid Y=0,X,Z)} \frac{P(Y=1\mid X,Z)}{P(Y=0\mid X,Z)}. $$

Under the stated sampling condition, the first ratio is \(\pi_1/\pi_0\), a constant that does not depend on \(X\) or \(Z\). Taking logarithms and substituting the population model gives

$$ \operatorname{logit}\{P_s(Y=1\mid X,Z)\} = \left[\alpha+\log\!\left(\frac{\pi_1}{\pi_0}\right)\right] +\beta X+\gamma^{T}Z. $$

Thus the sampled-data model has the same genotype and covariate slopes, while its intercept is shifted by \(\log(\pi_1/\pi_0)\). In particular, the conditional per-allele odds ratio remains \(\exp(\beta)\). This is a statement about odds, not about risks: case-control sampling does not preserve the sample disease probability as an estimate of population risk.

The same idea can be seen without a logistic model for a binary exposure. If \(X\) has two levels, the disease odds ratio comparing the levels is a ratio of disease odds. Multiplying the case odds by the same factor \(\pi_1/\pi_0\) in both exposure groups cancels from that ratio. Logistic regression extends this result to modeled genotype and covariate effects.

Worked Example: A Genotype Odds Ratio Before and After Sampling

Suppose a hypothetical source population has the following counts for a binary genotype indicator \(X\), where \(X=1\) denotes a carrier and \(X=0\) a noncarrier.

Genotype groupCasesControls
\(X=0\)100900
\(X=1\)200800

The source-population disease odds are \(100/900\) for \(X=0\) and \(200/800\) for \(X=1\). Therefore, the odds ratio is

$$ \mathrm{OR} =\frac{200/800}{100/900} =\frac{200\times 900}{800\times 100} =2.25. $$

Now suppose investigators sample half of the cases and one-tenth of the controls, at the same rates in both genotype groups. The sampled counts are 50 and 90 for \(X=0\), and 100 and 80 for \(X=1\). The sampled odds ratio is

$$ \mathrm{OR}_s =\frac{100/80}{50/90} =\frac{100\times 90}{80\times 50} =2.25. $$

The case-to-control sampling factor is \(0.5/0.1=5\). It multiplies each genotype group's disease odds by 5, so it changes the sampled odds in both groups equally and cancels in their ratio. In this hypothetical example, carriers have 2.25 times the disease odds of noncarriers; the result does not mean their disease risk is 2.25 times as high.

Why the Intercept Is Not Prevalence

The population-model intercept \(\alpha\) is the conditional log odds of disease when \(X=0\) and \(Z=0\), if those reference values are meaningful and included in the model. It is not generally the marginal population prevalence: prevalence averages disease probabilities over the population distribution of genotype and covariates. In a case-control sample, the fitted intercept is further shifted by the sampling ratio.

Worked Example: Interpreting a Shifted Intercept

Consider a hypothetical population model with \(\alpha=-3\) and \(\beta=\log(2)\), with no covariates. Suppose cases are sampled with probability \(\pi_1=0.8\) and controls with probability \(\pi_0=0.1\). At \(X=0\), the population disease probability is

$$ P(Y=1\mid X=0) =\frac{\exp(-3)}{1+\exp(-3)} \approx 0.04743. $$

The sampled-data intercept is

$$ \alpha_s=-3+\log(0.8/0.1) =-3+\log(8) \approx -0.9206. $$

Consequently, the sampled probability at \(X=0\) is \(\exp(-0.9206)/\{1+\exp(-0.9206)\}\approx0.2849\). This is the case fraction predicted for that genotype in the sampled data under the model, not the source-population disease probability of approximately 0.04743. The genotype slope remains \(\log(2)\), so the per-copy odds ratio is 2.

Even if the source-population intercept were available, it would not usually equal overall prevalence. For example, suppose the source population has genotype-dosage proportions 0.5, 0.3, and 0.2 at \(X=0,1,2\). The model gives respective disease probabilities about 0.04743, 0.09056, and 0.1662. The marginal prevalence is therefore

$$ 0.5(0.04743)+0.3(0.09056)+0.2(0.1662) \approx 0.08412. $$

This differs from the baseline probability at \(X=0\), and neither value is the sampled case fraction. The calculation also requires the source-population genotype distribution, information not supplied by the case-control sample alone.

When the Sampling Condition Fails

If inclusion probabilities vary with genotype, the case-to-control sampling factor can vary with genotype too. Its log then contributes to the sampled-data slope, so the fitted slope need not equal the source-population slope. Selection that depends on covariates requires similar care: if the case-to-control sampling ratio varies with a covariate, the sampled intercept shift is no longer constant. Depending on the form of that variation and the model, covariate effects or other coefficients may be distorted unless the sampling design is appropriately represented.

Worked Example: Genotype-Dependent Case Sampling Distorts the Odds Ratio

Return to the hypothetical source counts above, whose odds ratio is 2.25. Suppose controls are sampled at rate 0.1 in both genotype groups, but cases are sampled at rate 0.5 for \(X=0\) and 0.25 for \(X=1\). The sampled counts are then 50 cases and 90 controls for \(X=0\), and 50 cases and 80 controls for \(X=1\). The resulting odds ratio is

$$ \mathrm{OR}_s =\frac{50/80}{50/90} =\frac{50\times90}{80\times50} =1.125. $$

This does not equal the source odds ratio of 2.25. The sampling factor for cases relative to controls is \(0.5/0.1=5\) at \(X=0\), but \(0.25/0.1=2.5\) at \(X=1\). Because these factors differ, they do not cancel in the genotype comparison. This example shows why “cases and controls were sampled” is not, by itself, enough to guarantee preservation of the odds ratio.

In practice, investigators should examine how cases and controls were recruited and whether recruitment depended on genotype, covariates, site, or other variables related to the modeled effects. Sampling separately within covariate strata can be compatible with valid genotype-effect estimation when the sampling mechanism is properly accounted for and the relevant model is correctly specified; it should not be treated as automatically equivalent to simple outcome-only sampling. If selection probabilities are unknown and vary with the exposure, the source-population odds ratio may not be identified by the ordinary sampled-data logistic fit alone.

Practical Interpretation and Alternatives

A standard logistic regression fitted to a properly sampled case-control data set can estimate conditional odds-ratio slopes. Interpret \(\exp(\hat{\beta})\) as the estimated multiplicative change in disease odds per additional effect-allele copy, conditional on the covariates in the model, under the additive dosage specification. It is not an estimate of a risk ratio, an absolute risk difference, or disease prevalence. If genotype effects are modeled with indicators rather than dosage, each coefficient compares the corresponding genotype category with its specified reference category.

ApproachWhat it can estimate directlyKey qualification
Population-based samplingOdds-ratio slopes and, with a representative sample and suitable model, population probabilitiesSampling, model specification, and covariate distribution still matter
Outcome-based case-control samplingConditional odds-ratio slopes under the stated selection conditionsThe fitted intercept reflects case-control sampling, not population prevalence
Case-control sampling with known inclusion probabilitiesSlopes and potentially population-scale probabilities after appropriate correctionThe sampling probabilities and target population must be known and correctly used

If the sampling probabilities are known, the intercept can in principle be adjusted: \(\alpha=\alpha_s-\log(\pi_1/\pi_0)\). That correction recovers a conditional population-model intercept only under the model and sampling assumptions. Estimating marginal prevalence still requires averaging predicted probabilities over the source population's genotype and covariate distribution. When that distribution or the sampling fractions are unavailable, prevalence cannot be recovered from the case-control case fraction.

A useful diagnostic is to compare the recruitment process across disease groups and genotype or covariate strata, using design records where available. Large differences in genotype frequencies caused by recruitment practices, differential participation, or measurement can signal that outcome-only sampling is implausible. These checks cannot prove that selection is harmless, but they can reveal reasons to qualify the interpretation or use a design-aware analysis.

Common Mistake and Limitations

  • Wrong reasoning: “The fitted intercept gives the disease prevalence because logistic regression models disease probability.” Correction: in a case-control sample the intercept is shifted by the case-to-control sampling ratio, and even the population intercept is conditional on reference covariate values rather than generally being marginal prevalence.
  • Wrong reasoning: “Every case-control design preserves odds ratios.” Correction: preservation requires suitable selection within outcome groups; genotype-dependent selection can change the odds ratio, as the worked example shows.
  • Wrong reasoning: “An odds ratio of 2.25 means risk is 2.25 times higher.” Correction: it compares odds. Odds ratios and risk ratios can differ substantially when disease is not rare.

Case-control sampling is valuable when cases are uncommon because investigators can assemble enough cases without sampling a huge population cohort. Its central limitation for this topic is that the design controls the observed case fraction. The odds-ratio result does not remove concerns about selection bias, incorrect covariate adjustment, genotype coding, or model misspecification; it isolates what outcome-based sampling alone does under the stated conditions.

Key takeaway: When sampling depends on disease status alone, with the same sampling rate across genotype and covariate values within each disease group, logistic-regression slopes retain their population odds-ratio interpretation. The intercept shifts by the log ratio of case to control sampling probabilities and is not a direct estimate of disease prevalence.

Check Your Understanding

Try each question, then compare with the solutions below.

  1. If cases are sampled at rate 0.6 and controls at rate 0.2, what is the intercept shift in the sampled logistic model?
  2. A case-control analysis estimates a per-allele odds ratio of 1.4. State its conditional interpretation and one interpretation it does not support.
  3. Why can the population-model intercept differ from marginal disease prevalence even when the source population is sampled representatively?
  4. Cases are sampled at twice the rate for one genotype group as for another, while control sampling is constant. Is the standard odds-ratio preservation condition satisfied? Explain.
  5. What additional information is needed to adjust a sampled-model intercept back to the population-model intercept?

Solutions. (1) The shift is \(\log(0.6/0.2)=\log(3)\approx1.099\). (2) Conditional on the modeled covariates, each additional effect-allele copy is associated with 1.4 times the disease odds under the additive model; this does not say disease risk is 1.4 times as high. (3) The intercept describes disease odds at the model's reference genotype and covariate values, whereas marginal prevalence averages probabilities over the population distribution of those variables. (4) No. Genotype-dependent case sampling makes the case-to-control sampling factor vary across genotype groups, so it need not cancel from the odds ratio. (5) The case and control inclusion probabilities, or at least their ratio, are needed, together with the sampling and model assumptions that justify the correction.

Clinical Biostats