Random Effects Analysis of Variance

DESCRIPTION:
Performs an analysis of variance including the estimation of variance components for random models.

USAGE:
raov(formula, data, ...)

REQUIRED ARGUMENTS:
formula:
formula specifying the analysis of variance model. This may also be the result of a call to aov if the appropriate data frame is attached or the variables are on the search path.

OPTIONAL ARGUMENTS:
data:
data frame containing the variables appearing in the formula. If this is missing, a data frame will usually have been attached.
...:
any other arguments to be passed to lm defining the model or the fit, such as subset or na.action.

VALUE:
a fitted anova model, similar to that returned by aov but containing two additional components used for computing the estimated random effects:
replications:
the number of replications for each term in the model.
ems.coef:
a square matrix containing information on the expected mean square of the terms in the model.

DETAILS:
The difference between raov and aov appears when the summary method is called; this method will compute and print the estimated variances for the random effects model with the output from raov. Specifically, the ordinary mean-squares and the component ems.coef from the fitted anova model are used to estimate the variances for the usual random effects model for each relevant main factor or interaction in the model. That is, the so-called ANOVA method is used to estimate the variance components.

The model must be balanced (raov checks this with the replications function), and the model must be fully random. Only single strata designs are currently allowed; i.e., there can be no Error term in the formula.


SEE ALSO:
varcomp , aov , summary , replications .

EXAMPLES:
praov <- raov(Moisture ~ Batch/Sample, pigment)
summary(praov)
                   Df Sum of Sq Mean Sq Est. Var.
             Batch 14   1210.93 86.4952    7.1280
 Sample %in% Batch 15    869.75 57.9833   28.5333
         Residuals 30     27.50  0.9167    0.9167