[R] How to plot 3-D surface graph from lmer mixed models?

Deepayan Sarkar deepayan.sarkar at gmail.com
Thu Aug 13 18:58:03 CEST 2009

On Thu, Aug 13, 2009 at 6:34 AM, willow1980<jianghua.liu at shef.ac.uk> wrote:
> Dear Professor Murdoch,
> That is exactly the difficulty for me. I don't know how to make a prediction
> with lmer using "expand.grid"; at the moment, I can use
>model at X%*%fixef(model)” to get predicted values for existing observational
> data, but not data by "expand.grid". Actually, if I know this, I can then
> use "persp" or "wireframe" to plot 3-D surface graph. Do you know or have
> available code for this aim?

?lattice::levelplot has an example of this (using a loess() fit), that
applies to wireframe as well.


More information about the R-help mailing list