lm(y ~ x)
) are displayed. Tick marks are
placed at the location of xbar, the x-value of the narrowest interval.ci.plot(lm.object, ...)
## S3 method for class 'lm':
ci.plot(lm.object,
xlim=range(data[,as.character(formula.lm[[3]])]),
newdata=data.frame(seq(xlim[1], xlim[2], length=51)),
conf.level=.95,
data=model.frame(lm.object),
newfit,
ylim=range(newfit$pi.fit),
pch=16,
main.cex=1,
main=list(paste(100*conf.level,
"% confidence and prediction intervals for ",
substitute(lm.object), sep=""), cex=main.cex), ...
)
y
and one x
variable.xlim
for plot. Default is based on data from which
lm.object
was constructed.data.frame
containing data for which predictions
are wanted. Defaults to vector spanning range of observed data..95
data
extracted from the lm.object
data.frame
containing the
predictions,confidence interval, and prediction interval
for the newdata
.ylim
for plot. Default is based on the
constructed prediction interval."trellis"
object containing the plot.lm
, predict.lm
tmp <- data.frame(x=rnorm(20), y=rnorm(20))
tmp.lm <- lm(y ~ x, data=tmp)
ci.plot(tmp.lm)
Run the code above in your browser using DataCamp Workspace