[R-sig-ME] Prediction of modeled estimate and plot

Ben Bolker bbolker at gmail.com
Wed Dec 4 23:23:14 CET 2013


On 13-12-04 05:09 PM, Sunil Mundra wrote:
> Hi allI am interested to see the effect of warming (a factor
> variable, with control set and experimental set due to snow
> accumulation), and vegetation (experiment is conducted in two
> different vegetation type), there is random effect of Block of Fence
> and individual fence within the vegetation type.I would like to
> predict modeled estimate of env var (here shown only moisture, I have
> total 15 env variable) at different warming treatment (a factor, with
> two treatment; Deep and Control) and at different Vegetation type
> (Heath and Meadow).I also want to plot these predicted values and
> also need to test their significance (I need help how to this after
> prediction)

  I don't know quite what you mean by the significance of a predicted
value.  Are you asking whether the confidence intervals on the predicted
values overlap zero?  You can compute confidence intervals on
predictions either via the recipe given at http://glmm.wikidot.com/faq
(which neglects uncertainty in the variance-covariance parameters), or
using parametric bootstrapping (bootMer)


Can any one help me in performing these function and
finishing the script. I am still getting error in predict
function


lmm.2 <- lmer(formula = Moisture ~ Warming + Vegetation +
 (1|Block/Fence), data = data)
summary(lmm.2)
simple.predict(lmm.2,
 Moisture ~ Warming + Vegetation, data.frame(Warming.F=c(Deep,
Control), Vegetation.F = c(Heath, Medow)))

As far as I can tell the 'simple.predict()' function is from the
multilevel package, but as far as I can tell it is also superseded by
predict() from newer version of lme4.

  You're going to have to tell us what's actually going wrong, and
probably provide a reproducible example.  Have you looked at
?predict.merMod in a recent version of lme4 ???

  Ben Bolker



More information about the R-sig-mixed-models mailing list