[R-sig-eco] lme post-hoc help
Nathan Lemoine
lemoine.nathan at gmail.com
Wed Mar 3 20:04:54 CET 2010
Hi all,
I'm attempting to analyze some data on log-transformed algae grazing
rates that I've collected in different habitats. I when collecting the
data, I blocked for day to account for temporal variation in grazing
intensity, and I'm considering DAY as a random factor in my model. As
such, I've used the lme model to construct the mixed-effects model as
follows:
> al_lme <- lme(grazing~habitat, random = ~1|day, data=algae)
The ANOVA summary shows a significant result:
> anova(al_lme)
numDF denDF F-value p-value
(Intercept) 1 32 174.97322 <.0001
HAB 3 32 3.31776 0.0321
Yet, when I do a post-hoc comparison, none of the pairwise tests are
significant:
> pairs <- glht(al_lme, linfct = mcp("habitat"="Tukey")
> summary(pairs)
Estimate Std. Error z value
Pr(>|z|)
Fake - Complex == 0 0.2125 0.5390 0.394 0.978
Far - Complex == 0 1.1937 0.5390 2.215 0.114
Near - Complex == 0 0.7758 0.3623 2.142 0.134
Far - Fake == 0 0.9813 0.4437 2.211 0.115
Near - Fake == 0 0.5633 0.5390 1.045 0.715
Near - Far == 0 -0.4179 0.5390 -0.775 0.861
(Adjusted p values reported -- single-step method)
How is this possible? In visually inspecting the data, it is apparent
that at least the Far-Complex ought to be significant. To be sure, I
double checked my statistics using SPSS, which is where I'm getting
more confused.
In SPSS, I built a blocked, general linear model with Loss as the
dependent, Habitat as the fixed factor, and Day as a random factor. I
used the default Type III SS because the design was not balanced. SPSS
also returns a significant effect:
Habitat F = 4.741, denom df = 33, p = 0.015
and the Tukey's HSD post-hoc test returns a significant difference
between the Far-Complex habitats, like expected. My questions are:
First, how can I receive a significant result in R and have no
significant pairwise effects? Second, what are the differences between
SPSS and R, that SPSS uses a different denominator df to calculate the
F-statistic? This is probably the reason that the p-value for SPSS is
lower, but I'm not sure that this is part of the reason for the
different post-hoc results.
Thanks for any help,
Nate Lemoine
More information about the R-sig-ecology
mailing list