[R] Asking, are simple effects different from 0
jebyrnes
jebyrnes at ucdavis.edu
Wed Mar 5 19:33:17 CET 2008
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))
summary(glht(fm, linfct = cm2), test = adjusted(type="none"))
Fit: lm(formula = breaks ~ tension * wool, data = warpbreaks)
Linear Hypotheses:
Estimate Std. Error t value p value
A:L == 0 44.556 3.647 12.218 2.22e-16 ***
A:M == 0 24.000 3.647 6.581 3.23e-08 ***
A:H == 0 24.556 3.647 6.734 1.88e-08 ***
B:L == 0 28.222 3.647 7.739 5.47e-10 ***
B:M == 0 28.778 3.647 7.891 3.22e-10 ***
B:H == 0 18.778 3.647 5.149 4.84e-06 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Adjusted p values reported -- none method)
Correct? What is the df on those t-tests then? Is it 48?
Interestingly, I find this produces results no different than
fm2<-lm(breaks ~ tension:wool+0, data=warpbreaks)
summary(fm2)
Also, here, it would seem each t-test was done with the full 48df. Hrm.
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.
>
>
>
--
View this message in context: http://www.nabble.com/Asking%2C-are-simple-effects-different-from-0-tp15835552p15855630.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list