# C. Sean Burns: Notebook

### Site Tools

r:manova

Pedhazur, E. J. (1997). Multiple regression in behavioral research: Explanation and prediction (3rd ed.). Wadsworth.

From the chapter: “Canonical and Discriminant Analysis, and Multivariate Analysis of Variance” (pp. 924-981).

Pedhazur (1997) has the toy case where:

a researcher wishes to study how Conservatives (A1), Republicans (A2), and Democrats (A3) differ in their expectations regarding government spending on social welfare programs (Y1) and on defense (Y2) (p. 947).

And he presents the following table:

A1 A2 A3
Y1 Y2 Y1 Y2 Y1 Y2
3 7 4 5 5 5
4 7 4 6 6 5
5 8 5 7 6 6
5 9 6 7 7 7
6 10 6 8 7 8

I had some trouble figuring out how to organize this data for a MANOVA analysis, and then after some searching, I found help via set of class slides on MANOVA and R here: http://faculty.smu.edu/kyler/courses/7314/manova.pdf (see also: http://faculty.smu.edu/kyler/). Although it might work with other structures, the data structure I used looks like this:

group y1 y2
1 1 3 7
2 1 4 7
3 1 5 8
4 1 5 9
5 1 6 10
6 2 4 5
7 2 4 6
8 2 5 7
9 2 6 7
10 2 6 8
11 3 5 5
12 3 6 5
13 3 6 6
14 3 7 7
15 3 7 8

The code to create this from Pedhazur's toy sample is:

manova.test <- data.frame(group = as.factor(rep(1:3, c(5,5,5))),
y1 = c(3,4,5,5,6,4,4,5,6,6,5,6,6,7,7),
y2 = c(7,7,8,9,10,5,6,7,7,8,5,5,6,7,8))

Pedhazur calculates Wilks' Lambda. To do that in R, we build the model and then call the summary:

fit.1 <- manova(cbind(y1,y2 ~ group, manova.test)
summary.manova(fit.1, test = "Wilks")

And the results, which include the F statistic, agree with Pedhazur.

Df Wilks approx F num Df den Df Pr(>F)
group 2 0.096541 12.201 4 22 0.000
Residuals 12

Pedhazur writes:

The differences among the three groups on the two dependent variables, when these are analyzed simultaneously, are statistically significant (p. 955).

Note: Pedhazur follows this with univariate analyses, which show that not all differences are statistically significant. Will add this later.