reg.ci: Confidence intervals of a simple linear regression

View source: R/reg.ci.R

reg.ciR Documentation

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.

Author(s)

Maxime HERVE <maxime.herve@univ-rennes1.fr>

See Also

lm

Examples

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")

RVAideMemoire documentation built on Nov. 6, 2023, 5:07 p.m.