[R-sig-ME] dotplot question

Douglas Bates bates at stat.wisc.edu
Mon Mar 21 17:49:02 CET 2011


2011/3/14 Sebastián Daza <sebastian.daza at gmail.com>:
> Dear list,

> I have a couple of questions related to dotplots and ranef:

> 1) Does anyone know how to order the distribution of a residuals in a
> dotplot:

> dotplot(dotplot(ranef(model, postVar = TRUE)...

> sometimes residuals are ordered but other times they are not.

Can you provide a reproducible example?

> 2) Is it possible to organize these plots in a matrix (as par function
> does)? I have more than a random term... so would be useful to order theses
> plots in a matrix...

We have good news and bad news.  The good news is that you get more
flexibility with lattice graphics than with traditional R graphics
(which is what the par function controls).  The bad news is that it
requires a bit more effort to control the lattice graphics display in
that you need to read the manual page for print.trellis carefully.  An
example of the dotplot for more than one grouping factor is provided
on slide 31 of http://lme4.R-forge.R-project.org/slides/2011-03-16-Amsterdam/1Simple.pdf
 The code that generates that figure is

qrr2 <- dotplot(ranef(fm2, postVar = TRUE), strip = FALSE)
print(qrr2[[1]], pos = c(0,0,1,0.75), more = TRUE)
print(qrr2[[2]], pos = c(0,0.65,1,1))

> 3) Is it possible to change the strip name of these plots?

Yes.  See the description of the strip.default function in the lattice
package.  In particular, the strip can be suppressed by setting
strip=FALSE, as above.

> Any clue about these questions will be appreciate.
> Thank you in  advance!
> --
> Sebastián Daza
> sebastian.daza at gmail.com
>
> _______________________________________________
> R-sig-mixed-models at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
>




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