Skip to content

Plot lmer model with Effects package

3 messages · Marte Lilleeng, Ben Bolker, John Fox

#
Hi everyone!
I have a simple model that i would like to plot with 95% CIs.
It is like follows:
m1<-lmer(Richness~Grazing+I(Grazing^2)+(1|Plot),family=poisson)

By using the effects package I get two plots, one for the linear term
and one for the squared term.
Q1: Can I get all in one? I.e. with one line for the whole model?
Q2: Can I also visualize the random effects?

I would be very happy for your answers!
#
Marte Lilleeng <mlilleeng <at> gmail.com> writes:
[snip]
It would probably be best to send this to the r-sig-mixed-models list.
You may want to look at the code at http://glmm.wikidot.com/faq for
generating predictions and confidence intervals from lmer fits.
1 day later
#
Dear Marte,

On Thu, 25 Oct 2012 16:11:07 +0200
Marte Lilleeng <mlilleeng at gmail.com> wrote:
It's better to specify the model as Richness~poly(Grazing, 2)+(1|Plot) so that effect() understands that the quadratic is a single term in the model. Alternatively, I believe that Effect() would work as you want for either form.
I'm not sure what that would mean. I suppose that you could look at the distribution of the BLUPs.

I hope this helps,
 John

------------------------------------------------
John Fox
Sen. William McMaster Prof. of Social Statistics
Department of Sociology
McMaster University
Hamilton, Ontario, Canada
http://socserv.mcmaster.ca/jfox/