[R] How do I overlay two trellis plots of lme fitted lines produced by plot.augPred?

rwnahhas ramzi.nahhas at wright.edu
Fri Jul 8 17:42:34 CEST 2011

In case anyone else is interested... I just found another solution, which has
some pros and cons compared to Dennis' solution...

plot(comparePred(fit.lme, update(fit.lme, y ~ log(age))))
# Pros - Automatically adds a legend
# Cons - Only works for comparing two models

# Dennis' solution extends to more than two models
p1 <- plot(augPred(          fit.lme                              ),
ylim=c(20,65)                     )
p2 <- plot(augPred(update(fit.lme, y ~ log(age))          ), ylim=c(20,65),
col.line = "red")
p3 <- plot(augPred(update(fit.lme, y ~ age + I(age^2))), ylim=c(20,65),


View this message in context: http://r.789695.n4.nabble.com/How-do-I-overlay-two-trellis-plots-of-lme-fitted-lines-produced-by-plot-augPred-tp3652204p3654443.html
Sent from the R help mailing list archive at Nabble.com.

More information about the R-help mailing list