predict in lmer()?
On Jul 31, 2011, at 9:35 AM, David Winsemius wrote:
On Jul 31, 2011, at 8:47 AM, Dennis Murphy wrote:
Hi: See http://glmm.wikidot.com/faq Go about 2/3 of the way down until you see the section 'Predictions and/or confidence (or prediction) intervals on predictions'.
Aren't objects created by lmer of class "mer"? Attempting to follow
your advice with the first example provided in ?lmer meets with
frustration:
require(lme4)
(fm1 <- lmer(Reaction ~ Days + (Days|Subject), sleepstudy))
newdat0 <- expand.grid(Reaction=c(200,300,400), Days=c(0,4,8),
Subject=c(5,10,15) )
newdat0$pred <- predict(fm1, newdat0, level = 0)
Error in UseMethod("predict") :
no applicable method for 'predict' applied to an object of class
"mer"
I'm not even a journeyman use of ME methods, so this is just a
question. Do you have a fix? (There are predict methods listed in
nlme but none in the Index of lme4.
And then I scrolled a bit further down beyond the lme section to where the lme4 section was . Sorry for the noise. And thanks for the addition to my meager lme4 education.
David. David Winsemius, MD West Hartford, CT