Tutorials › Statistical Genetics › Worked Analysis Of A Two-Locus Association

Gene–Gene Interaction · Tutorial 832 of 989

Worked Analysis Of A Two-Locus Association

Fit and interpret a two-locus regression model, test its interaction term, and assess whether the observed genotype cells support the analysis.

Advanced 10 min read

What You'll Learn

  • Code two genotypes as allele dosages and construct their product term
  • Fit and interpret a hierarchical additive-by-additive regression model
  • Calculate a joint interaction test and confidence interval from a simulated dataset
  • Distinguish an interaction association from a causal effect
  • Assess how genotype-cell counts affect the stability and scope of an estimate

From Genotype Coding to an Interaction Test

A two-locus association analysis connects three decisions: how genotypes are represented, what regression model is fitted, and which interaction hypothesis is tested. A product term can be computed correctly and still be misleading if the model is poorly supported by the observed genotype combinations or if its coefficient is interpreted outside the coding scheme. This worked analysis follows one hypothetical quantitative-trait dataset from coding through estimation and uncertainty.

The example uses additive allele-dosage coding at both loci. It estimates one additive-by-additive product term, so the interaction block contains one coefficient. The joint test of that block is therefore a one-degree-of-freedom test. This is not a general test of every possible form of gene–gene interaction: a model allowing dominance or arbitrary genotype-specific effects would require additional terms and a different joint test.

Definition: Let \(A\) and \(B\) be allele dosages at two loci, each coded as 0, 1, or 2 copies of a specified effect allele. The additive-by-additive product term is \(AB\). In the hierarchical linear model $$ Y_i=\beta_0+\beta_A A_i+\beta_B B_i+\beta_{AB}A_iB_i+\varepsilon_i, $$ \(\beta_{AB}\) is the interaction coefficient on the mean scale: it describes how the fitted change in mean outcome per additional \(A\)-allele copy varies with \(B\)-allele dosage. The model includes both main effects as well as their product.

Here \(Y_i\) is a quantitative trait for individual \(i\), and \(\varepsilon_i\) is the model error. The coefficients describe conditional mean differences, not causal effects. For example, \(\beta_A\) is the fitted difference per additional \(A\)-allele copy when \(B=0\); it is not necessarily the average effect of locus \(A\) across all \(B\) dosages.

Assumptions and the Simulated Dataset

For the worked inference below, assume individuals are independent, the conditional mean is given by the stated regression model, and errors have mean zero and a common variance \(\sigma^2\). Assume also that the errors are normally distributed for exact small-sample \(t\)- and \(F\)-inference. The simulated dataset has no missing observations or additional covariates. In an actual association analysis, these assumptions and the choice of covariates would need substantive and empirical consideration; the numerical example alone cannot establish them.

Suppose 36 hypothetical individuals are observed, with four individuals in each of the nine dosage combinations. The table gives the mean trait value in each genotype cell. Trait values are in arbitrary trait units.

\(A\) dosage\(B=0\) cell mean\(B=1\) cell mean\(B=2\) cell meanIndividuals per cell
010.09.08.04
112.012.513.04
214.016.018.04

To make the individual-level data explicit, suppose that within every cell the four outcomes equal that cell's mean plus \(-1.0\), \(-0.5\), \(0.5\), and \(1.0\) trait units. These deviations sum to zero, so the displayed values are the cell means. Their squared sum within a cell is \(1^2+0.5^2+0.5^2+1^2=2.5\).

Worked Example: Coding the Two Loci

An individual has genotype \(A/a\) at locus \(A\) and \(b/b\) at locus \(B\), where \(A\) and \(b\) are the effect alleles. The dosage for locus \(A\) is \(A_i=1\), and the dosage for locus \(B\) is \(B_i=2\). The product term is $$ A_iB_i=(1)(2)=2. $$

That individual's model-predicted mean is therefore \(\beta_0+\beta_A+2\beta_B+2\beta_{AB}\). The product is a predictor value, not a genotype category or an outcome. If the effect allele at a locus is recoded, the corresponding main-effect and interaction coefficients change; comparisons require consistent allele coding.

Fitting the Hierarchical Regression

In this balanced dataset, the cell means follow the stated regression surface exactly. The cell at \((A,B)=(0,0)\) has mean 10, so \(\hat{\beta}_0=10\). Moving from \((0,0)\) to \((1,0)\) changes the mean from 10 to 12, giving \(\hat{\beta}_A=2\) trait units per \(A\)-allele copy when \(B=0\). Moving from \((0,0)\) to \((0,1)\) changes the mean from 10 to 9, giving \(\hat{\beta}_B=-1\) trait unit per \(B\)-allele copy when \(A=0\). The cell at \((1,1)\) then gives the product coefficient: $$ \hat{\beta}_{AB} =\bar{Y}_{11}-\bar{Y}_{10}-\bar{Y}_{01}+\bar{Y}_{00} =12.5-12.0-9.0+10.0 =1.5\text{ trait units per dosage-product unit}. $$

The resulting fitted model is $$ \widehat{E}(Y_i\mid A_i,B_i)=10+2A_i-B_i+1.5A_iB_i. $$ For example, at \(A=2\) and \(B=2\), the fitted mean is \(10+2(2)-2+1.5(2)(2)=18\) trait units, matching the table. The remaining cells also match the model. Thus, the regression fit to the cell means has no lack of fit on this grid; individual outcomes still vary around those means.

Worked Example: Estimating Residual Variance and Interaction Uncertainty

The residual sum of squares measures variation of individual outcomes around their fitted values. Each of the nine cells has four observations, and the four deviations in each cell have a squared sum of 2.5. Therefore, $$ SSE=9(2.5)=22.5. $$

The model estimates four coefficients: an intercept, two main effects, and one interaction. With \(n=36\), the residual degrees of freedom are \(df=36-4=32\), and $$ MSE=\frac{SSE}{df}=\frac{22.5}{32}=0.703125\text{ trait units}^2. $$

For this balanced design, the product term, after accounting for the intercept and the two main effects, has a residualized sum of squares of 16. Thus its estimated standard error is $$ SE(\hat{\beta}_{AB})=\sqrt{\frac{MSE}{16}} =\sqrt{\frac{0.703125}{16}} =\sqrt{0.0439453125} \approx0.2096\text{ trait units per dosage-product unit}. $$

This uncertainty uses information across all nine cells under the specified regression model. It is not the same calculation as taking a four-cell difference and ignoring the other genotype combinations.

The Joint Interaction Test and Interval

For this additive-by-additive model, the interaction block consists only of \(\beta_{AB}\). Its joint null hypothesis is therefore \(H_0:\beta_{AB}=0\), against \(H_a:\beta_{AB}\ne0\). The test statistic is the estimate divided by its standard error. Under the null and the stated linear-model assumptions, it follows a \(t\) distribution with 32 degrees of freedom.

$$ t=\frac{\hat{\beta}_{AB}-0}{SE(\hat{\beta}_{AB})} =\frac{1.5}{\sqrt{0.703125/16}} \approx7.155,\qquad df=32. $$

The equivalent one-degree-of-freedom \(F\) test is \(F=t^2\approx51.20\), with 1 and 32 degrees of freedom. The two-sided \(p\)-value is less than 0.0001. At a significance level of \(\alpha=0.05\), this simulated dataset provides evidence against the null of no additive-by-additive interaction on the mean scale. The \(p\)-value does not give the probability that the null hypothesis is true, and it does not establish a causal mechanism.

A 95% confidence interval uses the \(t\) critical value \(t_{0.975,32}\approx2.037\):

$$ 1.5\pm2.037(0.2096) =1.5\pm0.427 =[1.073,\ 1.927]\text{ trait units per dosage-product unit}. $$

The interval gives a range of values compatible with the data and model under the repeated-sampling procedure used to construct 95% intervals. In context, the estimated change in the \(A\)-dosage slope for each additional \(B\)-allele copy is 1.5 trait units, with the interval from 1.073 to 1.927 trait units per dosage-product unit.

Interpretation: The positive interaction estimate means that, under this model, the fitted mean difference associated with an additional \(A\)-allele copy increases by 1.5 trait units for each additional \(B\)-allele copy. It is an association on the quantitative-trait mean scale, conditional on the model's coding and included terms; it is not evidence by itself that either locus causes the trait or that a biological interaction mechanism has been identified.

Genotype-Cell Support and Scope

A regression coefficient can look precise while depending on genotype combinations that are rare or absent. In this simulated dataset every one of the nine dosage cells contains four individuals. That balanced support makes the fitted surface estimable across the observed dosage grid and avoids relying on an empty cell. Four observations per cell are still a modest amount of support, so the precision comes partly from the model's assumption that the mean surface has the specified additive, additive, and product form.

If one or more dosage combinations were absent, the data might not identify all coefficients, or their estimates could be highly sensitive to a few observations. Even with all cells represented, a dosage-product model imposes a particular shape: it does not allow every genotype combination to have an unrelated mean. The count in each cell should therefore be considered alongside the coefficient, interval, and test result. A small \(p\)-value does not repair weak support or validate a misspecified mean model.

Worked Example: Reading the Interaction Through Cell Means

Use the four cells with \(A=0\) or 1 and \(B=0\) or 1. The change across \(A\) when \(B=0\) is \(12.0-10.0=2.0\) trait units per \(A\)-allele copy. The change across \(A\) when \(B=1\) is \(12.5-9.0=3.5\) trait units per \(A\)-allele copy. Their difference is $$ (12.5-9.0)-(12.0-10.0)=3.5-2.0=1.5\text{ trait units}. $$

This is the same cross-difference that produced \(\hat{\beta}_{AB}=1.5\). The interpretation is a change in the \(A\)-dosage slope across adjacent \(B\) dosages, not a comparison of two biological processes or proof of causation. The complete regression estimate uses all nine cells, whereas this four-cell calculation makes the contrast's meaning transparent.

Common Mistake

1
Code consistently.
Define the effect allele at each locus, assign dosages 0, 1, or 2, and calculate the product term.
2
State the model and assumptions.
Include the two main effects with their product, specify the outcome scale, and identify the assumptions used for inference.
3
Estimate and test the interaction block.
Report the coefficient, standard error, degrees of freedom, test result, and interval in context.
4
Check cell support and interpret narrowly.
Describe which genotype combinations are represented, and distinguish a model-based association from a causal claim.

Check Your Understanding

Use the model and simulated dataset above to answer the following questions.

  1. For an individual with \(A=2\) and \(B=1\), what is the product-term value, and what mean does the fitted model predict?
  2. State the null hypothesis tested by the one-degree-of-freedom interaction test. Why is this not a test of all possible forms of two-locus interaction?
  3. Explain the meaning and units of the estimated interaction coefficient in terms of the \(A\)-dosage slope.
  4. Why does the confidence interval not mean there is a 95% probability that the fixed interaction coefficient lies in this particular interval?
  5. What could happen to estimation or interpretation if one of the nine genotype cells had no individuals?
Back to Tutorials
Clinical Biostats