CIgrandMean: Confidence interval for the grand mean of a linear model

View source: R/statistics.R

CIgrandMeanR Documentation

Confidence interval for the grand mean of a linear model

Description

This function estimates the confidence interval for the grand mean of a balanced linear (mixed) model.

Usage

CIgrandMean(object, alpha = 0.05)
## S3 method for class 'CIgm'
print(x, ...)

Arguments

object

An lm object possibly containing random effects.

alpha

A scalar significance level for the confidence interval.

x

An object returned from CIgrandMean.

...

Additional arguments (not used).

Details

This implementation is only valid for models containing no continuous effects and only balanced data.

Value

CIgrandMean returns a vector of interval endpoints and center. print.CIgm has no return.

Author(s)

Kristian Hovde Liland

References

Suggestions are welcome.

Examples

set.seed(42)
dataset   <- data.frame(y=rnorm(8), x=factor(c(rep(1,4),rep(0,4))), z=factor(rep(c(1,0),4)))
mixlm <- lm(y~x*r(z), data = dataset)
CIgrandMean(mixlm)

mixlm documentation built on Aug. 8, 2023, 5:08 p.m.