Learn R Programming

RVAideMemoire (version 0.9-79)

reg.ci: 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

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.

See Also

lm

Examples

Run this code
# NOT RUN {
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")
# }

Run the code above in your browser using DataLab