[R-sig-ME] Tukey after lme does not match
Alen Hajnal
Alen.Hajnal at usm.edu
Fri Jan 6 01:22:22 CET 2012
Dear R users:
I have a simple lme model based on the following data:
sub trial angle RMSy
1 1 30 3.745084
1 2 0 7.520667
1 3 90 11.17038
1 4 15 7.581526
1 5 60 11.17822
1 6 75 8.440891
1 7 45 13.19024
1 8 15 9.822035
1 9 60 6.002665
1 10 75 4.393961
1 11 0 7.436676
When I run the model the results show that 0vs45, 0vs60, 0vs75, and 0vs90 are all significant main effects:
> m.base01<-lme(RMSy ~ angle+trial, data=data, random=~ trial|sub,method='ML')
> summary(m.base01)
Fixed effects: RMSy ~ angle + trial
Value Std.Error DF t-value p-value
(Intercept) 5.236020 0.6312637 267 8.294505 0.0000
angle15 -0.687669 0.4140277 267 -1.660925 0.0979
angle30 -0.571092 0.4129365 267 -1.383001 0.1678
angle45 -0.984597 0.4139330 267 -2.378638 0.0181
angle60 -0.874718 0.4135615 267 -2.115085 0.0353
angle75 -1.389835 0.4113411 267 -3.378788 0.0008
angle90 -1.620493 0.4133209 267 -3.920666 0.0001
trial -0.009372 0.0299782 267 -0.312620 0.7548
However, when I try to run a Tukey posthoc test, I get different results (notice that the estimates are the same as the main effect values above): ONLY 0vs90 is significant at p<.05 :
> summary(glht(m.base01, linfct=mcp(angle = "Tukey")))
Simultaneous Tests for General Linear Hypotheses
Multiple Comparisons of Means: Tukey Contrasts
Fit: lme.formula(fixed = RMSy ~ angle + trial, data = data, random = ~trial |
sub, method = "ML")
Linear Hypotheses:
Estimate Std. Error z value Pr(>|z|)
15 - 0 == 0 -0.6877 0.4082 -1.684 0.62652
30 - 0 == 0 -0.5711 0.4072 -1.403 0.80077
45 - 0 == 0 -0.9846 0.4081 -2.412 0.19329
60 - 0 == 0 -0.8747 0.4078 -2.145 0.32592
75 - 0 == 0 -1.3898 0.4056 -3.427 0.01070 *
90 - 0 == 0 -1.6205 0.4075 -3.976 0.00138 **
30 - 15 == 0 0.1166 0.4079 0.286 0.99996
45 - 15 == 0 -0.2969 0.4078 -0.728 0.99090
60 - 15 == 0 -0.1870 0.4078 -0.459 0.99931
75 - 15 == 0 -0.7022 0.4050 -1.734 0.59342
90 - 15 == 0 -0.9328 0.4073 -2.290 0.24842
45 - 30 == 0 -0.4135 0.4082 -1.013 0.95124
60 - 30 == 0 -0.3036 0.4074 -0.745 0.98971
75 - 30 == 0 -0.8187 0.4052 -2.021 0.40123
90 - 30 == 0 -1.0494 0.4076 -2.574 0.13377
60 - 45 == 0 0.1099 0.4077 0.269 0.99997
75 - 45 == 0 -0.4052 0.4059 -0.998 0.95449
90 - 45 == 0 -0.6359 0.4078 -1.559 0.70835
75 - 60 == 0 -0.5151 0.4050 -1.272 0.86496
90 - 60 == 0 -0.7458 0.4074 -1.831 0.52730
90 - 75 == 0 -0.2307 0.4049 -0.570 0.99763
Why does the Tukey not match the lme results?
Any help would be much appreciated!
Thanks, Alen
----------
Alen Hajnal, PhD.
Department of Psychology
The University of Southern Mississippi
118 College Drive #5025
Hattiesburg, MS 39406
USA
Tel. +1 (601) 266-4617
alen.hajnal @ usm.edu
http://ocean.otr.usm.edu/~w785427/lab.html
More information about the R-sig-mixed-models
mailing list