[R] fit.contrast (package gmodels) and lmer
Dieter Menne
dieter.menne at menne-biomed.de
Sat Feb 17 16:48:02 CET 2007
Friends of lme,
following the documentation of fit.contrast in package gmodels, it should be
possible to use it with lmer. At least with sim.lmer=TRUE and lmer(not 2),
because the latter has no mcmcsamp yet.
I could not get this to work. UseR error?
------------------
library(gmodels)
library(lme4)
options(show.signif.stars = FALSE)
data(ergoStool)
fm1 <- lmer(effort ~ Type + (1|Subject), ergoStool)
mcmcsamp(fm1) ## works
fit.contrast(fm1,"Type",c(1,1,0,0),sim.lmer=TRUE)
# Not an applicable method
------------------
Note: I am well aware of the discussion about df/lmer in
http://wiki.r-project.org/rwiki/doku.php?id=guides:lmer-tests
http://finzi.psych.upenn.edu/R/Rhelp02a/archive/76742.html
so I don't expect the method to work with sim.lmer=FALSE. And yes, the
example is simple and results can be obtained directly. However, I looking
for an easy-to-use general contrast test, and fit.contrast and estimable are
the only ones I know of that work rather generally.
Dieter
More information about the R-help
mailing list