Debian Codegraph @

man/linesHyberb.lm.Rd

raw
1 \name{linesHyperb.lm}
2 \alias{linesHyperb.lm}
3 \title{Plot Confidence or Prediction Hyperbolas around a Regression Line}
4 \description{
5 Add confidence/prediction hyperbolas for \eqn{y(x_0)}
6 to a plot with data or regression line.
7 }
8 \usage{
9 linesHyperb.lm(object, c.prob=0.95, confidence=FALSE,
10 k=if (confidence) Inf else 1,
11 col=2, lty=2, do.abline=TRUE)
12 }
13 \arguments{
14 \item{object}{result of \code{\link{lm}(.)}.}
15 \item{c.prob}{coverage probability in \eqn{(0,1)}.}
16 \item{confidence}{logical; if true, do (small) confidence band, else,
17 realistic prediction band for the mean of \code{k} observations.}
18 \item{k}{integer or \code{Inf}; assume \code{k} future observations;
19 \code{k = Inf} corresponds to confidence intervals (for y).}
20 \item{col, lty}{attributes for the \code{\link{lines}} to be drawn.}
21 \item{do.abline}{logical; if true, the regression line is drawn as well.}
22 }
23 \note{
24 With \code{\link{predict.lm}(*, interval=)} is available,
25 this function \code{linesHyperb.lm} is only slightly more general for
26 its \code{k} argument.
27 }
28 \author{Martin Maechler, Oct 1995}
29 \seealso{\code{\link{predict.lm}(*, interval=)} optionally computes
30 prediction or confidence intervals.}
31 \examples{
32 data(swiss)
33 plot(Fertility ~ Education, data = swiss) # the data
34 (lmS <- lm(Fertility ~ Education, data = swiss))
35 linesHyperb.lm(lmS)
36 linesHyperb.lm(lmS, conf=TRUE, col="blue")
37 }
38 \keyword{regression}
39 \keyword{aplot}