[R] abline and plot(augPred) help

Petr Pikal petr.pikal at precheza.cz
Mon Sep 4 14:05:41 CEST 2006

Dear all

as I did not get any response on my post about abline and 
plot(augPred)) I try again. I hope I do not break some posting guide 
rules. I would try to contact package maintainer directly but there 
is stated to be R-core people, so I feel R-help list shall be OK.

I need to draw straight lines through augPred plotted panels 
(vertical or horizontal) at specified point. I know I shall probably 
use panel.abline but I am missing correct syntax. Below you can see 
my attempts together with results. I hope somebody can point me to 
right direction.

I am probably somewhere close but I have no clue, which parameter I
shall modify to get measured points, fitted lines and vertical lines
in panels together.

Please help

Thank you
Best regards.
Petr Pikal

fm1 <- lme(Orthodont)

# standard plot
plot(augPred(fm1, level = 0:1, length.out = 2))

#plot with vertical but without points and fitted lines
plot(augPred(fm1, level = 0:1, length.out = 2),
panel=function(v,...) {

# plot with vertical but without fitted lines
plot(augPred(fm1, level = 0:1, length.out=2),
panel=function(x,y,...) {

# plot with vertical and with all points (fitted lines are drawn as 
plot(augPred(fm1, level = 0:1),
panel=function(x,y,...) {

Petr Pikal
petr.pikal at precheza.cz

More information about the R-help mailing list