linesHyperb.lm {sfsmisc} | R Documentation |
Plot Confidence or Prediction Hyperbolas around a Regression Line
Description
Add confidence/prediction hyperbolas for y(x_0)
to a plot with data or regression line.
Usage
linesHyperb.lm(object, c.prob=0.95, confidence=FALSE,
k=if (confidence) Inf else 1,
col=2, lty=2, do.abline=TRUE)
Arguments
object |
result of |
c.prob |
coverage probability in |
confidence |
logical; if true, do (small) confidence band, else,
realistic prediction band for the mean of |
k |
integer or |
col , lty |
attributes for the |
do.abline |
logical; if true, the regression line is drawn as well. |
Note
With predict.lm(*, interval=)
is available,
this function linesHyperb.lm
is only slightly more general for
its k
argument.
Author(s)
Martin Maechler, Oct 1995
See Also
predict.lm(*, interval=)
optionally computes
prediction or confidence intervals.
Examples
data(swiss)
plot(Fertility ~ Education, data = swiss) # the data
(lmS <- lm(Fertility ~ Education, data = swiss))
linesHyperb.lm(lmS)
linesHyperb.lm(lmS, conf=TRUE, col="blue")
[Package sfsmisc version 1.1-18 Index]