# Type II anova with poly contrasts matrix

I need to conduct a type II anova. Therefore, I use the Anova function from the car package. In addition, for Factor1 I want to use a polynomial contrast matrix to see linear and quadratic effects.

However, using the Anova function from the car package does not display the linear and quadratic effects compared to the normal summary.lm(lm(...)) functions. Before I apply the Anova function from the car package I test for non significant interaction as that is required for doing a type II anova.

I was wondering how I can extract the linear and the quadratic effects from the Anova output.

Here is a working example in R:

http://pastebin.com/mfk5PEq1

• Some examples of entering manual contrasts for use with Anova and lm were given on a related thread: stats.stackexchange.com/a/4549/930. – chl Jul 15 '12 at 19:28