11.5 Expected mean squares in general

For balanced designs with any number of crossed factors, the expected mean squares follow a rule that reproduces the theorems above. Give each term of the model its subscripts (\(A\) has \(i\), \(AB\) has \(ij\), error has all subscripts including the replicate index). A term is random if it involves at least one random factor.

Result 11.5.1 (Rule for expected mean squares). For a term \(E\) of the model, \(E(MS_E)\) is \(\sigma ^2\) plus a contribution \(c_T\phi _T\) from each term \(T\) whose subscripts include all those of \(E\) and which satisfies the inclusion condition below. Here

  • \(c_T\) is the product of the numbers of levels of the subscripts not in \(T\) (including \(n\) for the replicate);
  • \(\phi _T = \sigma ^2_T\) if \(T\) is random, and for \(T = E\) fixed, \(\phi _E\) is the sum of squares of the fixed effects divided by the degrees of freedom of \(E\).

Restricted model: \(T\) contributes if \(T = E\), or if every subscript of \(T\) that is not in \(E\) belongs to a random factor. Unrestricted model: \(T\) contributes if \(T = E\), or if \(T\) is random.

For example, with \(A\) fixed and \(B\) random, \(AB\) contributes to \(E(MS_A)\) (its extra subscript \(j\) is random) but not, in the restricted model, to \(E(MS_B)\) (its extra subscript \(i\) is fixed). With both factors fixed nothing but \(E\) itself contributes, which is the fixed effects analysis.

Applied to three factors with \(A\) fixed and \(B\), \(C\) random, the restricted rule gives, with \(Q_A = \sum _i\tau _i^2/(a - 1)\), \begin {align*} E(MS_A) &= \sigma ^2 + n\sigma ^2_{\tau \beta \gamma } + cn\sigma ^2_{\tau \beta } + bn\sigma ^2_{\tau \gamma } + bcnQ_A , \\ E(MS_B) &= \sigma ^2 + an\sigma ^2_{\beta \gamma } + acn\sigma ^2_\beta , \qquad E(MS_C) = \sigma ^2 + an\sigma ^2_{\beta \gamma } + abn\sigma ^2_\gamma , \\ E(MS_{AB}) &= \sigma ^2 + n\sigma ^2_{\tau \beta \gamma } + cn\sigma ^2_{\tau \beta } , \qquad E(MS_{AC}) = \sigma ^2 + n\sigma ^2_{\tau \beta \gamma } + bn\sigma ^2_{\tau \gamma } , \\ E(MS_{BC}) &= \sigma ^2 + an\sigma ^2_{\beta \gamma } , \qquad E(MS_{ABC}) = \sigma ^2 + n\sigma ^2_{\tau \beta \gamma } . \end {align*}

(A simulation with \(a = 3\), \(b = 4\), \(c = n = 2\) and \(80\,000\) replications reproduces every line to within simulation error.) Every term except \(A\) now has an exact test: \(B\) and \(C\) against \(BC\), \(AB\) and \(AC\) against \(ABC\), \(BC\) and \(ABC\) against error. But no single mean square has expectation \(\sigma ^2 + n\sigma ^2_{\tau \beta \gamma } + cn\sigma ^2_{\tau \beta } + bn\sigma ^2_{\tau \gamma }\), which is what \(E(MS_A)\) becomes under \(H_0\). A combination does: \[ E(MS_{AB} + MS_{AC} - MS_{ABC}) = \sigma ^2 + n\sigma ^2_{\tau \beta \gamma } + cn\sigma ^2_{\tau \beta } + bn\sigma ^2_{\tau \gamma } . \]

Definition 11.5.2. An approximate or quasi \(F\) test compares a mean square \(MS_E\) with a linear combination of mean squares having the same expectation under \(H_0\), \[ F_0 = \frac {MS_A}{MS_{AB} + MS_{AC} - MS_{ABC}} , \] referred to \(F_{a-1, \hat \nu }\) with \(\hat \nu \) from Proposition 11.2.3. To avoid a negative denominator one may instead use \[ F_0' = \frac {MS_A + MS_{ABC}}{MS_{AB} + MS_{AC}} , \] with Satterthwaite degrees of freedom for both numerator and denominator.

Remark. For unbalanced data the sums of squares are no longer independent scaled \(\chi ^2\) variables and the rule fails. Variance components are then estimated by REML and fixed effects tested with approximate degrees of freedom (Satterthwaite or Kenward–Roger), as mixed-model software does.

Questions on this section

Stuck on something here? Ask below and it stays attached to this topic.