Tutorials › Statistical Genetics › Ancestry Confounding in Logistic Regression

Population Stratification Control · Tutorial 189 of 989

Ancestry Confounding in Logistic Regression

Use stratum-specific comparisons and logistic regression to distinguish ancestry confounding from odds-ratio non-collapsibility and interpret the resulting estimates.

Intermediate 10 min read

What You'll Learn

  • Define ancestry confounding in a genotype–outcome association
  • Calculate pooled and ancestry-stratum odds ratios from case-control tables
  • Interpret a genotype coefficient in an ancestry-adjusted logistic model
  • Distinguish confounding from odds-ratio non-collapsibility
  • Identify assumptions that affect adjusted odds-ratio interpretation

Why Ancestry Matters for a Genotype Odds Ratio

A genotype can be more common in one ancestry group than another, while the outcome risk also differs across those groups for genetic, environmental, or sampling-related reasons. If cases and controls have different ancestry compositions, a pooled comparison can then associate genotype with outcome even when there is no genotype association within either ancestry group. This is ancestry confounding: the pooled comparison mixes groups with different genotype frequencies and outcome odds.

Logistic regression provides a way to estimate a genotype association conditional on measured ancestry variables. However, an adjusted odds ratio need not equal the unadjusted odds ratio merely because adjustment has removed confounding. Odds ratios are non-collapsible: even in the absence of confounding, a conditional odds ratio can differ from a marginal odds ratio. Interpreting the difference requires understanding both the study structure and the estimand being reported.

Definition: Ancestry confounding occurs when ancestry is associated with genotype and with the outcome, so that a pooled genotype–outcome association partly reflects differences between ancestry groups rather than a within-group genotype association. A stratum-specific odds ratio compares genotype groups within one ancestry stratum. An adjusted odds ratio from a regression model compares genotype groups conditional on the modeled ancestry covariates.

Odds Ratios Within and Across Ancestry Strata

For a binary genotype indicator \(G\) and binary outcome \(Y\), the odds ratio in an ancestry stratum is the outcome odds for \(G=1\) divided by the outcome odds for \(G=0\), within that stratum. In a case-control table, if \(a\) and \(b\) are the numbers of cases with \(G=1\) and \(G=0\), and \(c\) and \(d\) are the corresponding control counts, the sample odds ratio is \(ad/(bc)\). This cross-product ratio estimates the stratum-specific disease odds ratio under the usual case-control sampling conditions.

The pooled odds ratio instead combines individuals across ancestry strata before making the comparison. It can differ substantially from the stratum-specific odds ratios if ancestry composition differs between cases and controls and genotype frequencies differ across ancestry groups. As established in earlier material on ancestry confounding and Simpson’s paradox, comparing the pooled result with within-stratum results is a direct way to see how aggregation can change an association.

Worked Example: A Pooled Association With No Within-Stratum Association

Consider this hypothetical case-control study. \(G=1\) denotes carrying a specified allele, and \(G=0\) denotes not carrying it. The ancestry labels A and B are simplified categories for illustration.

AncestryCases, \(G=1\)Cases, \(G=0\)Controls, \(G=1\)Controls, \(G=0\)
A109090810
B90109010
Pooled100100180820

Within ancestry A, the odds ratio is \( (10\times810)/(90\times90)=1.000 \). Within ancestry B, it is \( (90\times10)/(10\times90)=1.000 \). Thus neither stratum shows a genotype association with case status in these data.

After pooling, the odds ratio is \( (100\times820)/(100\times180)=4.556 \). The pooled comparison suggests much higher case odds among carriers, even though both within-stratum estimates equal 1. The reason is that ancestry B, where the allele is common, accounts for half the cases but only 10% of controls. The pooled genotype groups therefore have different ancestry compositions. In these hypothetical data, the large pooled association reflects ancestry composition, not a within-stratum genotype association.

Logistic Regression Adjustment

Let \(Y_i=1\) indicate that individual \(i\) is a case and \(Y_i=0\) indicate a control. Let \(G_i\) be a genotype indicator or dosage, and let \(A_i\) denote ancestry covariates, such as an ancestry category or measured principal components. A logistic regression model with one genotype coefficient is

$$ \operatorname{logit}\{P(Y_i=1\mid G_i,A_i)\} =\beta_0+\beta_G G_i+\boldsymbol{\beta}_A^{\,T}A_i. $$

The model assumes that, conditional on the included covariates, the log odds are represented by the specified linear predictor. With a binary genotype indicator, the conditional odds ratio comparing \(G=1\) with \(G=0\), holding \(A_i\) fixed, is \(\exp(\beta_G)\). If \(G_i\) is an allele dosage from 0 to 2 and is entered linearly, \(\exp(\beta_G)\) is the conditional odds ratio for each one-unit increase in dosage.

Derivation: At a fixed ancestry value \(A\), the model gives log odds \(\beta_0+\beta_G+\boldsymbol{\beta}_A^{\,T}A\) for \(G=1\), and \(\beta_0+\boldsymbol{\beta}_A^{\,T}A\) for \(G=0\). Subtracting the latter from the former gives \(\beta_G\). Exponentiating the difference in log odds gives the conditional odds ratio \(\exp(\beta_G)\).

A single \(\beta_G\) assumes the genotype log-odds association is the same across the ancestry values represented in the model. If the genotype association differs by ancestry, an interaction term is needed to represent that variation; a single adjusted odds ratio would otherwise impose a common effect that may not describe every stratum. The model also requires adequate overlap in genotype groups across ancestry strata to support the comparisons. Ancestry adjustment cannot recover a within-stratum contrast where one genotype group is absent.

In case-control studies, the odds ratio can be estimated from logistic regression even when the proportion sampled as cases is fixed by design, provided sampling depends on outcome and not on genotype within outcome levels, conditional on the modeled covariates. The intercept generally does not recover the population disease prevalence under such sampling, but the slope odds-ratio estimates can remain valid. Other design features, including relatedness or clustering, may require additional variance or model handling.

Worked Example: Interpreting an Ancestry-Adjusted Estimate

Suppose a hypothetical case-control analysis includes 1,200 unrelated participants and fits a logistic regression with a binary carrier indicator \(G\) and an ancestry indicator \(A\). Assume the model’s logit form is adequate, the genotype effect is modeled as common across the two ancestry categories, and there are carriers and noncarriers in both categories. The fitted genotype coefficient is \(\hat{\beta}_G=0.405\), with \(SE=0.160\).

The adjusted odds ratio is \( \exp(0.405)\approx1.499 \). Conditional on ancestry category, estimated case odds for carriers are about 1.50 times the estimated odds for noncarriers. This is an odds comparison, not a statement that carrier risk is 50% higher.

A Wald interval on the coefficient scale is \(0.405\pm1.96(0.160)=0.405\pm0.3136\), giving endpoints \(0.0914\) and \(0.7186\). Exponentiating gives \( [\exp(0.0914),\exp(0.7186)]\approx[1.096,2.052] \). This Wald procedure has approximately 95% coverage under suitable regularity conditions, with coverage approaching 95% asymptotically; it does not guarantee exact 95% coverage in a finite sample. In context, the interval is an approximate range of values for the ancestry-conditional carrier odds ratio compatible with the fitted model and data.

The estimate describes an association conditional on the included ancestry indicator and model assumptions. It does not by itself show that the genotype causes the outcome. A causal interpretation would require additional assumptions, including adequate control of relevant confounding and appropriate handling of selection and measurement.

Confounding Is Not the Same as Non-Collapsibility

Confounding concerns the relationship between the exposure, the outcome, and a third variable. Non-collapsibility is a mathematical property of the odds ratio: a conditional odds ratio can differ from the marginal odds ratio even when the covariate is independent of genotype and therefore does not confound the genotype–outcome association. The difference between adjusted and unadjusted logistic estimates is therefore not, by itself, proof that confounding was present or removed.

The following hypothetical source population illustrates non-collapsibility. Let \(Z\) be a binary ancestry-related covariate, with half the population in each category, and suppose \(G\) is independent of \(Z\). For \(G=0\), let the outcome probabilities be 0.10 when \(Z=0\) and 0.50 when \(Z=1\). Suppose the conditional odds ratio for \(G=1\) versus \(G=0\) is 2 in both strata. The corresponding \(G=1\) probabilities are \(2/11\) when \(Z=0\), because the baseline odds \(0.10/0.90=1/9\) become \(2/9\), and \(2/3\) when \(Z=1\), because baseline odds 1 become 2.

Worked Example: A Marginal Odds Ratio Different From the Conditional Odds Ratio

Because \(G\) and \(Z\) are independent, both genotype groups have the same 50:50 mixture of \(Z\) categories. For \(G=0\), the marginal outcome probability is \( (0.10+0.50)/2=0.30 \). For \(G=1\), it is \( (2/11+2/3)/2=14/33\approx0.4242 \).

The marginal odds ratio is therefore \( [ (14/33)/(19/33) ]/[0.30/0.70] \) \(=(14/19)/(3/7)=98/57\approx1.719 \). This differs from the conditional odds ratio of 2 even though genotype is independent of \(Z\), and the conditional odds ratio is identical in both strata. The difference is non-collapsibility, not confounding by \(Z\). The example uses outcome probabilities to make the distinction clear; in a case-control sample, the odds ratio rather than the sampled case fraction is the relevant association measure.

Interpreting an Adjustment in Practice

A useful analysis reports the estimand and the adjustment clearly. An unadjusted logistic model estimates a marginal association for the sampled population under its design, while a model including ancestry covariates estimates a conditional association at fixed covariate values. These odds ratios need not coincide, even with accurate ancestry measurement and correct model specification.

When comparing estimates, examine the stratum-specific results as well as the pooled and adjusted estimates. Agreement among stratum-specific estimates supports a common-effect summary; large variation can indicate effect heterogeneity, sparse data, or instability. In the absence of a common effect, the single-coefficient model may conceal meaningful differences. For confounding control, ancestry covariates must capture relevant population structure well enough for the intended comparison; a label or component is not automatically sufficient simply because it appears in the model.

1
State the comparison.
Specify whether the target is a pooled genotype odds ratio or an odds ratio conditional on ancestry covariates.
2
Inspect strata and overlap.
Compare genotype groups within ancestry strata and verify that the data support those comparisons.
3
Fit and qualify the model.
State the genotype coding, ancestry terms, and whether a common genotype effect is assumed. Interpret \(\exp(\hat{\beta}_G)\) accordingly.
4
Explain differences carefully.
Use the stratum-specific pattern to assess confounding, while recognizing that non-collapsibility alone can separate conditional and marginal odds ratios.

Common Mistake

Wrong reasoning: “The adjusted odds ratio differs from the pooled odds ratio, so ancestry confounding must have been present, and adjustment must have recovered the causal effect.” This conclusion does not follow. Logistic odds ratios are non-collapsible, so adjustment can change the estimate even when ancestry is independent of genotype. Moreover, adjustment for measured ancestry does not guarantee that all confounding has been controlled or that a causal effect is identified.

Correction: Examine whether ancestry is associated with genotype and outcome, compare estimates within ancestry strata, and state which conditional or marginal association is being estimated. Treat the adjusted coefficient as a conditional association under the model. A causal interpretation requires separate justification of the relevant causal assumptions.

Key takeaway: Ancestry imbalance can create a pooled genotype association when within-stratum associations are absent. Logistic adjustment estimates a conditional odds ratio, but its difference from a pooled odds ratio can also arise from non-collapsibility. Interpret the estimate in light of the model, the sampling design, the stratum-specific pattern, and the scientific assumptions.

Check Your Understanding

Use the definitions and distinctions above to answer the following questions.

  1. In a case-control table, what four cell counts are used to calculate a stratum-specific odds ratio, and what is the cross-product formula?
  2. How can ancestry imbalance produce a pooled genotype association when the genotype odds ratio is 1 within every ancestry stratum?
  3. In a logistic model with a binary carrier indicator, what does \(\exp(\hat{\beta}_G)\) represent when ancestry covariates are included?
  4. Why does a change between adjusted and unadjusted odds ratios not, by itself, establish that confounding was removed?
  5. In the non-collapsibility example, why is the difference between conditional and marginal odds ratios not due to confounding by \(Z\)?
Clinical Biostats