"lines"(x, col = Pal()[1], lwd = 2, lty = "solid", type = "l", n = 100, conf.level = 0.95, args.cband = NULL, pred.level = NA, args.pband = NULL, ...)
types
as in plot.default
. Type of plot, defaults to "l"
.NA
, if no confidence band should be plotted.
Default is 0.95
.DrawBand
).0.95
.DrawBand
).lines
, lines.loess
, lm
par(mfrow=c(1,2))
plot(hp ~ wt, mtcars)
lines(lm(hp ~ wt, mtcars), col="steelblue")
# add the prediction intervals in different color
plot(hp ~ wt, mtcars)
r.lm <- lm(hp ~ wt, mtcars)
lines(r.lm, col="red", pred.level=0.95, args.pband=list(col=SetAlpha("grey",0.3)) )
Run the code above in your browser using DataLab