My primary question is how to interpret the output (coefficients, F, P) when conducting a Type I (sequential) ANOVA?
My specific research problem is a bit more complex, so I will break my example into parts. First, if I am interested in the effect of spider density (X1) on say plant growth (Y1) and I planted seedlings in enclosures and manipulated spider density, then I can analyze the data with a simple ANOVA or linear regression. Then it wouldn't matter if I used Type I, II, or III Sum of Squares (SS) for my ANOVA. In my case, I have 4 replicates of 5 density levels, so I can use density as a factor or as a continuous variable. In this case, I prefer to interpret it as a continuous independent (predictor) variable. In R I might run the following:
lm1 <- lm(y1 ~ density, data = Ena)
summary(lm1)
anova(lm1)
Running the anova function will make sense for comparison later hopefully, so please ignore the oddness of it here. The output is:
Response: y1
Df Sum Sq Mean Sq F value Pr(>F)
density 1 0.48357 0.48357 3.4279 0.08058 .
Residuals 18 2.53920 0.14107
Now, let's say I suspect that the starting level of inorganic nitrogen in the soil, which I couldn't control, may have also significantly affected the plant growth. I'm not particularly interested in this effect but would like to potentially account for the variation it causes. Really, my primary interest is in the effects of spider density (hypothesis: increased spider density causes increased plant growth - presumably through reduction of herbivorous insects but I'm only testing the effect not the mechanism). I could add the effect of inorganic N to my analysis.
For the sake of my question, let's pretend that I test the interaction density*inorganicN and it's non-significant so I remove it from the analysis and run the following main effects:
> lm2 <- lm(y1 ~ density + inorganicN, data = Ena)
> anova(lm2)
Analysis of Variance Table
Response: y1
Df Sum Sq Mean Sq F value Pr(>F)
density 1 0.48357 0.48357 3.4113 0.08223 .
inorganicN 1 0.12936 0.12936 0.9126 0.35282
Residuals 17 2.40983 0.14175
Now, it makes a difference whether I use Type I or Type II SS (I know some people object to the terms Type I & II etc. but given the popularity of SAS it's easy short-hand). R anova{stats} uses Type I by default. I can calculate the type II SS, F, and P for density by reversing the order of my main effects or I can use Dr. John Fox's "car" package (companion to applied regression). I prefer the latter method since it is easier for more complex problems.
library(car)
Anova(lm2)
Sum Sq Df F value Pr(>F)
density 0.58425 1 4.1216 0.05829 .
inorganicN 0.12936 1 0.9126 0.35282
Residuals 2.40983 17
My understanding is that type II hypotheses would be, "There is no linear effect of x1 on y1 given the effect of (holding constant?) x2" and the same for x2 given x1. I guess this is where I get confused. What is the hypothesis being tested by the ANOVA using the type I (sequential) method above compared to the hypothesis using the type II method?
In reality, my data is a bit more complex because I measured numerous metrics of plant growth as well as nutrient dynamics and litter decomposition. My actual analysis is something like:
Y <- cbind(y1 + y2 + y3 + y4 + y5)
# Type II
mlm1 <- lm(Y ~ density + nitrate + Npred, data = Ena)
Manova(mlm1)
Type II MANOVA Tests: Pillai test statistic
Df test stat approx F num Df den Df Pr(>F)
density 1 0.34397 1 5 12 0.34269
nitrate 1 0.99994 40337 5 12 < 2e-16 ***
Npred 1 0.65582 5 5 12 0.01445 *
# Type I
maov1 <- manova(Y ~ density + nitrate + Npred, data = Ena)
summary(maov1)
Df Pillai approx F num Df den Df Pr(>F)
density 1 0.99950 4762 5 12 < 2e-16 ***
nitrate 1 0.99995 46248 5 12 < 2e-16 ***
Npred 1 0.65582 5 5 12 0.01445 *
Residuals 16