[R] Plotting an lme( ) object

Greg Tarpinian sasprog474474 at yahoo.com
Fri Jan 20 02:39:29 CET 2006


Based on the suggestions, the following yielded 
satisfactory results:


plot(FOO.lme4, resid(.,type = "p") ~ fitted(.) | GROUP, 
     id = 0.05, adj = 1, 
     idLabels = paste( round(FOO$VALUE,1), 
                       rep(" ",length(FOO$VALUE)) ),
     main = "Pearson Residuals vs. Fitted Values, by GROUP",
     between = list(x = .5, y = .5))


Using paste() to hardcode an extra "space" provided me with
the necessary graphical offsets.

Regards,

     Greg



--- Deepayan Sarkar <deepayan.sarkar at gmail.com> wrote:

> On 1/19/06, Henric Nilsson <henric.nilsson at statisticon.se> wrote:
> > Greg Tarpinian said the following on 2006-01-18 23:37:
> >
> > > I apologize for the second posting, my other email address
> > > died today.
> > >
> > > I am using R for Windows, version 2.2.  Here is my code:
> > >
> > >   plot(FOO.lme4, resid(.,type = "p") ~ fitted(.) | GROUP,
> > >        id = 0.05, adj = -0.3,
> > >        idLabels = FOO$value,
> > >        main = "Pearson Residuals vs. Fitted Values, by Group",
> > >        between = list(x = .5, y = .5))
> > >
> > > The plot looks fine, but the "adj = -0.3" option seems to have
> > > no effect on the labels that are added to identify potential
> > > outliers.  I would like to offset the FOO$value text that is
> > > currently being displayed right on top of several pearson
> > > residuals.  How can I do this?
> >
> > I just checked the code for `plot.lme', and it builds a panel function
> > that uses the `adj' argument of the `ltext'. Unfortunately, according to
> > the help page for `ltext' (from the Details section),
> >
> > "... For 'ltext', only values 0, .5 and 1 for 'adj' have any effect."
> >
> > It wouldn't categorize this as a bug in R, since R's `ltext' function
> > behaves according to its documentation. But it sure is irritating.
> >
> > I've CC:ed Deepayan Sarkar, maintainer of the lattice package, and
> > hopefully he's able to advise or, even better, extend `ltext' to accept
> > a wider range of `adj' values.
> 
> The grid.text argument 'just' does support numeric values like 'adj'
> now, but it didn't when ltext was originally written (or at least I
> was under the impression that it didn't). I have updated ltext
> accordingly, which in future releases of lattice should support other
> values of adj. I wasn't planning any updates for R 2.2.x, but I can if
> anyone needs this desperately enough.
> 
> Deepayan
> --
> http://www.stat.wisc.edu/~deepayan/
>




More information about the R-help mailing list