powered by
This function estimates the confidence interval for the grand mean of a balanced linear (mixed) model.
CIgrandMean(object, alpha = 0.05) # S3 method for CIgm print(x, ...)
An lm object possibly containing random effects.
lm
A scalar significance level for the confidence interval.
An object returned from CIgrandMean.
CIgrandMean
Additional arguments (not used).
CIgrandMean returns a vector of interval endpoints and center. print.CIgm has no return.
print.CIgm
This implementation is only valid for models containing no continuous effects and only balanced data.
Suggestions are welcome.
# NOT RUN { 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) # }
Run the code above in your browser using DataLab