Hi, I'm a bit new to R and I would like to know how can I compare simple main effects when using the aov function. I'm doing a mixed model ANOVA with two between subjects variables and one within. When I get an interaction of two of the variables I don't know how to check for simple main effect of that interaction (A at B1 and A at B2 for example). The aov function is very simple but for some reason I can't find how to do this. Thank you very much. Or Duek. [[alternative HTML version deleted]]
Try going through this: personality-project.org/r/r.anova.html <personality-project.org/r/r.anova.html> ----------------Contact Details:------------------------------------------------------- Contact me: Tal.Galili@gmail.com | 972-52-7275845 Read me: talgalili.com (Hebrew) | biostatistics.co.il (Hebrew) | r-statistics.com (English) ---------------------------------------------------------------------------------------------- On Sat, Dec 19, 2009 at 7:27 PM, Or Duek <orduek@gmail.com> wrote:> Hi, I'm a bit new to R and I would like to know how can I compare simple > main effects when using the aov function. > I'm doing a mixed model ANOVA with two between subjects variables and one > within. > When I get an interaction of two of the variables I don't know how to check > for simple main effect of that interaction (A at B1 and A at B2 for > example). > The aov function is very simple but for some reason I can't find how to do > this. > Thank you very much. > Or Duek. > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help@r-project.org mailing list > stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >[[alternative HTML version deleted]]
For simple effects in the presence of interaction there are several options included in the HH package. If you don't already have the HH package, you can get it with install.packages("HH") Graphically, you can plot them with the function interaction2wt(..., simple=TRUE) See the examples in ?HH::interaction2wt For tests on the simple effect of A conditional on a level of B, you can use the model formula B/A and look at the partition of the sums of squares using the split= argument summary(mymodel.aov, split=<put your details here>) For multiple comparisons from designs with Error() terms, you need to specify the same sums of squares with an equivalent formula that doesn't use the Error() function. See the maiz example in ?HH::MMC Read the example all the way to the end of the help file. Rich