Tutorials › Statistical Genetics › Deriving Product-Term Effects Under Additive Coding

Gene–Gene Interaction · Tutorial 817 of 989

Deriving Product-Term Effects Under Additive Coding

Learn to derive the product-term coefficient from genotype-specific means and identify which two-locus patterns that term can—and cannot—represent.

Advanced 10 min read

What You'll Learn

  • Write the two-locus additive-dosage regression mean model with a product term.
  • Derive the product coefficient as a difference-in-differences of genotype means.
  • Interpret the coefficient in trait units per dosage step at each locus.
  • Check whether a table of genotype means follows the product-term model.
  • Distinguish product-term interaction from within-locus curvature and more complex departures.
  • Identify the assumptions needed for a regression coefficient to have its stated interpretation.

Why Derive the Product-Term Coefficient?

A regression product term is often introduced as a concise way to represent a two-locus interaction. Its meaning becomes clearer by asking what pattern of genotype-specific means the term imposes. With additive dosage coding, the product coefficient does not allow every cell in a two-locus table to vary independently. It represents a particular pattern: the change in mean associated with one dosage step at one locus is modified by each dosage step at the other locus by a constant amount.

This tutorial derives that claim directly from the model. The outcome considered is quantitative, and \(G_A\) and \(G_B\) denote the counts of the coded allele at loci A and B, respectively, each taking values 0, 1, or 2. The discussion concerns conditional means, not a biological mechanism: a fitted product term describes a statistical pattern in the modeled means and does not, by itself, establish biological interaction or causation.

Definition: Under additive dosage coding, the two-locus product-term mean model is $$ E(Y\mid G_A,G_B)=\beta_0+\beta_A G_A+\beta_B G_B+\beta_{AB}G_A G_B. $$ Here \(\beta_0\) is the mean at \((G_A,G_B)=(0,0)\); \(\beta_A\) and \(\beta_B\) are the one-copy dosage changes at the other locus's zero dosage; and \(\beta_{AB}\) is the change in either locus's dosage effect for each one-copy increase at the other locus. The outcome \(Y\) and all coefficients are expressed in the outcome's units.

The model is a statement about the conditional mean. For regression interpretation, assume the observed outcome can be written as this mean plus an error with conditional expectation zero: \(E(\varepsilon\mid G_A,G_B)=0\). For standard regression uncertainty calculations, observations are also ordinarily taken to be independent, with any additional variance assumptions depending on the method used. The mean-model derivation below does not require normally distributed errors.

The term “additive coding” refers to representing a genotype by its allele-count dosage, not to a claim that the biology is necessarily additive. A product term allows the dosage effect at one locus to vary with dosage at the other, but it places a specific constraint on how it varies.

Deriving the Difference-in-Differences

Write \(\mu(a,b)=E(Y\mid G_A=a,G_B=b)\). At fixed dosage \(b\), the mean change for a one-copy increase at A is \(\mu(a+1,b)-\mu(a,b)\). Substituting the regression model gives

$$ \begin{aligned} \mu(a+1,b)-\mu(a,b) &=\{\beta_0+\beta_A(a+1)+\beta_Bb+\beta_{AB}(a+1)b\}\\ &\quad-\{\beta_0+\beta_Aa+\beta_Bb+\beta_{AB}ab\}\\ &=\beta_A+\beta_{AB}b. \end{aligned} $$

Thus, for each additional copy at B, the A dosage effect changes by \(\beta_{AB}\). The same reasoning with the loci reversed gives a B dosage effect of \(\beta_B+\beta_{AB}a\) when the A dosage is \(a\).

Equivalently, take the difference between A's one-copy effect at B dosage \(b+1\) and its effect at dosage \(b\). The main effect \(\beta_A\) cancels, leaving the product coefficient:

$$ \begin{aligned} &\{\mu(a+1,b+1)-\mu(a,b+1)\}\\ &\quad-\{\mu(a+1,b)-\mu(a,b)\} =\beta_{AB}. \end{aligned} $$

This is a difference-in-differences. It can also be written as a four-cell contrast:

$$ \beta_{AB} =\mu(a+1,b+1)-\mu(a+1,b)-\mu(a,b+1)+\mu(a,b). $$

Under the stated model, this contrast has the same value for every adjacent two-by-two square in the 3-by-3 genotype table. That constancy is the central restriction imposed by a single product term.

Worked Example: Recovering the Product Coefficient From Adjacent Cells

Suppose hypothetical mean trait values, in trait units, include \(\mu(0,0)=10\), \(\mu(1,0)=12\), \(\mu(0,1)=13\), and \(\mu(1,1)=15.5\). Calculate the product-term contrast for the square formed by dosages 0 and 1 at both loci.

Using the four-cell formula,

$$ \begin{aligned} \beta_{AB} &=\mu(1,1)-\mu(1,0)-\mu(0,1)+\mu(0,0)\\ &=15.5-12-13+10\\ &=0.5\text{ trait units per dosage step at each locus.} \end{aligned} $$

The same result follows by comparing A's dosage effect across the two B levels: at \(G_B=0\), the change is \(12-10=2\) trait units; at \(G_B=1\), it is \(15.5-13=2.5\). The difference is \(2.5-2=0.5\). In the product-term model, one additional copy at B therefore increases the modeled one-copy effect of A by 0.5 trait units. This interpretation describes the mean model; it does not imply that either locus causes the outcome.

What the Product-Term Model Requires

The coefficient's interpretation can be checked against all nine genotype means. Substituting the three possible dosages into the model yields a 3-by-3 pattern determined by four coefficients. The product term allows cross-locus modification, but it requires the cross-difference to be constant across adjacent genotype squares. It also retains linear dosage effects at each locus when the other dosage is held fixed.

Genotype-mean featureRestriction under the modelWhat a departure indicates
A dosage effect as B dosage changesIt changes by the same \(\beta_{AB}\) for every one-copy increase at B.A nonconstant change requires additional terms or a different mean model.
Dosage steps within A at fixed BThe two adjacent A steps have equal effects at each fixed B dosage.Unequal steps indicate curvature in A dosage, such as a quadratic term.
Dosage steps within B at fixed AThe two adjacent B steps have equal effects at each fixed A dosage.Unequal steps indicate curvature in B dosage, such as a quadratic term.

Worked Example: Checking a Table That Follows the Model

Consider the following hypothetical genotype-specific mean values, all in trait units.

\(G_A\)\(G_B=0\)\(G_B=1\)\(G_B=2\)
0101316
11215.519
2141822

At \((0,0)\), the mean is 10, so \(\beta_0=10\). At \(G_B=0\), the first A dosage step is \(12-10=2\), giving \(\beta_A=2\). At \(G_A=0\), the first B dosage step is \(13-10=3\), giving \(\beta_B=3\). The first square gives

$$ \beta_{AB}=15.5-12-13+10=0.5. $$

These coefficients predict the mean model

$$ \mu(a,b)=10+2a+3b+0.5ab. $$

For example, at \((2,1)\), the predicted mean is \(10+2(2)+3(1)+0.5(2)(1)=18\), matching the table. At \((1,2)\), it is \(10+2(1)+3(2)+0.5(1)(2)=19\), also matching.

The dosage-step checks agree with the same coefficient. The A changes across the B levels for the first step are \(12-10=2\), \(15.5-13=2.5\), and \(19-16=3\). The second A step changes are \(14-12=2\), \(18-15.5=2.5\), and \(22-19=3\). In each series, the effect rises by 0.5 for each one-copy increase at B. In particular, at \(G_B=2\), the first A step is \(19-16=3\); the value 18 belongs to \((G_A,G_B)=(2,1)\), not \((1,2)\).

Departures That Need More Than One Product Term

A product term does not represent every possible departure from two separate dosage effects. For example, if the first and second copies at A have different effects, then the mean is curved as a function of A dosage. One way to represent that curvature is to add \(G_A^2\); \(G_B^2\) can similarly represent curvature at B. These terms allow unequal dosage steps within a locus, but they are not themselves cross-locus product terms.

More complicated cross-locus patterns also require terms beyond \(G_A G_B\). For instance, \(G_A^2G_B\) allows the cross-locus modification to vary with A dosage, while \(G_AG_B^2\) allows it to vary with B dosage. A term \(G_A^2G_B^2\) permits a further joint curvature pattern. With dosages 0, 1, and 2 at each locus, the nine functions formed by multiplying \(1,G_A,G_A^2\) by \(1,G_B,G_B^2\) can represent any set of nine cell means. The four-term model uses only \(1,G_A,G_B,G_AG_B\), so it is deliberately more restrictive.

Worked Example: Detecting a Departure That Requires an Additional Term

Suppose hypothetical means follow \(\mu(a,b)=10+2a+3b+0.5ab+0.25a^2b\), with dosage values 0, 1, and 2. The added \(0.25a^2b\) term is included here to illustrate a pattern that a single product term cannot capture. The resulting table is:

\(G_A\)\(G_B=0\)\(G_B=1\)\(G_B=2\)
0101316
11215.7519.5
2141924

For the square with A dosages 0 and 1 and B dosages 0 and 1, the cross-difference is \(15.75-12-13+10=0.75\) trait units. For the adjacent square with A dosages 1 and 2 over the same B dosages, it is \(19-15.75-14+12=1.25\) trait units. Since these cross-differences differ, there is no single constant \(\beta_{AB}\) that reproduces all four square contrasts. The \(G_A^2G_B\) term accounts for the change in cross-difference with A dosage.

This example also shows why a product coefficient from a misspecified regression should not automatically be read as the same simple cell contrast everywhere. If the mean pattern violates the model, an estimated coefficient summarizes a design-dependent regression fit; it need not equal every genotype-specific difference-in-differences. The exact weighting depends on the observed genotype distribution and the fitting procedure.

Derivation of the Model's Dosage-Effect Restrictions

The restrictions can be verified directly from the adjacent dosage increments. For A at fixed B dosage \(b\), the first increment is \(\beta_A+\beta_{AB}b\). The next A increment is

$$ \begin{aligned} \mu(2,b)-\mu(1,b) &=\{\beta_0+2\beta_A+\beta_Bb+2\beta_{AB}b\}\\ &\quad-\{\beta_0+\beta_A+\beta_Bb+\beta_{AB}b\}\\ &=\beta_A+\beta_{AB}b. \end{aligned} $$

Thus the two adjacent A dosage steps must match at each fixed B dosage. Repeating the same subtraction for B gives equal adjacent B steps at each fixed A dosage. Taking a difference of either locus's dosage effect across the other locus then yields the same \(\beta_{AB}\), as shown by the difference-in-differences derivation. These are consequences of the model, not optional interpretations added after fitting it.

In real regression data, the cell means may be estimated with unequal precision, and some genotype combinations may be rare or absent. The algebraic interpretation presumes that the model's coefficients are identifiable from the observed design; if the genotype columns do not provide enough independent information, a coefficient cannot be uniquely estimated. The equations describe the assumed mean structure, while an empirical estimate also reflects the available data.

Common Mistakes and Why the Distinction Matters

  • Calling \(\beta_{AB}\) the interaction at every genotype combination. It is the constant change in a one-copy dosage effect for each dosage step at the other locus, under this model. A particular genotype's mean departure is not generally equal to the coefficient.
  • Assuming the product term captures any non-additivity. It captures bilinear modification in the two dosages. Within-locus curvature or cross-differences that vary across dosage levels need additional terms.
  • Confusing coding with biological mechanism. A dosage-coded coefficient is a statistical description of modeled means. It does not prove a molecular mechanism, and a nonzero association does not establish causation.
  • Using one four-cell contrast to validate the entire table. A single contrast estimates the product coefficient only if the model's constant-cross-difference restriction is appropriate. Other adjacent squares should be checked when cell means are available.

The distinction matters because model terms define which patterns are being tested or summarized. A product-term coefficient is interpretable and economical when the modeled dosage relationships are plausible, but it can conceal richer patterns if the cell means have curvature or changing cross-differences. Clear interpretation begins by stating the coding, the mean model, and the restrictions that follow from it.

Key takeaway: In the two-locus additive-dosage model, \(\beta_{AB}\) is a difference-in-differences: it is the change in one locus's one-copy mean effect for each one-copy increase at the other locus. A single product term requires this cross-difference to be constant across adjacent genotype squares; curvature and varying cross-differences require additional model terms.

Check Your Understanding

Use the model and distinctions developed above to answer these questions.

  1. In the product-term mean model, what does \(\beta_{AB}\) measure, and what are its units?
  2. Given \(\mu(0,0)=8\), \(\mu(1,0)=10\), \(\mu(0,1)=11\), and \(\mu(1,1)=13.4\), calculate the four-cell product-term contrast.
  3. Why must the two adjacent A dosage steps be equal when \(G_B\) is held fixed under this model?
  4. What kind of dosage pattern can a \(G_A^2\) term represent that the basic product-term model cannot?
  5. If two adjacent genotype squares have different cross-differences, why is one product coefficient not an exact description of all the cell means?
Clinical Biostats