Tutorials › High-Dimensional Genomic Data Analysis › Distinguishing Ancestry Confounding From Effect Heterogeneity

Ancestry-Aware Association and Cross-Population Portability · Tutorial 303 of 795

Distinguishing Ancestry Confounding From Effect Heterogeneity

Use adjusted and stratified association estimates to assess whether ancestry-related differences are explained by measured covariates or persist as evidence of effect heterogeneity.

Advanced 14 min read

What You'll Learn

  • Distinguish residual ancestry confounding from conditional effect heterogeneity.
  • Derive how an omitted ancestry-associated covariate can change a marginal genotype association.
  • Compare minimally adjusted and covariate-adjusted estimates without treating sensitivity as proof.
  • Interpret ancestry-stratified estimates and test their contrast on a common effect scale.
  • Check overlap, model fit, uncertainty, and other reasons adjustment may change estimates.

Why an Ancestry-Related Difference Needs Diagnosis

An association estimate can differ across ancestry groups for more than one reason. The difference may reflect residual population confounding: ancestry is associated with a covariate that also relates to the outcome, and the analysis has not adequately controlled that covariate. Or the conditional association between genotype and outcome may genuinely vary by ancestry, which is called effect heterogeneity. These explanations can coexist, and neither is established simply because two estimates differ.

The practical goal is to compare estimates before and after defensible covariate adjustment, then examine estimates within ancestry groups using a consistent model and effect scale. This is a diagnostic strategy, not a mechanical decision rule. It depends on measured covariates being adequate, sufficient genotype variation within groups, and a correctly specified model. Even after careful adjustment, an observational genetic association is not automatically a causal effect.

The earlier material on calibration diagnostics helps assess whether test statistics behave as expected overall. Calibration alone does not identify why ancestry-specific estimates differ: a well-calibrated analysis can still have confounding or heterogeneity, and inflation does not by itself tell which is present.

Models and the Distinction Being Tested

Definition: Residual population confounding is distortion of a genotype association because ancestry or ancestry-associated factors remain uncontrolled or inadequately modeled. Effect heterogeneity means that the conditional genotype association differs across ancestry groups on a specified effect scale, after conditioning on the covariates in the model. A difference in estimates is evidence to investigate, not a definition or proof of either explanation.

For clarity, begin with a quantitative outcome \(Y\), genotype dosage \(G\), ancestry group indicator \(A\), and measured covariates \(C\). A simple common-effect linear model is

$$ Y_i=\alpha+\beta G_i+\eta A_i+\boldsymbol{\theta}^{T}C_i+\varepsilon_i. $$

Here \(\beta\) is the conditional change in the expected outcome per additional allele, holding ancestry group and the included covariates fixed. The model assumes a linear conditional mean, appropriate covariate specification, and errors with conditional mean zero. Standard errors and tests additionally require a suitable variance model or robust inference. If observations are related or clustered, the uncertainty calculation must account for that dependence.

To allow the genotype association to vary by ancestry, add an interaction:

$$ Y_i=\alpha+\beta G_i+\eta A_i+\kappa(G_iA_i)+\boldsymbol{\theta}^{T}C_i+\varepsilon_i. $$

With \(A=0\) as the reference group, the conditional genotype slope is \(\beta\) in group 0 and \(\beta+\kappa\) in group 1. Thus \(\kappa\) is the difference in conditional slopes on the outcome-units-per-allele scale. This interpretation assumes the same linear scale and comparable covariate adjustment in both groups. If covariate effects also differ by ancestry, that model must be expanded or fitted separately; otherwise its restrictions may obscure the comparison.

Why Omitted Covariates Can Mimic Heterogeneity

A short omitted-variable derivation explains why ancestry-specific marginal estimates can differ even when the conditional genotype effect is common. Suppose, within ancestry group \(a\), the conditional mean follows \(Y=\alpha_a+\beta G+\gamma C+\varepsilon\), where \(C\) is a measured covariate and \(E(\varepsilon\mid G,C,a)=0\). If \(C\) is omitted and \(Y\) is regressed on \(G\) with an intercept, the population slope is

$$ b_a^{\mathrm{marg}} =\frac{\operatorname{Cov}(G,Y\mid a)}{\operatorname{Var}(G\mid a)} =\beta+\gamma\frac{\operatorname{Cov}(G,C\mid a)}{\operatorname{Var}(G\mid a)}. $$

The second equality follows by substituting the conditional mean into the covariance: the intercept contributes zero covariance, the genotype term contributes \(\beta\operatorname{Var}(G\mid a)\), and the covariate contributes \(\gamma\operatorname{Cov}(G,C\mid a)\). The error contributes zero under the stated conditional-mean assumption. If the association between \(G\) and \(C\), or the genotype variance, differs by ancestry, the omitted-variable term can differ by group. Consequently \(b_a^{\mathrm{marg}}\) may vary even though \(\beta\) does not.

This result is a diagnostic explanation, not a guarantee that adjustment will remove every difference. It applies to the specified linear model and measured covariate. Unmeasured factors, inaccurate covariates, nonlinear relationships, or an incorrect outcome model can leave distortion behind. For multiple covariates, the same logic applies through their joint projection on genotype.

Worked Example: A Common Conditional Effect, Different Marginal Slopes

Consider hypothetical data from two ancestry groups. Let genotype dosage be coded \(G=0\) or \(G=1\), and let \(C\) be a binary outcome-associated covariate. Suppose the conditional mean in both groups is \(E(Y\mid G,C,A)=10+2G+4C\), so the conditional genotype slope is 2 outcome units per allele in each group. Assume the genotype and covariate combinations occur, and the model's conditional-mean assumptions hold.

In group 0, suppose \(P(C=1\mid G=1,A=0)=0.60\) and \(P(C=1\mid G=0,A=0)=0.50\). The difference in covariate prevalence across genotype categories is \(0.60-0.50=0.10\). Because \(G\) is binary, the difference in mean outcome between \(G=1\) and \(G=0\), without adjusting for \(C\), is

$$ 2+4(0.10)=2.40 \text{ outcome units per allele}. $$

In group 1, suppose the corresponding covariate prevalences are 0.80 and 0.30. The unadjusted slope is then \(2+4(0.80-0.30)=4.00\) outcome units per allele. The marginal estimates differ by \(4.00-2.40=1.60\), even though the conditional slope is 2 in both groups. In this constructed example, controlling for \(C\) recovers the common conditional slope. The example demonstrates a possible confounding mechanism; in real data, adjustment only addresses the factors measured and modeled adequately.

Covariate Sensitivity Analysis

A sensitivity analysis compares a sequence of substantively justified models. A minimally adjusted model might include study design variables and essential technical covariates; a fuller model adds measured ancestry-related covariates such as ancestry principal components, recruitment site, or relevant environmental and clinical variables. Covariates should be selected for their role in the data-generating process, not merely because they make an estimate move toward a preferred value. Avoid adjusting automatically for variables that may be consequences of genotype or outcome, or conditioning on a collider.

The central comparison is the change in the genotype estimate and its uncertainty across models, separately by ancestry group where possible. A marked attenuation of a difference after adding plausible confounders is consistent with measured confounding contributing to the original contrast. Persistence after adjustment leaves heterogeneity as one possibility, but also leaves open residual confounding, model misspecification, and measurement error. A change in a p-value alone is not informative: standard errors can change because covariate adjustment changes precision or sample size.

For comparing groups, use a joint model with a genotype-by-ancestry interaction or a direct contrast of estimates from appropriately fitted strata. If separate group estimates are independent, the estimated contrast is \(\hat{\beta}_1-\hat{\beta}_0\), with standard error \(\sqrt{SE_1^2+SE_0^2}\). If estimates are correlated, the covariance must be included:

$$ SE(\hat{\beta}_1-\hat{\beta}_0) =\sqrt{SE_1^2+SE_0^2-2\operatorname{Cov}(\hat{\beta}_1,\hat{\beta}_0)}. $$

In a pooled regression, the interaction coefficient directly estimates the contrast under the specified model, and its standard error supplies the test. A nonsignificant interaction does not demonstrate equal effects; it may reflect limited precision. Report the estimated contrast and interval, not only the test result.

Worked Example: Reading Covariate Sensitivity Carefully

Suppose hypothetical, independent ancestry-group analyses give the following estimates of a quantitative-trait association, all in trait units per allele. The first model includes basic design covariates; the second also includes measured ancestry-related covariates.

ModelGroup 0 estimate (SE)Group 1 estimate (SE)
Basic adjustment1.20 (0.20)2.10 (0.25)
Expanded adjustment0.82 (0.18)0.91 (0.22)

Under basic adjustment, the contrast is \(2.10-1.20=0.90\). Because the groups are independent, its standard error is \(\sqrt{0.20^2+0.25^2}=\sqrt{0.1025}=0.3202\). The contrast statistic is \(0.90/0.3202=2.811\), giving a two-sided normal-approximation p-value of approximately 0.00494.

Under expanded adjustment, the contrast is \(0.91-0.82=0.09\), and its standard error is \(\sqrt{0.18^2+0.22^2}=\sqrt{0.0808}=0.2843\). Thus \(z=0.09/0.2843=0.3166\), with two-sided \(p\approx0.7516\). The estimated contrast has attenuated substantially after adjustment. This pattern is consistent with measured covariates explaining some of the initial difference, but does not prove that all confounding is removed or that the conditional effects are identical. The uncertainty remains relevant: the adjusted data do not establish exact equality.

These calculations assume independent group estimates and a valid normal approximation. If participants overlap across estimates or a shared model induces covariance, the covariance term is needed instead. The two-sided p-values test a zero contrast under their respective models; they are not probabilities that the null hypothesis is true.

Stratified Estimates and Evidence for Heterogeneity

Stratification estimates the genotype association within ancestry groups rather than relying only on a pooled marginal estimate. Within each group, fit the same outcome model and adjust for comparable covariates. Check that genotype variation exists across the covariate patterns being compared. If one group has little genotype variation, or if some genotype-covariate combinations are absent, the estimate may rely on extrapolation and be unstable. This is a lack of overlap, not evidence of a biological difference.

A useful sequence is to inspect group-specific estimates, then assess their contrast, and finally examine whether the contrast is robust to reasonable alternative covariate sets and model checks. Consistency across covariate strata can be informative: a difference that appears only in one sparsely represented stratum may reflect imprecision or model failure. Conversely, a contrast that remains across well-supported strata and adjustment choices is more compatible with genuine heterogeneity, although unmeasured confounding remains possible.

Worked Example: A Persistent Contrast After Stratification

In a hypothetical study, covariate-adjusted linear regressions within two ancestry groups estimate genotype slopes of 0.50 trait units per allele (standard error 0.15) and 1.50 trait units per allele (standard error 0.20). Assume the group samples are independent, the same allele and genotype coding are used, the linear models are adequate, and both groups have sufficient genotype overlap.

The estimated contrast is \(1.50-0.50=1.00\) trait unit per allele. Its standard error is

$$ \sqrt{0.15^2+0.20^2}=\sqrt{0.0625}=0.250. $$

The contrast statistic is \(z=1.00/0.250=4.00\), with two-sided normal-approximation \(p\approx0.00006334\). A 95% Wald confidence interval for the contrast is \(1.00\pm1.96(0.250)\), or \(1.00\pm0.490\), giving \((0.510,1.490)\) trait units per allele. Under the model and sampling assumptions, this interval describes plausible values for the conditional contrast; it does not assign a 95% probability to the fixed contrast being inside this particular interval.

This is strong statistical evidence that the conditional slopes differ on the modeled trait scale, given the stated assumptions. It is not, on its own, proof of biological mechanism or causation. The conclusion should be weakened if residual confounding, poor overlap, variant coding differences, or misspecification could plausibly account for the contrast.

Diagnostics, Alternatives, and Limits

Before interpreting a change in estimates as evidence about confounding or heterogeneity, inspect how each model was fit and to whom it applies. A complete-case analysis can change its sample when covariates are added, so compare models on the same participants where feasible and report any sample-size change. Examine genotype distributions and covariate overlap within ancestry groups, influential observations, residual patterns, and whether the conditional mean appears nonlinear. Check that alleles, dosage coding, phenotype units, and covariate definitions are consistent across groups.

Sensitivity analysis and stratification are complementary, not competing procedures. Sensitivity analysis asks whether measured adjustment changes the group-specific estimates or their contrast. Stratification asks whether associations differ within ancestry groups under comparable adjustment. A pooled interaction model is usually a direct and efficient way to test a contrast when its assumptions are appropriate. Separate stratified models are transparent and can permit group-specific nuisance effects, but may be less precise and can make estimates hard to compare if the covariate models differ.

There are important limits. First, adjustment cannot remove confounding by variables that were not measured or were measured poorly. Second, conditioning on inappropriate variables can introduce bias. Third, sparse genotype categories can make stratified estimates unstable. Fourth, effect heterogeneity is scale-specific: a difference on one model's coefficient scale need not imply a difference on another. For logistic models, odds ratios can change after covariate adjustment even without confounding because odds ratios are non-collapsible; therefore an adjusted-versus-unadjusted change should not be read as a confounding diagnosis by itself. The present linear examples avoid that particular issue but still require their own assumptions.

A common mistake is to reason, “The interaction p-value became nonsignificant after adding ancestry covariates, so confounding has been proven and the effects are equal.” That conclusion is too strong. The contrast may have shrunk, its standard error may have grown, or the analysis sample may have changed. The correction is to report estimates, uncertainty, sample sizes, and the adjustment sequence; then describe which explanations are compatible with the results, while acknowledging residual confounding and limited power.

Key takeaway: A shrinking ancestry contrast after plausible adjustment is consistent with measured confounding; a robust within-group contrast supports conditional heterogeneity on the chosen scale. Neither pattern alone proves its explanation. Assess model assumptions, overlap, uncertainty, and sensitivity to defensible analysis choices.

Check Your Understanding

Answer each question, then compare your reasoning with the solutions.

  1. In a linear model with common conditional genotype slope \(\beta\), why can the unadjusted slopes differ between ancestry groups?
  2. Two independent groups have estimates 0.60 and 1.00, with standard errors 0.20 and 0.30. Calculate the contrast and its standard error.
  3. After adding covariates, a contrast's p-value rises above 0.05. Does this establish equal effects? Give two reasons why not.
  4. Why can absent genotype-covariate combinations make a stratified association estimate unreliable?

Solutions. 1. In the linear omitted-covariate result, the marginal slope is \(\beta+\gamma\operatorname{Cov}(G,C\mid a)/\operatorname{Var}(G\mid a)\). The omitted term can vary across ancestry groups even if \(\beta\) is common. 2. The contrast is \(1.00-0.60=0.40\). Its standard error is \(\sqrt{0.20^2+0.30^2}=\sqrt{0.13}=0.3606\), using independence. 3. No. Adjustment may increase the standard error or reduce the analysis sample, and failure to reject a zero contrast may reflect limited power; it does not establish equality. 4. Without observations in some genotype-covariate combinations, the model may need to extrapolate beyond the observed data. The resulting estimate can be unstable or dependent on an incorrect model form.

Clinical Biostats