Repeated Measures and Nested Analysis of Variance
An Outline of the Sources of Variation, Degrees of Freedom,
Expected Mean Squares, and F - Ratios
For Several Fixed, Random, and Mixed Effects Models
Notation
The following pages outline the sources of
variation, degrees of freedom, expected mean squares, and F - ratios for several
different ANOVA designs under fixed, random, and mixed effects models. Note that
the expected mean squares are comprised often of several sources of variation.
The within cell, residual, or error variation in represented as
, and is the only expected
mean square comprised of a single term. Under the fixed effects model, most of
the expected mean squares consist of a sum of ![]()
and the variance associated with that particular source of
variation. However, under the random and the mixed effects models many of the
expected mean squares consist of a sum of several terms. This is because when a
source of variation is estimated by selecting a small random subset of the
possible levels of that factor, part of the variation due to that factor arises
because of the sampling variation associated with choosing that particular set
of factor levels. When the source of variation is a fixed effect no sampling of
the factor levels occurs so no additional terms enter into the expected mean
squares. For example, in a two factor fixed effects factorial ANOVA the expected
mean squares are (a levels of A, b levels of B, and s subjects within each
cell):
|
Source |
df |
E(ms) |
F |
|
A |
a -1 |
|
MSA/MSe |
|
B |
b -1 |
|
MSB/MSe |
|
AB |
(a-1)(b-1) |
|
MSAB/MSe |
|
s|AB (error) |
ab(s-1) |
|
|
However, if factor B is random and A is fixed, the expected mean squares are not free from variation due to the sampling of factor levels:
|
Source |
df |
E(ms) |
F |
|
A |
a -1 |
|
MSA/MSAB |
|
B |
b -1 |
|
MSB/MSe |
|
AB |
(a-1)(b-1) |
|
MSAB/MSe |
|
s|AB (error) |
ab(s-1) |
|
|
Note also that each F - ratio is expressed as a
ratio of expected mean squares. The numerator of the F - ratio consists of the
expected mean square for the source of variation to be tested, and the
denominator of the F - ratio is chosen to isolate the variance associated with
that source in the numerator. Glance again at the two examples given above.
Under the fixed effects model we could write the F - ratio used to test the
effects of factor A as MSA/MSe or
. Under the mixed model
depicted in the second example the expected mean square of Factor A is
confounded with the sampling variation caused by selecting the particular random
subset of levels of factor B:
. To test the effects of
Factor A, we must choose a mean square for the denominator that will isolate
in the numerator. MSAB
will do this because it is comprised of the two necessary terms:
and ![]()
.
Throughout the pages that follow each F - ratio was constructed in the manner outlined above. Each expected mean square is derived by pooling the confounded sources of variation. I have used the lower case Greek letter "sigma" to indicate the variance associated with a particular source in all instances. Many texts use a different symbol in the fixed effects models, since in this model each source of variation arises because of a constant treatment effect rather that partly due to sampling variation in factor levels.
Other notation generally follows Keppel. For further reading on constructing expected mean squares see Appendix 4 in Keppel.
|
Notation |
Explanation |
|
AS, ABS |
Interaction of subjects with factors - found in full within subjects designs |
|
s|A, s|AB |
Subjects within levels of factor A or combinations of levels of A and B - found in partial within subjects designs |
|
AB, etc. |
Interaction of factor A and B |
|
B x s|A |
Interaction of factor B with subjects within levels of factor A |
|
C x s|AB |
Interaction of factor C with subjects nested under combinations of levels of factor A and B |
|
B|A |
Factor B nested under factor A |
|
C|B|A |
Factor C nested under both factor A and B |
|
C x B|A |
Interaction of factor C with factor B nested under factor A. Factor C is not nested |
Final note on F - ratios
As you look through these pages you will see some F - ratios that look pretty complicated, like this:
.
These are called "Quasi - F - Ratios" because that consist of a combination of expected mean squares and are only approximately F distributed. These quasi - F's will have denominator degrees of freedom equal to:
![]()
.
The numerator degrees of freedom will be those for the source of variation being tested. The reason for using these quasi - F's is that when random effects are embedded in the more complicated experimental designs there may not be a single expected mean square to place in the denominator that will isolate a particular source of variation. This is because of the additional confounded sources of variation that arise because of the sampling variation associated with choosing a subset of factor levels. Therefore, one must contrive a combination of mean squares that will isolate the source of variation of interest in the numerator. More than one quasi - F may be possible for testing a single source of variation. Those that involve the subtraction of a mean square in the denominator can produce negative ratios if the subtracted mean square is large. If this occurs an alternative quasi - F must be constructed. These may have more that one mean square in the numerator. In general for mean squares u, v, x, and w:
![]()
![]()
![]()
![]()
.
.
I. Full Within Subjects Designs
A. One - factor repeated measures ANOVA - Factor A with s subjects per treatment group is either fixed or random
|
Source |
df |
E(ms) |
F |
|
A |
(a-1) |
|
MSA/MSS|A |
|
S|A |
(a-1)(s-1) |
|
|
|
S |
(s-1) |
|
|
B. Two - factor repeated measures ANOVA (both factors with repeated measures). Factor A with a levels, Factor B with b levels and s subjects per treatment combination (Case 1 - Both factors fixed)
|
Source |
df |
E(ms) |
F |
|
A |
(a - 1) |
|
MSA/MSAS |
|
B |
(b - 1) |
|
MSB/MSBS |
|
AB |
(a - 1)(b - 1) |
|
MSAB/MSABS |
|
AS |
(a - 1)(s - 1) |
|
|
|
BS |
(b - 1)( s - 1) |
|
|
|
ABS |
(a - 1)(b - 1)(s - 1) |
|
|
|
s |
(s - 1) |
|
|
C. Two - factor repeated measures ANOVA (both factors with repeated measures). Factor A with a levels, Factor B with b levels and s subjects per treatment combination (Case 2 - Both factors random)
|
Source |
df |
E(ms) |
F |
|
A |
(a - 1) |
|
MSA/(MSABMSAS-MSABS |
|
B |
(b - 1) |
|
MSB/(MSAB+MSBS-MSABS |
|
AB |
(a - 1)(b - 1) |
|
MSAB/MSABS |
|
AS |
(a - 1)(s - 1) |
|
|
|
BS |
(b - 1)( s - 1) |
|
|
|
ABS |
(a - 1)(b - 1)(s - 1) |
|
|
|
S |
(s - 1) |
|
|
|
Source |
df |
E(ms) |
F |
|
A |
(a - 1) |
|
MSA/MSAS |
|
B |
(b - 1) |
|
MSB/(MSAB+MSBS-MSABS) |
|
AB |
(a - 1)(b - 1) |
|
MSAB/MSABS |
|
AS |
(a - 1)(s - 1) |
|
|
|
BS |
(b - 1)( s - 1) |
|
|
|
ABS |
(a - 1)(b - 1)(s - 1) |
|
|
|
s |
(s - 1) |
|
|
II. Partial Within Subjects Designs
A. Two - factor repeated measures ANOVA (Factor A - between subjects, Factor B -within subjects). Factor A with a levels, Factor B with b levels and s subjects per treatment combination (Case 1 - Both Factors fixed)
|
Source |
df |
E(ms) |
F |
|
A |
(a - 1) |
|
MSA/MSAS |
|
AS |
a(s - 1) |
|
|
|
B |
(b - 1) |
|
MSB/MSBXAS |
|
AB |
(a - 1)(b - 1) |
|
MSAB/MSBXAS |
|
BXAS |
a(s - 1)( b - 1) |
|
|
|
S |
(s - 1) |
|
|
B. Two - factor repeated measures ANOVA (Factor A - between subjects, Factor B -within subjects). Factor A with a levels, Factor B with b levels and s subjects per treatment combination (Case 2 - Factor A random and Factor B fixed)
|
Source |
df |
E(ms) |
F |
|
A |
(a - 1) |
|
MSA/MSAS |
|
AS |
a(s - 1) |
|
|
|
B |
(b - 1) |
|
MSB/MSAB |
|
AB |
(a - 1)(b - 1) |
|
MSAB/MSBXAS |
|
BXAS |
a(s - 1)( b - 1) |
|
|
|
S |
(s - 1) |
|
|
C. Two - factor repeated measures ANOVA (Factor A - between subjects, Factor B -within subjects). Factor A with a levels, Factor B with b levels and s subjects per treatment combination (Case 3 - Factor A fixed and Factor B random)
|
Source |
df |
E(ms) |
F |
|
A |
(a - 1) |
|
MSA/(MSAS+MSAB-MSBXAS) |
|
AS |
a(s - 1) |
|
|
|
B |
(b - 1) |