Tutorials › Statistical Genetics › Separating Stratification From Ancestry-Specific Effects

Population Stratification Control · Tutorial 197 of 989

Separating Stratification From Ancestry-Specific Effects

Separate ancestry-related confounding from genuine differences in genotype effects by comparing stratum-specific estimates and testing their heterogeneity.

Intermediate 9 min read

What You'll Learn

  • Explain how differences in genotype and outcome distributions across ancestry strata can create a pooled association.
  • Calculate and interpret genotype effects within ancestry strata.
  • Specify a regression model that allows genotype effects to vary across strata.
  • Test equality of stratum-specific effects with an interaction or contrast test.
  • Distinguish evidence of heterogeneity from differences in statistical significance.

Why Separate Stratification From Effect Differences?

A genotype can be associated with an outcome in a pooled sample even when it has no association within any ancestry stratum. This can happen when the strata differ in both genotype frequencies and average outcome. The pooled association then partly reflects the mixture of groups, not a genotype effect within groups.

But a different pattern is also possible: genotype effects may genuinely differ across strata. In that case, a single common-effect estimate can conceal important variation. The key is to estimate effects within strata and then ask whether their differences are larger than sampling uncertainty would reasonably explain. An ancestry-stratified analysis helps distinguish these situations, but it does not by itself establish why effects differ or make ancestry a biological cause.

Definition: A within-stratum genotype effect is the association between genotype and outcome estimated among individuals in the same ancestry stratum, under a specified model and on its specified scale. Effect heterogeneity means that the stratum-specific genotype effects are not all equal on that scale. A pooled association is an association estimated after combining strata, without necessarily allowing for their different genotype and outcome distributions.

How Pooling Can Create an Association

Let \(G\) be genotype dosage coded as 0, 1, or 2 copies of the allele of interest, let \(Y\) be a quantitative outcome, and let \(S\) denote ancestry stratum. A simple within-stratum linear model is \(Y=\alpha_s+\beta_sG+\varepsilon\) for individuals in stratum \(s\). Here, \(\alpha_s\) is the stratum-specific intercept, \(\beta_s\) is the change in mean outcome per additional allele copy, and the errors have conditional mean zero. A common-effect model assumes \(\beta_s=\beta\) for every stratum; an interaction model allows the slopes to differ.

For a pooled linear regression with an intercept, the estimated slope is the pooled covariance of \(G\) and \(Y\), divided by the pooled variance of \(G\). The covariance can be decomposed into within-stratum and between-stratum components:

$$ \operatorname{Cov}(G,Y) = \sum_s w_s\operatorname{Cov}(G,Y\mid S=s) + \sum_s w_s(\mu_{G,s}-\mu_G)(\mu_{Y,s}-\mu_Y), $$

where \(w_s\) is the proportion of observations in stratum \(s\), \(\mu_{G,s}\) and \(\mu_{Y,s}\) are its genotype and outcome means, and \(\mu_G\) and \(\mu_Y\) are the pooled means. The first term summarizes within-stratum association. The second summarizes how the stratum means vary together. Thus, even if every within-stratum covariance is zero, the pooled covariance need not be zero.

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

Consider a hypothetical sample of 200 individuals, 100 in each of two ancestry strata, A and B. Genotype counts are: in A, 30 individuals have \(G=0\), 60 have \(G=1\), and 10 have \(G=2\); in B, the corresponding counts are 10, 30, and 60. Suppose the stratum outcome means are \(\bar{Y}_A=0\) and \(\bar{Y}_B=2\) outcome units, and within each stratum the genotype and outcome have zero covariance. The within-stratum slopes are therefore zero.

In A, the genotype sum is \(60+2(10)=80\), so \(\bar{G}_A=0.80\). The sum of squared dosages is \(60(1^2)+10(2^2)=60+40=100\). In B, the genotype sum is \(30+2(60)=150\), giving \(\bar{G}_B=1.50\), and the sum of squared dosages is \(30+4(60)=270\). Across both strata, the genotype sum is 230 and the squared-dosage sum is 370. Therefore,

$$ \bar{G}=230/200=1.15,\qquad E(G^2)=370/200=1.85,\qquad \operatorname{Var}(G)=1.85-(1.15)^2=0.5275. $$

The pooled mean outcome is \(\bar{Y}=1.00\). Because the within-stratum covariances are zero, the pooled covariance comes from the difference between the stratum means:

$$ \operatorname{Cov}(G,Y) = \frac{100}{200}(0.80-1.15)(0-1) + \frac{100}{200}(1.50-1.15)(2-1) =0.35. $$

The pooled regression slope is \(0.35/0.5275=0.6635\) outcome units per dosage copy. This positive pooled slope does not represent a positive within-stratum genotype effect: both within-stratum slopes are zero by construction. It arises because B has both a higher mean dosage and a higher mean outcome than A.

Estimating Effects and Testing Heterogeneity

For two strata, a regression with an interaction can be written using an indicator \(I_B\), which equals 1 in stratum B and 0 in A:

$$ Y_i=\alpha+\gamma I_{B,i}+\beta G_i+\delta(G_i I_{B,i})+\varepsilon_i. $$

The genotype slope in A is \(\beta\); the slope in B is \(\beta+\delta\). The parameter \(\gamma\) allows the groups to have different outcome means when \(G=0\). Testing \(H_0:\delta=0\) tests whether the two genotype slopes are equal in this model. With more than two strata, include a genotype-by-stratum interaction and test the joint null that all interaction coefficients are zero.

It is also possible to estimate a slope separately in each stratum, then test a contrast between estimates. For two independent strata, if \(\hat{\beta}_A\) and \(\hat{\beta}_B\) have standard errors \(SE_A\) and \(SE_B\), their difference has estimated standard error \(\sqrt{SE_A^2+SE_B^2}\), provided the estimates are independent. A Wald statistic divides the estimated difference by this standard error. Under the null and the usual large-sample approximation, it is compared with a standard normal distribution; its square is compared with a chi-square distribution with 1 degree of freedom. In a joint model, use the estimated covariance of the contrast rather than assuming independence when that assumption does not hold.

Worked Example: Similar Effects Across Two Strata

Suppose a hypothetical analysis of a quantitative biomarker estimates a genotype slope of \(\hat{\beta}_A=0.20\) biomarker units per dosage copy, with \(SE_A=0.10\), and \(\hat{\beta}_B=0.25\) units per copy, with \(SE_B=0.12\). Assume the estimates come from disjoint strata and are independent, and that the fitted within-stratum models are appropriate.

The estimated difference, A minus B, is \(0.20-0.25=-0.05\) units per dosage copy. Its standard error is

$$ SE(\hat{\beta}_A-\hat{\beta}_B) = \sqrt{0.10^2+0.12^2} = \sqrt{0.0244} = 0.1562. $$

Thus \(z=-0.05/0.1562=-0.320\), and the two-sided p-value is about 0.749. The equivalent one-degree-of-freedom statistic is \(z^2=0.102\). A 95% confidence interval for the difference is \(-0.05\pm1.96(0.1562)=[-0.356,0.256]\) biomarker units per copy. These results do not provide evidence that the effects differ. They do not prove the effects are identical; the interval still includes differences in either direction.

Worked Example: Evidence of Effect Heterogeneity

In a second hypothetical analysis, the estimated biomarker slopes are \(\hat{\beta}_A=0.00\) units per dosage copy, with \(SE_A=0.10\), and \(\hat{\beta}_B=0.60\) units per copy, with \(SE_B=0.12\). Use the same assumptions of independent estimates and appropriate within-stratum models.

The estimated difference, A minus B, is \(-0.60\) units per copy. The standard error remains \(\sqrt{0.10^2+0.12^2}=0.1562\) units per copy, so

$$ z=\frac{-0.60}{0.1562}=-3.841,\qquad \chi^2_1=z^2=14.75. $$

The two-sided normal-approximation p-value is about 0.00012. The estimated slope difference is unlikely under the null hypothesis of equal slopes, given the model and its assumptions. This is evidence of heterogeneity on the linear outcome scale, not evidence that ancestry itself causes the difference. The interval for the difference is \(-0.60\pm1.96(0.1562)=[-0.906,-0.294]\) units per copy, which also indicates that the estimated slope in A is lower than the estimated slope in B.

Assumptions and Interpretation

These calculations are meaningful only when the analysis is sufficiently well specified. For the linear model, the conditional mean of \(Y\) should be adequately represented by the chosen intercepts, genotype terms, and any included covariates. Genotype should be coded consistently across strata, and the dosage effect assumes a linear change in the mean outcome per additional copy. If that coding or functional form is inappropriate, a slope comparison may not capture the relevant pattern.

For the usual standard errors and Wald tests, observations should be independent at the level assumed by the model, and the standard-error calculation must reflect the outcome variability and study design. If relatives or other clusters are present, a procedure that accounts for their dependence is needed. The normal approximation also requires enough information for the coefficient estimates to be reasonably approximated by a normal distribution. In small or sparse strata, estimates and tests may be unstable.

An interaction test is scale-specific. For a quantitative outcome, it tests equality of mean differences per dosage copy under the chosen model. For a binary outcome, an interaction in a logistic regression tests equality of log-odds effects, not equality of risk differences. Effects can be equal on one scale and differ on another. The scale and interpretation should therefore be stated with the result.

Stratification can help identify a pooled association driven by differences between groups, while an interaction test evaluates whether the modeled within-stratum effects differ. It cannot by itself establish the biological mechanism of a difference. Measurement, sampling, environmental exposures, model misspecification, and limited precision may all contribute. Nor does a nonsignificant interaction show that effects are equal: a wide confidence interval can reflect low power to detect heterogeneity.

Common Mistake

A common mistake is to say, “The genotype effect is significant in stratum A but not significant in stratum B, so the effects differ.” This is not a valid heterogeneity test. Statistical significance depends on both the estimated effect and its standard error; two similar estimates can fall on opposite sides of a significance threshold if their precisions differ. Conversely, two individually nonsignificant estimates can still differ significantly from each other.

The correction is to test the contrast directly, such as \(H_0:\beta_A-\beta_B=0\), and report its estimate, standard error, p-value, and confidence interval. A second mistake is to treat a pooled slope as the within-stratum effect. The covariance decomposition shows why that can fail: pooled association includes both within-stratum and between-stratum contributions.

Key takeaway: Estimate genotype effects within ancestry strata, then test their differences directly. A pooled association can reflect group composition, while a detected interaction indicates heterogeneity only on the outcome scale and under the model used.

Check Your Understanding

Try these questions before reviewing the worked examples.

  1. How can genotype and outcome mean differences between strata produce a pooled genotype association when within-stratum associations are absent?
  2. In the two-stratum interaction model, what are the genotype slopes in strata A and B, and which parameter represents their difference?
  3. If two stratum-specific estimates have different p-values, why does that not establish effect heterogeneity?
  4. For independent estimates \(0.30\) and \(0.10\), with standard errors \(0.08\) and \(0.06\), calculate the standard error of their difference.
  5. What does a nonsignificant interaction test allow you to conclude, and what does it not establish?
Clinical Biostats