Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

scheffe

Calculate simultaneous confidence limits by Scheffe's method


Description

Function to compute the Scheffe corrected confidence interval for the regression line

Usage

scheffe(model, newdata = model.frame(model), level = 0.95)

Arguments

model

Linear model

newdata

new data frame

level

confidence level (0.95)

Examples

x <- rnorm(100)
d <- data.frame(y=rnorm(length(x),x),x=x)
l <- lm(y~x,d)
plot(y~x,d)
abline(l)
d0 <- data.frame(x=seq(-5,5,length.out=100))
d1 <- cbind(d0,predict(l,newdata=d0,interval="confidence"))
d2 <- cbind(d0,scheffe(l,d0))
lines(lwr~x,d1,lty=2,col="red")
lines(upr~x,d1,lty=2,col="red")
lines(lwr~x,d2,lty=2,col="blue")
lines(upr~x,d2,lty=2,col="blue")

lava

Latent Variable Models

v1.6.10
GPL-3
Authors
Klaus K. Holst [aut, cre], Brice Ozenne [ctb], Thomas Gerds [ctb]
Initial release
2021-09-01

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.