Tutorials › Statistical Genetics › Ancestry-Stratified Association Analysis

Population Stratification Control · Tutorial 187 of 989

Ancestry-Stratified Association Analysis

Fit and interpret stratum-specific genotype effects, then assess whether the genotype data within each ancestry stratum support those estimates.

Intermediate 10 min read

What You'll Learn

  • Define a separate additive genotype-effect model within each ancestry stratum
  • Calculate a stratum-specific slope from centered genotype and phenotype values
  • Interpret the slope in phenotype units per additional allele copy
  • Check genotype counts and within-stratum genotype variation before fitting
  • Recognize when sparse genotypes make a slope unstable or poorly supported
  • Distinguish a technically estimable slope from a well-supported comparison

Why Analyze Association Within Ancestry Strata?

A genotype–phenotype association calculated across a mixed-ancestry sample can reflect differences between ancestry groups, differences within those groups, or both. An ancestry-stratified analysis asks a narrower question: within each defined ancestry stratum, how does the phenotype vary with genotype? Estimating the association separately makes those within-stratum comparisons visible rather than allowing the sample-wide pattern to stand in for them.

This approach is useful only when the genotype varies within a stratum. If every person in a stratum has the same genotype dosage, that stratum provides no comparison of phenotype across genotype values. Even when variation exists, a very small number of observations at one genotype value can make the fitted effect sensitive to individual observations. The analysis therefore requires both a model for the within-stratum association and a careful check of the data supporting each estimate.

Definition: An ancestry-stratified association analysis divides the analyzed individuals into defined ancestry strata and estimates the genotype–phenotype association separately within each stratum. A stratum-specific genotype effect is the estimated change in the phenotype associated with a one-unit increase in genotype dosage within that stratum, under the chosen model.

A Separate Linear Model in Each Stratum

Consider a quantitative phenotype \(Y\) and an additive genotype dosage \(G\), coded as 0, 1, or 2 copies of a specified allele. For stratum \(s\), fit the simple linear model

$$ Y_{is}=\alpha_s+\beta_sG_{is}+\varepsilon_{is}, $$

where \(i\) indexes individuals, \(\alpha_s\) is the stratum-specific intercept, and \(\beta_s\) is the stratum-specific genotype effect. In this model, \(\beta_s\) is measured in phenotype units per additional allele copy. It describes a linear change in the conditional mean phenotype across dosage values within stratum \(s\); it does not by itself establish a causal effect.

The usual least-squares calculation assumes that the mean phenotype is linear in dosage within each stratum, that observations are independent, and that the error has mean zero conditional on dosage. The usual standard error and small-sample \(t\)-based inference additionally rely on constant error variance across dosage values; exact \(t\)-based inference assumes normally distributed errors. These conditions should be considered in context. In particular, related individuals can violate the independence assumption if their dependence is not accounted for.

The genotype dosage should use the same allele definition and coding in every stratum. An estimate of \(2\) phenotype units per copy means that the fitted mean differs by \(2\) units for each one-copy increase in dosage. It does not require that all three dosage categories occur in a stratum, but missing categories limit which dosage contrasts the data directly support.

How the Within-Stratum Slope Is Calculated

For a stratum with \(n_s\) individuals, let \(\bar{G}_s\) and \(\bar{Y}_s\) denote the mean genotype dosage and mean phenotype. Define the within-stratum sums of squares and cross-products as

$$ S_{GG,s}=\sum_i(G_{is}-\bar{G}_s)^2,\qquad S_{GY,s}=\sum_i(G_{is}-\bar{G}_s)(Y_{is}-\bar{Y}_s). $$

If \(S_{GG,s}>0\), the least-squares slope and intercept are

$$ \hat{\beta}_s=\frac{S_{GY,s}}{S_{GG,s}},\qquad \hat{\alpha}_s=\bar{Y}_s-\hat{\beta}_s\bar{G}_s. $$

These formulas center genotype and phenotype on their own stratum means. Thus the slope is obtained from within-stratum variation, not from differences between stratum means.

Justification: Least squares chooses \(\alpha_s\) and \(\beta_s\) to minimize \(\sum_i(Y_{is}-\alpha_s-\beta_sG_{is})^2\). Setting the derivative with respect to \(\alpha_s\) to zero gives \(\hat{\alpha}_s=\bar{Y}_s-\hat{\beta}_s\bar{G}_s\). Substituting this into the derivative with respect to \(\beta_s\) gives \(\sum_i(G_{is}-\bar{G}_s)(Y_{is}-\bar{Y}_s)=\hat{\beta}_s\sum_i(G_{is}-\bar{G}_s)^2\). Dividing by \(S_{GG,s}\) yields the slope formula when \(S_{GG,s}>0\).

Worked Examples

Worked Example: Estimating Effects in Two Strata

Suppose a hypothetical study measures a quantitative phenotype in units. In ancestry stratum A, the six observed \((G,Y)\) pairs are \((0,10),(1,12),(2,14),(0,11),(1,13),(2,15)\). In stratum B, they are \((0,20),(1,21),(2,22),(0,20),(1,21),(2,22)\). Fit a separate dosage slope in each stratum.

Stratum A. The means are \(\bar{G}_A=1\) and \(\bar{Y}_A=12.5\). The centered genotype values are \(-1,0,1,-1,0,1\), so

$$ S_{GG,A}=1+0+1+1+0+1=4. $$

The centered phenotype values are \(-2.5,-0.5,1.5,-1.5,0.5,2.5\). Multiplying paired centered values gives

$$ S_{GY,A}=2.5+0+1.5+1.5+0+2.5=8. $$

Therefore, \(\hat{\beta}_A=8/4=2\) phenotype units per allele copy, and \(\hat{\alpha}_A=12.5-(2)(1)=10.5\). The estimated within-stratum mean phenotype increases by 2 units for each additional copy under the fitted additive model.

Stratum B. Here \(\bar{G}_B=1\) and \(\bar{Y}_B=21\). The genotype values have the same centered pattern, so \(S_{GG,B}=4\). The phenotype deviations are \(-1,0,1,-1,0,1\), giving \(S_{GY,B}=1+0+1+1+0+1=4\). Thus \(\hat{\beta}_B=4/4=1\) unit per allele copy and \(\hat{\alpha}_B=21-(1)(1)=20\).

Both strata contain observations at dosages 0, 1, and 2, so each slope uses within-stratum variation across the full dosage range. The point estimates differ, but these calculations alone do not establish whether the difference is more than sampling variability.

Worked Example: A Stratum With Only Two Observed Dosages

In a hypothetical stratum, six individuals have genotype–phenotype pairs \((0,4),(0,5),(0,6),(1,6),(1,7),(1,8)\). Estimate the additive slope and describe what dosage comparison is supported.

The means are \(\bar{G}=0.5\) and \(\bar{Y}=6\). Each of the six genotype deviations is either \(-0.5\) or \(0.5\), so \(S_{GG}=6(0.25)=1.5\). The centered phenotype values are \(-2,-1,0,0,1,2\). The cross-products sum to

$$ S_{GY}=(-0.5)(-2)+(-0.5)(-1)+(-0.5)(0)+(0.5)(0)+(0.5)(1)+(0.5)(2)=3. $$

Thus \(\hat{\beta}=3/1.5=2\) phenotype units per allele copy. The intercept is \(\hat{\alpha}=6-(2)(0.5)=5\). The fitted means are 5 units at dosage 0 and 7 units at dosage 1.

The slope is estimable because \(S_{GG}>0\), and both observed dosage groups contain three individuals. However, no individual has dosage 2. The data directly compare dosages 0 and 1; a fitted mean at dosage 2 would extend the assumed linear relationship beyond the observed range rather than being supported by an observed dosage-2 group.

Worked Example: Sparse Dosage Data and Sensitivity to One Observation

Consider a hypothetical stratum with pairs \((0,5),(0,5),(0,6),(1,7),(2,12)\). Estimate the slope, then examine the effect of omitting the single dosage-2 individual. This calculation illustrates why genotype counts matter even when a slope can be computed.

All five individuals. The genotype mean is \(\bar{G}=3/5=0.6\), and the phenotype mean is \(\bar{Y}=35/5=7\). The genotype squared-deviation sum is

$$ S_{GG}=3(0-0.6)^2+(1-0.6)^2+(2-0.6)^2 =3(0.36)+0.16+1.96=3.2. $$

The centered genotype–phenotype products are \(1.2,1.2,0.6,0,7\), which sum to \(S_{GY}=10\). Therefore,

$$ \hat{\beta}=\frac{10}{3.2}=3.125 $$

phenotype units per allele copy. Only one person has dosage 2, so that individual contributes substantial leverage: the estimate may be sensitive to that observation.

After omitting that individual. The remaining pairs are \((0,5),(0,5),(0,6),(1,7)\), with \(\bar{G}=0.25\) and \(\bar{Y}=5.75\). Their cross-product sum is \(S_{GY}=1.25\). The genotype squared-deviation sum is

$$ S_{GG}=3(0-0.25)^2+(1-0.25)^2 =3(0.0625)+0.5625=0.75. $$

The resulting slope is \(1.25/0.75=1.667\) phenotype units per allele copy, approximately. Removing the single dosage-2 observation changes the estimate from 3.125 to 1.667. This sensitivity is a warning about sparse support, not a reason to select whichever estimate is preferred. The stratum has only one dosage-2 observation, and the observed data provide little basis for judging how well the additive relationship represents that genotype group.

Check Whether Each Stratum Supports Its Estimate

Before interpreting a slope, inspect genotype counts within every stratum. The most basic diagnostic is whether there is any genotype variation at all. If \(S_{GG,s}=0\), every dosage equals \(\bar{G}_s\), and the slope formula has a zero denominator. No within-stratum genotype effect is estimable from those data. A slope calculated from other strata cannot fill that gap without changing the analysis question.

When \(S_{GG,s}>0\), the slope is mathematically estimable, but that fact alone does not mean the data support a dependable estimate. A useful review includes:

  • Counts by dosage: Record how many individuals have dosage 0, 1, and 2 in each stratum. Empty or nearly empty categories limit direct comparisons.
  • Range of observed dosage: Check whether the fitted slope relies on extrapolation beyond observed values, as it would for dosage 2 in the second example.
  • Influential observations: A rare dosage category may contain a single person whose phenotype has a large effect on the estimated slope.
  • Phenotype information: A genotype category with several people can still be uninformative if phenotype measurements are highly variable or missing.
  • Model assumptions: Consider whether a linear change per allele copy and the required error assumptions are plausible within the stratum.

For the simple linear model, if residuals are \(e_{is}=Y_{is}-\hat{\alpha}_s-\hat{\beta}_sG_{is}\), the residual sum of squares is \(SSE_s=\sum_i e_{is}^2\). When \(n_s>2\), the estimated residual variance is \(MSE_s=SSE_s/(n_s-2)\), and the usual estimated standard error of the slope is

$$ SE(\hat{\beta}_s)=\sqrt{\frac{MSE_s}{S_{GG,s}}}. $$

This formula shows two ways precision can suffer: residual variability can be large, or genotype variation \(S_{GG,s}\) can be small. It does not remove the need to inspect dosage counts. In particular, a small standard error under a model does not make an unobserved genotype category observed, nor does it guarantee that the model describes the data well.

Why the Stratum-Specific View Matters

Ancestry strata can differ in genotype frequencies, phenotype distributions, or both. A separate slope makes the genotype–phenotype comparison within each stratum explicit and prevents between-stratum mean differences from being treated as if they were within-stratum genotype variation. The interpretation remains conditional on how strata were defined and on the adequacy of the within-stratum model; stratification does not automatically remove every source of confounding.

Strata should be defined using ancestry information rather than chosen after inspecting which grouping produces a preferred association. Also report strata that are too sparse to support an informative estimate. Omitting such a limitation can make a set of separate slopes appear more comprehensive than the genotype data allow.

Common Mistakes

  • Wrong: “The slope can be estimated because the full sample contains all three genotype dosages.” Correction: Check variation within each stratum. A stratum with one observed dosage has \(S_{GG,s}=0\) and no estimable within-stratum slope.
  • Wrong: “A computed slope is necessarily well supported.” Correction: A slope can exist with very sparse dosage counts and be highly sensitive to one observation. Report the counts and assess the range of observed genotypes.
  • Wrong: “A slope based on dosages 0 and 1 demonstrates the observed phenotype pattern at dosage 2.” Correction: The dosage-2 pattern is not observed in that stratum; any fitted value there extends the model beyond the data.
  • Wrong: “A stratum-specific association proves the allele causes the phenotype.” Correction: The slope describes an association under the specified model. It does not establish causation.
Key takeaway: Estimate the genotype effect from within-stratum variation, interpret it in phenotype units per allele copy, and report whether each stratum has enough genotype support to make that estimate informative.

Check Your Understanding

Use the model and diagnostics from this tutorial to answer the following questions.

  1. In a stratum, all observed individuals have genotype dosage 1. What is \(S_{GG,s}\), and can the stratum-specific slope be estimated?
  2. A stratum has observed dosages 0 and 1 but no dosage-2 individuals. Which dosage comparison is directly supported, and what limitation should be stated?
  3. Why is the slope calculated after centering \(G\) and \(Y\) within a stratum a within-stratum association rather than a comparison of stratum means?
  4. Two strata have estimated slopes of 1.2 and 2.0 phenotype units per allele copy. What do these estimates describe, and what additional question is not answered merely by observing that they differ?
  5. A stratum has a nonzero \(S_{GG,s}\), but only one person has dosage 2. Name one reason the estimate may be unstable and one data summary that should be reported.
Clinical Biostats