The A X (B X S) ANOVA: A Multivariate Approach
The A X (B X S) “mixed” ANOVA, where factor A is between/among subjects and factor
B is a repeated measures/within subjects factor, has a sphericity assumption (the same
assumption we discussed earlier when studying one-way repeated measures ANOVA). Our
example of such a design will be the first experiment in my dissertation, the same example we
used for the one-way analysis, but this time we shall not ignore the between subjects Nursing
groups variable. After downloading the data file, edit the program “MAN_1W1B.sas,” which
can be found on my SAS programs page, to point to the location of the data file and then run
the program. Variable NURS is the Nursing Group variable, identifying the species of the
subject’s foster mother, Mus, Peromyscus, or Rattus.
Mus were Nursed by and raised with, until weaning, Mus, Peromyscus, or Rattus. Later
they were tested in an apparatus where they could explore tunnels scented with clean pine
shavings, shavings scented of Mus, shavings scented of Peromyscus, or shavings scented of
Rattus. For each subject, I recorded the time spent in each tunnel, the number of visits to
each tunnel, and the latency to first entry of each tunnel. The scores were positively skewed,
so I applied a square root transformation to the times and visits scores and a log
transformation to the latency scores. In the variable names, T_, V_ and L_ are the raw scores,
and Tt_, Vt_, and Lt_ the transformed scores.
Note that nurs is identified in GLM’s CLASS statement (nurs is a classification,
categorical variable) and in the MODEL statement (nurs is a between subjects independent
variable). The MEANS statement is used to obtain means on each of the four variates and to
do LSD comparisons between nursing groups on each variate.
Simple Effects of the Between-Subjects Factor at Each Level of the WithinSubjects Factor. Since I did not employ the ‘nouni’ keyword, the first results from GLM are
the simple effects of nurs at each level of Scent. These analyses indicate that the nursing
groups do not differ significantly from one another on time spent in the clean tunnel, F(2, 33) =
0.13, p = .88, the Mus-scented tunnel, F(2, 33) = 1.39, p = .26, or the Peromyscus-scented
tunnel F(2, 33) = 1.2, p = .31, but do on the Rattus-scented tunnel, F(2, 33) = 12.86, p < .0001.
The LSD comparisons, later in the output, show that the rat-reared mice spent significantly
more time in the rat-scented tunnel than did the other two groups of mice, which did not differ
significantly from each other. Do note that SAS has used “individual error terms,” one for
each level of Scent. In his chapter on repeated measures ANOVA, Howell explains how you
could use a possibly more powerful pooled error term instead.
Mauchly’s criterion (W = .4297) indicates we have a serious lack of sphericity, so if we
were to take the univariate approach analysis, we would need to adjust the degrees of freedom
for both effects that involve the within-subjects factor, scent. If you compare this analysis with
the one-way analysis we previously did you will see that the univariate SS for scent remains
unchanged, but the error SS is reduced, due to the Scent  Nurs effect being removed from
the error term.

Copyright 2013, Karl L. Wuensch - All rights reserved.
MAN_1W1B.docx
Page 2
The multivariate approach, which does not require sphericity, gives us significant
effects for both repeated effects. See “Manova Test Criteria and Exact F Statistics for the
Hypothesis of no scent Effect.” This tests the null hypothesis that the “profile” is flat when
collapsed across the groups—that is, a plot with mean time on the ordinate and scent of tunnel
on the abscissa would produce a flat line, all means being identical. Using PILLAI’S TRACE,
which is considered more robust to violations of the MANOVA’s assumption of homogeneity
of variance-covariance matrices than is Wilks’ lambda, Scent has a significant main effect,
F(3, 31) = 13.75, p < .0001. Box’s M (available with SPSS) may be used to test this
homogeneity assumption, but with equal sample sizes (as we have) the MANOVA is
considered to be so robust to violations of this assumption that one need not worry about it at
all. If sample sizes are quite unequal and Box’s M significant at .001, one may still trust Pillai’s
trace or may randomly discard cases to equalize sample sizes.
“Manova Test Criteria and Exact F Statistics for the Hypothesis of no scentNURS
Effect” shows us that with the multivariate approach the interaction is significant, F(6, 64) 4.37,
p = .0009. This test is often called the parallelism test. If we plot each group’s profile (mean
time on ordinate, scent of tunnel on abscissa) on an interaction plot, are the profiles parallel to
one another or not? The output from PROC MEANS gives the means (in seconds) for the
untransformed data. The interaction plot below makes it pretty clear that the profile differs
among nursing groups.
“Tests of Hypotheses for Between Subjects Effects,” which is appropriate whether we
choose a univariate or a multivariate approach, indicate that (ignoring the scent variable) the
nursing groups did not significantly differ on total time spent in the tunnels, F(2, 33) = 1.02,
p = .37.
Look at the “Univariate Tests of Hypotheses for Within Subject Effects.” Note that the
unadjusted tests are both significant, Scent at .0001, ScentNurs at .0454, but we already
Page 3
decided we need to adjust the degrees of freedom. The adjustment involves multiplying both
numerator and denominator df by  (epsilon). Rather than using the overly conservative
Greenhouse-Geisser  (.7087), I elected to use the more powerful Huynh-Feldt  (.8047).
One should use the Huynh-Feldt rather than the Greenhouse-Geisser when  lies near or
above 0.75. SAS gives the adjusted p’s. Scent’s main effect remains significant, F(2.41,
79.67) = 7.51, p = .0005), but the ScentNurs interaction now falls short of significance, F(4.83,
79.67) = 2.24, p = .060).
Look at the “Analysis of Variance of Contrast Variables.” I contrasted time in the
Mus-scented tunnel with time in each of the other tunnels. The first constrast is with the clean
tunnel. The mice averaged significantly more time in the Mus-scented tunnel (346 sec) than in
the clean tunnel (148 sec), F(1, 33) = 7.67, p = .009, but the nursing groups did not
significantly differ from each other with respect to this contrast, F(2, 33) = 0.52, p = .60.
Neither of the contrasts involving the Peromyscus-scented tunnel was significant, but both
involving the Rattus-scented tunnel were. Ignoring nursing groups, the mice spent significantly
less time in the Rattus-scented tunnel than in the Mus-scented tunnel, F(1, 33) = 22.20, p ,
.001, and this contrast interacted significantly with the nursing groups variable, F(2, 33) = 4.72,
p = ..016. Note that this contrast interaction analysis is equivalent to a Scent X Nursing Group
interaction where Scent is restricted to Mus versus Rattus.
Simple Effects of the Within-Subjects Factor at Each Level of the BetweenSubjects Factor. The second invocation of PROC GLM was used to conduct simple effects
analysis of scent by level of nurs. One simply does a one-way repeated measures analysis
“BY N;”. Simple effects analysis conducted this way use “individual error terms”—that is, at
each level of nurs the analysis uses an error term computed using only the data at that level of
nurs. Howell advocated use of the pooled error term from the overall analysis in the 2 nd edition
of his text (pages 433-434), but switched to individual error terms for the simple effects of the
within-subjects factor at each level of the between-subjects factor in the 3rd edition (page 449).
For the multivariate approach, SAS gives us individual error term analyses. For the
Mus-nursed animals scent had a significant effect, F(3, 9) = 16.62, p = .0005, with the contrast
between Mus-scent and Rattus-scent being significant. For the Peromyscus-nursed animals
scent had a significant effect, F(3, 9) = 15.41, p = .0007, with the contrast between Mus-scent
and Rattus-scent being significant. Among the Rattus-nursed mice, however, the effect of
scent of tunnel was not statistically significant, F(3, 9) = 2.02, p = .18.
SAS also employs individual error terms for the univariate approach simple effects. The
basic results are the same as with the multivariate approach analysis. For the univariate
approach simple effects, if you wanted to use the pooled error from the overall analysis (MSE
= 65.162 on 99 df), you would compute the F’s yourself—for the Mus-nursed mice,
F = 232.235/65.162 = 3.564. Adjust the df using the Huynh-Feldt , from the omnibus analysis,
.8047, yielding F(2.41, 79.67) = 3.564. Use SAS’ PROBF to obtain p.
For our data, using individual error terms, both the univariate and multivariate
approaches indicated a significant simple main effect of Scent for Mus-nursed and
Peromyscus-nursed mice but not for Rattus-nursed mice. If you wish to take a multivariate
approach to the simple main effects of the repeated factor and you wish to use a pooled error
term, use the SPSS MANOVA routine explained below.
Page 4
SPSS: Point and Click
Bring into SPSS the data file TUNNEL4b.sav. Click Analyze, General Linear Model,
Repeated Measures. In the “Within-Subject Factor Name” box, enter “scent.” For “Number of
Levels” enter “4.” Click Add. Select “scent(4)” and click Define. Select t_clean, t_mus, t_pero,
and t_rat (these are the transformed variables) and scoot them into the “Within-Subjects
Variables” box. Select “nurs” and scoot it into the “Between-Subjects Factor(s)” box.
Click Post Hoc and scoot “nurs” into the “Post-hoc tests for” box. Ask for LSD tests,
Continue.
Click Contrasts. Select the contrast for “scent.” Under
“Change Contrast” select “Simple” and then select “last” for the
“Reference Category,” as shown to the right.
Click Change, Continue, OK. You will find that you get the
same basic statistics that we got with SAS. Since the omnibus
effect of the scent variable was not significant, our use of the “post
hoc” Fisher’s LSD was only for pedagogical purpose. Do note that
the output for that test includes both p values (“Sig”) confidence
intervals for differences between means.
SPSS: Syntax
While you still have the tunnel4b data in SPSS, paste this code into the syntax window
and run it:
manova t_clean to t_rat by nurs(1,3) / wsfactors = scent(4) /
contrast(scent)=special(1,1,1,1, -3,1,1,1, 0,-2,1,1, 0,0,-1,1) /
rename=overall c_vs_mpr m_vs_pr p_vs_r / wsdesign = scent /
print=signif(univ) error(cor) homogeneity(boxm) / design .
manova t_clean to t_rat by nurs(1,3) / wsfactors = scent(4) /
wsdesign = mwithin scent(1) mwithin scent(2)
mwithin scent(3) mwithin scent(4) /
design = nurs .
manova t_clean to t_rat by nurs(1,3) / wsfactors = scent(4) /
wsdesign = scent /
design = mwithin nurs(1) mwithin nurs(2) mwithin nurs(3) .
The Box’s M output shows that we have no problem with MANOVA’s homogeneity
assumption. One of our orthogonal contrasts, P_VS_R, was significant for the interaction
between nursing group and scent of tunnel, that is, the nursing groups differed significantly on
the Peromyscus versus Rattus contrast The significant M_VS_PR and P_V_R contrasts found
in our earlier one-way analysis appear here also.
The second invocation of MANOVA was used to evaluate the simple main effects of
Nursing groups at each level of Scent. “WSDESIGN = MWITHIN SCENT(1) MWITHIN
SCENT(2) MWITHIN SCENT(3) MWITHIN SCENT(4)” is the command specifying the simple
effects analysis. In the output, under “Tests involving ‘MWITHIN SCENT(1)’ Within-Subject
Page 5
Effect” the “NURS BY MWITHIN SCEN” F(2, 33) = 0.13, p = .88 is the test for the simple main
effect of Nursing groups upon response to the Scent(1) clean tunnel. Note that like SAS,
SPSS used individual rather than pooled error. The tests for the Mus-, Peromyscus-, and
Rattus-scented tunnels follow.
The third invocation of MANOVA was used to evaluate the simple main effects of
Scent at each level of Nursing groups. “DESIGN = MWITHIN NURS(1) MWITHIN NURS(2)
MWITHIN NURS(3)” specifies the simple effects. “EFFECT...MWITHIN NURS(3) BY SCENT
Multivariate Tests of Significance” gives the multivariate approach pooled error test for the
effect of Scent in Nursing Group 3, the Rattus-nursed mice, for which the effect was not
significant, F(3, 31) = 0.867, p = .47. Note that the df (3, 31) are the same as for Scent in the
omnibus multivariate analysis, since we are using pooled error. We do have significant simple
main effects of scent for the Peromyscus-nursed and Mus-nursed mice. Finally, the
pooled-error, univariate approach statistics under “AVERAGED Tests of Significance for
MEAS.1 using UNIQUE sums of squares” also indicate significant effects for Mus- and
Peromyscus-nursed but not Rattus-nursed mice, F’s (3, 99) = 3.56, 7.55, and 0.87. Note that
these are the same F’s we would need compute by hand were we using SAS and wanting
pooled error univariate tests. We would still need adjust the df and obtain the adjusted p, as
SPSS MANOVA does not do that for us.
Copyright 2013, Karl L. Wuensch - All rights reserved.
Annotated Output from SAS
Fair Use of this Document