[R] summary.lm for post-hoc tests

Alex Bokov bokov at uthscsa.edu
Sat Oct 30 19:20:00 CEST 2010

Let's say I've run Anova(lm(y~a*b)) and found the a:b interaction to be 
significant. Now I'm interested in which specific level combinations of 
a and b significantly differ from the control group. Can I use the 
t-tests from summary(lm(y~a*b)) to answer that question?

I saw no mention of multiple comparison in the documentation for 
summary.lm, so am I right in assuming I need to run p.adjust on the 
p-values column?


PS: I am aware of TukeyHSD and that works fine if a and b are both 
factors. However, if 'a' is numeric and I'm interested in which levels 
of 'b' have a different slope from the control group, TukeyHSD cannot do 
that, and I'm hoping the above can.

More information about the R-help mailing list