[R] plot with nlme

Hank Stevens HStevens at muohio.edu
Tue Apr 29 16:03:23 CEST 2003

Using R v. 1.7.0 on Windows 2000

I would like to plot the fitted values of a model as a function of a 
continuous covariate, augmented with data (e.g., augPred) grouping by 
combinations of fixed effects. I have not been able to use augPred 
effectively, and am wondering if it does not handle unbalanced data (3 out 
of 192 missing).
I include below the model and an xyplot that almost does the job. I would 
happily send anyone the data if they would be willing to help.
Many Thanks in advance.

The model:

fm <- lme( log(S,2) ~ Fert*Litter*Seed*Density, data = collimd, random = 
~1|block/plot/Seed )

# The following is close, but fits lines within each panel rather than 
giving me the fitted values generated by the model.

xyplot( log(S,2)  ~  log10(Nper0.5m)  |  Fert*Seed, data = 
collimd,  groups=Litter,
        scales = list( alternating =FALSE, tck=c(1,0)), layout = c(4,2,1), 
aspect = 1, as.table = T,
          key = list(space="top", transparent = TRUE,
                    text = list(c("With Litter", "Litter Removed"))   ) ,

        panel = function(x, y, subscripts,...) {
            panel.grid(h=-1, v= -1)
            panel.superpose(x, y,subscripts, pch=c(1,3),col=1,...)
             panel.superpose(x, y, 


Martin Henry H. Stevens, Assistant Professor
338 Pearson Hall
Botany Department
Miami University
Oxford, OH 45056

Office: (513) 529-4206
Lab: (513) 529-4262
FAX: (513) 529-4243

More information about the R-help mailing list