[R] Asking, are simple effects different from 0

Jarrett Byrnes jebyrnes at ucdavis.edu
Tue Mar 4 20:45:20 CET 2008


Hello, R-i-zens.  I'm working on an data set with a factorial ANOVA  
that has a significant interaction.  I'm interested in seeing whether  
the simple effects are different from 0, and I'm pondering how to do  
this.  So, I have

my.anova<-lm(response ~ trtA*trtB)

The output for which gives me a number of coefficients and whether  
they are different from 0.  However, I want the simple effects only,  
incorporating their intercepts, with their error estimates.  Can I  
somehow manipulate this object to get that?  Or, would a good shortcut  
be

my.simple.anova<-lm(response ~ trtA:trtB + 0)

and then use those coefficients and their error estimates?

If so, I realize that R gives me t tests for each coefficient.  Now,  
for those I know I'm using the residual degrees of freedom.  Would it  
then be more appropriate to use those, all with the same residual DF  
and apply a bonferroni correction, or, use the mean and SE estimate  
with the sample size for that particular treatment and perform an  
uncorrected one sample t-test to see if the value is different from 0?

Sorry for the bonehead question, but it's a situation I haven't seen  
before.

-Jarrett



More information about the R-help mailing list