[R] Plotting from lme() objects
CG Pettersson
cg.pettersson at evp.slu.se
Sun Feb 6 19:37:07 CET 2005
Hello all!
R2.0.1, W2k
I use lme() from nlme to make mean estimates from series of field
experiments where not all treatments (like "variety") are present in
all experiments.
A typical call is:
yield.lme <- lme(Yield ~ Variety, data = data,
na.action = na.omit,
random = ~ 1 | Experiment/Block)
This works well, even when observations are lacking. I have checked
against the accepted method for doing this in Sweden, which is
PROC MIXED in SAS, and the fitted fixed effects are more or less
identical. I use estimable() from gmodels (gregmisc package) to
extract estimates, standard errors and such. I use matrices with the
variety names as row names, it works smooth.
What I am unable to, as yet, is to make nice plots of the estimates
for
a given set of varieties. To use only the fixed call directly on the
dataset works, but produces the wrong graph, as the structure is not
used.
Pinheiro & Bates have a lot of graphics on lme objects, but they try
to illustrate more sophisticated relations than my need. I´ve looked
through gplots and the graphic parts of nlme without any hits.
Probably,
my difficulties are just due to my own lack of skill. Some standard
plotting facility plotting directly from the lme object ought to work,
but
I don´t understand how. Another possiblility is to plot from the
estimable() output.
How should I do this? All suggestions are welcome.
Cheers
/CG
CG Pettersson, MSci, PhD Stud.
Swedish University of Agricultural Sciences
Dep. of Ecology and Crop Production. Box 7043
SE-750 07 Uppsala
More information about the R-help
mailing list