Confidence intervals of a simple linear regression

Description

Computes and add to a graph the confidence interval of a simple regression line or of individual values.

Usage

1
reg.ci(model, conf.level = 0.95, type = c("mean", "ind"), ...)

Arguments

model

lm model.

conf.level

confidence level.

type

interval type : "mean" for the interval of the regression line (default), "ind" for the interval of individual values (also called "prediction interval").

...

other agruments. See help of lines.

Author(s)

Maxime Herv<e9> <mx.herve@gmail.com>

See Also

lm

Examples

1
2
3
4
5
6
7
x <- 1:50
y <- 1:50+rnorm(50,0,4)
regression <- lm(y~x)
plot(x,y)
abline(regression)
reg.ci(regression,type="mean",col="red")
reg.ci(regression,type="ind",col="blue")

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.