On 3/5/2008 1:32 PM, jebyrnes wrote: > Ah. I see. So, if I want to test to see whether each simple effect is > different from 0, I would do something like the following: > > cm2 <- rbind( > "A:L" = c(1, 0, 0, 0, 0, 0), > "A:M" = c(1, 1, 0, 0, 0, 0), > "A:H" = c(1, 0, 1, 0, 0, 0), > "B:L" = c(1, 0, 0, 1, 0, 0), > "B:M" = c(1, 1, 0, 1, 1, 0), > "B:H" = c(1, 0, 1, 1, 0, 1))
That does not corresponds to what I think of as the simple effects. That specifies the six cell means, but it does not *compare* any cell means. I think of a simple effect as the effect of one factor at a specific level of some other factor. > summary(glht(fm, linfct = cm2), test = adjusted(type="none")) > > Correct? What is the df on those t-tests then? Is it 48? Yes, df = 48 for each contrast. > Interestingly, I find this produces results no different than > > fm2<-lm(breaks ~ tension:wool+0, data=warpbreaks) > summary(fm2) Yes, but those are not what I would call the simple effects. Those are essentially one-sample t-tests for each of the 6 cell means. > Also, here, it would seem each t-test was done with the full 48df. Hrm. The df are based on the whole model, not the 9 observations in one cell. > Chuck Cleland wrote: >> >> Each column corresponds to one of the coefficients in the model, and >> each row specifies a particular contrast. The numbers in the matrix >> indicate how the model coefficients are combined to indicate a >> particular difference in means. >> For example, the first row indicates that the third coefficient >> (woolB) is multiplied by -1. The baseline categories are A and L for >> the wool and tension factors, so the woolB effect in fm is the simple >> effect of B vs. A in the baseline category of the tension factor. >> Multiplying this coefficient by -1 produces an A vs. B comparison in the >> baseline category of the tension factor. -- Chuck Cleland, Ph.D. NDRI, Inc. 71 West 23rd Street, 8th floor New York, NY 10010 tel: (212) 845-4495 (Tu, Th) tel: (732) 512-0171 (M, W, F) fax: (917) 438-0894 ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.