Learn R Programming

rmngb (version 0.6-1)

ablineCI: Add Confidence Interval Lines to a Plot

Description

This function adds confidence interval lines from a model to the current plot.

Usage

ablineCI(x, level = .95, lty = 2, ...)

Arguments

x
an object inheriting from lm.
level
confidence level.
lty
the line type.
...
additional arguments passed to lines

Value

A matrix of predictions.

Examples

Run this code
x <- rnorm(10)
y <- rnorm(10)
mod <- lm(y ~ x)

plot(x, y)
abline(mod)
ablineCI(mod)

Run the code above in your browser using DataLab