Why Use a Cell-Mean Table?
For two loci with three genotype categories each, the outcome means can be arranged in a three-by-three table. This representation makes a particular question visible: does the mean difference between genotypes at one locus stay the same across the genotypes at the other locus? If it does not, the table departs from an additive pattern on the quantitative-trait mean scale.
The question is about the pattern of means, not about whether either locus has an effect at all. Both loci can have substantial mean differences and still combine additively. Conversely, a departure from additivity can occur even when a summary of each locus's marginal effect looks modest.
The same condition can be written using row means, column means, and the grand mean. In the population table, define \(\mu_{i\cdot}\) as the mean for row \(i\) averaged over the three B categories with equal weighting, \(\mu_{\cdot j}\) as the corresponding column mean, and \(\mu_{\cdot\cdot}\) as the equally weighted grand mean. Equal weighting here defines a property of the nine cell means; it is not a claim that the population genotype frequencies are equal.
This equation says that the mean predicted by combining the two locus-specific patterns equals the actual cell mean. The difference between the actual mean and this additive prediction is the cell's interaction departure. In a sample, \(\bar{x}_{ij}\) estimates \(\mu_{ij}\), and the same calculations describe estimated departures.
Difference-in-Differences Contrasts
A contrast compares means using coefficients whose sum is zero. For example, compare the change from genotype 0 to genotype 1 at locus A when locus B is 0 with that same change when locus B is 1. The difference between those two changes is a difference-in-differences contrast.
Under an additive mean pattern, the A effect in the first parenthesis is \(\alpha_1-\alpha_0\), and the A effect in the second parenthesis is also \(\alpha_1-\alpha_0\). Their difference is zero. Thus, a nonzero contrast indicates that this particular A-genotype difference varies between the two stated B genotypes. The contrast is measured in the units of the quantitative trait.
Worked Example: A Single Difference-in-Differences
Suppose a hypothetical analysis gives these cell means for a trait measured in units:
| Locus A genotype | B = 0 | B = 1 | B = 2 |
|---|---|---|---|
| A = 0 | 10 | 12 | 14 |
| A = 1 | 13 | 15 | 17 |
| A = 2 | 16 | 18 | 20 |
For B = 0, the mean difference from A = 0 to A = 1 is \(13-10=3\) units. For B = 1, it is \(15-12=3\) units. Therefore,
This contrast shows no departure for this particular comparison. In fact, the entire table follows an additive pattern: moving one category higher at A adds 3 units, and moving one category higher at B adds 2 units. A zero contrast alone does not establish that every possible contrast is zero; the remaining genotype comparisons must also be considered.
For three categories at each locus, use two linearly independent contrasts within each locus. One convenient pair is \(c_1=(-1,1,0)\) and \(c_2=(-1,0,1)\), representing category 1 versus 0 and category 2 versus 0. Applying one contrast to each locus gives four cross-contrasts:
For instance, \(D_{11}\) is the comparison calculated above, and \(D_{12}\) compares the A = 0 to A = 1 difference between B = 0 and B = 2. The four contrasts correspond to the four possible pairings of the two independent contrasts at A and the two at B. Their values all equal zero if and only if the table has an additive mean pattern.
Why Four Contrasts Capture the Departure
There are nine cell means. An additive representation uses one overall mean, two independent A-genotype effects, and two independent B-genotype effects: five parameters in total. The remaining four dimensions describe departures from additivity. The following justification shows how the four cross-contrasts capture precisely those dimensions.
For each cell, subtract its row mean and column mean, then add the grand mean. The resulting residual is \(r_{ij}=\mu_{ij}-\mu_{i\cdot}-\mu_{\cdot j}+\mu_{\cdot\cdot}\). These residuals have row sums and column sums equal to zero.
Each \(c_a\) has coefficients summing to zero. Consequently, \(c_a^\mathsf{T}(\mu_{ij})c_b=c_a^\mathsf{T}(r_{ij})c_b\): the grand, row, and column patterns cancel from each cross-contrast.
The zero-row-sum, zero-column-sum residual tables have four independent entries. The two chosen contrasts span the two-dimensional zero-sum contrast space at each locus. Thus their four cross-products are a complete set of coordinates for the residual table: all four are zero exactly when every \(r_{ij}=0\).
Equivalently, \(r_{ij}=0\) in every cell means \(\mu_{ij}=\mu_{i\cdot}+\mu_{\cdot j}-\mu_{\cdot\cdot}\), the additive condition. This is why checking only one difference-in-differences is not a global test: it checks one of four independent directions of departure.
A Global Test for the Four Departures
For a balanced design with \(n\) independent observations in every cell, suppose trait values have normally distributed errors with common variance \(\sigma^2\) and are independent across individuals. The full cell-means model allows nine means; the additive model imposes four constraints. The interaction sum of squares is the variation of the observed cell means around their additive predictions, multiplied by the common cell size.
Here \(MSE\) is the pooled within-cell residual mean square from the full cell-means model. Under the null hypothesis of additivity, the statistic has an \(F\) distribution with 4 numerator degrees of freedom and \(N-9\) denominator degrees of freedom, where \(N\) is the total sample size. This reference distribution requires the stated normality, independence, and common-variance assumptions. The test asks whether the four departures jointly equal zero; it does not identify a biological mechanism.
Worked Example: Testing Additivity in a Balanced Table
Consider a hypothetical study with \(n=8\) independent observations in each of nine genotype cells. The observed cell means, in trait units, are:
| Locus A genotype | B = 0 | B = 1 | B = 2 |
|---|---|---|---|
| A = 0 | 12 | 10 | 14 |
| A = 1 | 11 | 17 | 17 |
| A = 2 | 16 | 18 | 20 |
Assume independent, normally distributed within-cell errors with a common variance, and suppose the pooled within-cell \(MSE=4\) squared trait units. The row means are 12, 15, and 18; the column means are 13, 15, and 17; and the grand mean is 15. The additive predictions are therefore the row mean plus the column mean minus 15. Subtracting these predictions from the observed means gives residuals:
The sum of squared residuals is \(2^2+(-2)^2+(-2)^2+2^2=16\). Hence,
There are \(N=9(8)=72\) observations and nine fitted cell means, so the denominator degrees of freedom are \(72-9=63\). The result is \(F(4,63)=8.00\), with \(p<0.001\). At the 0.05 significance level, reject the null hypothesis that the nine population means are additive. This provides evidence of a departure from additivity on the trait mean scale; it does not show that the loci interact biologically.
Testing One Contrast When Cell Sizes Differ
A specific contrast can also be estimated and tested directly. Suppose the cell means are estimated from independent individuals and the within-cell errors have common variance \(\sigma^2\). For a contrast with coefficients \(w_{ij}\), the estimated contrast is \(\widehat{D}=\sum_{ij}w_{ij}\bar{x}_{ij}\). Its estimated standard error, using the pooled \(MSE\), is \(\sqrt{MSE\sum_{ij}w_{ij}^2/n_{ij}}\). This formula allows unequal cell sizes; only cells with nonzero contrast coefficients contribute to this contrast's standard error.
Worked Example: An Unequal-Size Contrast
In another hypothetical study, the four relevant cell means are \(\bar{x}_{00}=10\), \(\bar{x}_{01}=12\), \(\bar{x}_{10}=13\), and \(\bar{x}_{11}=16\) trait units. Their sample sizes are 4, 5, 6, and 5, respectively. Suppose the full nine-cell model has pooled \(MSE=9\) squared trait units, based on 45 observations, and its assumptions of independent, normal, common-variance errors are reasonable.
For the difference-in-differences contrast, the coefficients for cells 11, 01, 10, and 00 are \(+1,-1,-1,+1\). Thus the estimated contrast is
The standard error is
The full cell-means model estimates nine means, so the residual degrees of freedom are \(45-9=36\). Testing \(H_0:D=0\) gives \(t=1/2.711=0.369\), with 36 degrees of freedom and a two-sided \(p\)-value of approximately 0.714. At the 0.05 level, this contrast is not statistically significant. The estimate is one trait unit, but its standard error is large relative to that estimate; the result does not establish that the population contrast is exactly zero.
Interpretation and Common Pitfalls
Cell-mean contrasts are useful because their definitions stay close to the observed genotype groups. A contrast can say exactly which A-genotype difference is being compared across which B genotypes, and its units remain those of the trait. The four-contrast global test answers a broader question: whether any departure from the additive table is supported by the data.
The word additive here refers specifically to addition of locus-specific components in the expected trait mean. It does not automatically mean an additive allele-dose model, and the nine-cell approach permits each locus to have any pattern across its three genotype categories. Nor does a statistical departure by itself establish a molecular mechanism or causal interaction. Conclusions also depend on the trait scale: additivity of means is a statement about this outcome measured on this scale.
- Mistake: One zero contrast proves the table is additive. A single contrast checks only one of four independent departure directions. Correction: use a joint four-degree-of-freedom test for the global question, or state clearly that a single contrast addresses only its specified comparison.
- Mistake: Additivity means a straight-line effect per allele. The cell-mean definition allows arbitrary effects across the three categories at each locus. Correction: distinguish additivity between loci from a separate assumption of linear genotype dosage effects.
- Mistake: A significant departure proves biological epistasis. The test detects a pattern on the chosen quantitative mean scale under its statistical assumptions. Correction: describe the scale-specific statistical result and avoid turning association into a mechanistic or causal claim.
Check Your Understanding
Work through these questions using the cell-mean definitions and formulas above.
- In a two-locus table, what does it mean for the cell means to be additive across loci?
- Why does a zero difference-in-differences for one pair of genotype comparisons not prove global additivity?
- How many independent departures from additivity are there in a three-by-three table, and why?
- In the balanced global test, what assumptions support the stated \(F\) reference distribution?
- Explain why a significant departure from additivity on the mean scale is not, by itself, proof of a biological interaction.