[R] Problem with Trellis graphics in nlme
Thomas W Blackwell
tblackw at umich.edu
Thu Nov 20 23:02:33 CET 2003
Anthony -
It seems just possible that the difficulty may have nothing to do
with nlme() or any other data analysis. The graph you describe
could result if one of the y-values was five time as large as any
of the others. This could result from an error in reading the
data input file, a missing decimal point somewhere, etc.
In order to diagnose this, do range(data$y) (assuming that you
are plotting a data frame named "data" with a column named "y"),
then do
data[ data$y == max(data$y), ]
to look at just the offending row(s).
Another possibility is that somehow you are setting "ylim" in the
plotting command, but I assume you've excluded that one already.
HTH - tom blackwell - u michigan medical school - ann arbor -
On Thu, 20 Nov 2003, anthony staines wrote:
> Hi,
> I would be grateful for help with a problem which is irritating me.
> I am quite sure that I am doing something stupid, but I can't see what it
> is.
>
> I am running R 1.7 on Windows 2000. The graphics device is the PC screen.
>
> The graphics from the nlme demonstration in Bates an Pinheiro's manual work
> just as advertised. The CO2 data and the Orthodont data dsiplay
> beautifully.(plot(Orthodont, outer=true, key=false) However. when I try to
> analyse a data set of my own, of about 2,770 measurements on 293 women the
> graphics go very peculiar. The graphics in the example from the manual fill
> most of the vertical extent of the graphics device. My graphics are correct
> horizontally, but are confined to about one-fifth of the vertical extent of
> the graphics device. As a result they look odd, and are almost usless for
> analysis. They do seem, however, to be the correct graphics (In this case
> maternal weight against gestational age for two groups of women).
>
> I have read the manual for the lattice commands, and the nlme command, and
> indeed for the plain plot command, but failed to get any ideas. Roughly, I
> need to tell lattice to use the full vertical extent of the display device.
> If it helps, I can e-mail the offending images to you individually on
> request.
>
> Anthony Staines,
> Public Health,
> UCD
>
More information about the R-help
mailing list