[R] multiple comparisons

Stephen Cole swbcole at gmail.com
Fri Mar 14 16:36:09 CET 2008


Hello again R help.


This is a simple question perhaps(laughing as I type) with a simple answer.

Is the multcomp package appropriate for using with a lme built under
the nlme package.

I know i can get it to work (i.e report p-values for a tukey test) but
i am not unsure if this is appropriate for a linear mixed effects
model.
Below is the code i used

 lmm1 <- lme(asinh(density_recruit) ~ region, data=datag, random=list(site=~1))
mc<-glht(lmm1, linfct = mcp(region = "Tukey"))

        Simultaneous Tests for General Linear Hypotheses

Multiple Comparisons of Means: Tukey Contrasts


Fit: lme.formula(fixed = asinh(density_recruit) ~ region, data = datag,
    random = list(site = ~1))

Linear Hypotheses:
           Estimate Std. Error z value p value
2 - 1 == 0   -2.166      1.148  -1.886   0.143
3 - 1 == 0   -1.162      1.148  -1.012   0.569
3 - 2 == 0    1.004      1.148   0.874   0.657
(Adjusted p values reported)


So according to this i have no significant differences (expected since
the fixed effects were insignificant, and i know that multiple
comparisons should not be carried out in this case.  i am just using
it as an example.  I just want to know if the multcomp package works
with a linear mixed model built under the nlme package)

Thanks

Stephen Cole
M.S.c candidate
Saint Francis Xavier University



More information about the R-help mailing list