The confint_sigma2
function computes confidence interval for the sigma2 parameter in a linear model fitted with the lm function.
confint_sigma2(object, level = 0.95)
a lm object.
the confidence level required.
A matrix with columns giving lower and upper confidence limits.
# Example for simple linear regression
mod <- lm(dist ~ speed, data=cars)
confint_sigma2(object=mod, level=0.95)
#> 2.5 % 97.5 %
#> Sigma2 164.4899 369.1661
confint_sigma2(object=mod, level=0.80)
#> 10 % 90 %
#> Sigma2 186.4087 315.8218
# Example for multiple linear regression
mod <- lm(mpg ~ wt + hp, data=mtcars)
confint_sigma2(object=mod, level=0.95)
#> 2.5 % 97.5 %
#> Sigma2 4.265923 12.15473
confint_sigma2(object=mod, level=0.80)
#> 10 % 90 %
#> Sigma2 4.990033 9.866971