Random Effects Analysis of Variance Dialog Functions

DESCRIPTION:

This function is used by the Random Effects Analysis of Variance dialog.

USAGE:

menuRaov(formula, data, subset=T, na.omit.p=T, weights=NULL, 
         contrasts=NULL, print.object.p=T, anova.p=T,  
         coef.p=F, dummy.coef.p=F, save.results=NULL, 
         save.resid.p=F, save.fitted.p=F,  
         plotResidVsFit.p=F, plotSqrtAbsResid.p=F,  
         plotResponseVsFit.p=F, plotQQ.p=F,  
         plotRFSpread.p=F, plotCooks.p=F, smooths.p=F,  
         rugplot.p=F, id.n=3, plotPartialResid.p=F,  
         plotPartialFit.p=F, rugplotPartialResid.p=F,  
         scalePartialResid.p=T) 

REQUIRED ARGUMENTS:

formula
a formula object, with the response on the left of a `~' operator, and the terms, separated by + operators, on the right.

OPTIONAL ARGUMENTS:

data
a data.frame in which to interpret the variables named in the formula, or in the subset and the weights argument. If this is missing, then the variables in the formula should be on the search list.
weights
vector of observation weights; if supplied, the algorithm fits to minimize the sum of the weights multiplied into the squared residuals. The length of weights must be the same as the number of observations. The weights must be nonnegative and it is strongly recommended that they be strictly positive, since zero weights are ambiguous, compared to use of the subset argument.
subset
expression saying which subset of the rows of the data should be used in the fit. This can be a logical vector (which is replicated to have length equal to the number of observations), or a numeric vector indicating which observation numbers are to be included, or a character vector of the row names to be included. All observations are included by default.
contrasts
a list of contrasts to be used for some or all of the factors appearing as variables in the model formula. The names of the list should be the names of the corresponding variables, and the elements should either be contrast-type matrices (matrices with as many rows as levels of the factor and with columns linearly independent of each other and of a column of one's), or else they should be functions that compute such contrast matrices.
na.omit.p
if TRUE, then any observation with missing values are removed from the analysis. If FALSE and there are missing values then the function will exit with a message that missing values are not allowed. If na.omit.p is TRUE then na.action is set to na.omit in the call to lm. If na.omit.p is FALSE then na.action is set to na.fail in the call to lm.
print.object.p
if TRUE, a short analysis of variance table is printed. This output is from the function print.aov.
anova.p
if TRUE, an ANOVA table is printed. This output is from the function summary.aov.
coef.p
if TRUE, coefficients of the least squares fit of the response(s) on the model matrix are printed. The column names of the matrix of coefficients are the names of the single- degree-of-freedom effects (the linearly independent columns of the model matrix). This output is from the function coef.lm.
dummy.coef.p
if TRUE, coefficients in terms of the original dummy variable coding of factors are printed. This output is from the function dummy.coef.
save.results
a character string for the name of the data frame to save the fit and residuals in. If data frame with this name already exists in database 1 and it has the appropriate number of rows then the saved values will be appended to the data frame. If the object already exist in database 1 and it is not a data frame or it does not have the appropriate number of rows then a new name is created by appending a number to save.results and the results are saved in the data frame with the new name.
save.fitted.p
if TRUE, the fitted values from the regression are saved in the data frame save.results.
save.resid.p
if TRUE, the residuals from the regression are saved in the data frame save.results.
plotResidVsFit.p
if TRUE, a plot of the residuals versus the fitted values is created.
plotSqrtAbsResid.p
if TRUE, a plot of the absolute value of the square root of the residuals versus the fitted values is created. This plot is useful for checking for the constant variance assumption of the model.
plotResponseVsFit.p
if TRUE, a plot of the response versus the fitted values is created.
plotQQ.p
if TRUE, a Normal quantile-quantile plot of the residuals is created.
plotRFSpread.p
if TRUE, a residual-fit spread plot is created. This is a visual analog to the multiple R-squared statistic. It compares the spread of the fitted values to the spread of the residuals.
plotCooks.p
if TRUE, a plot of Cooks distance values versus the observation number is created.
smooths.p
if TRUE a smooth curve, computed with loess.smooth is displayed on the Residuals vs Fit, Sqrt Abs Residuals vs Fit and Response vs Fit plots.
rugplot.p
if TRUE, a rugplot is displayed on the Residuals vs Fit, Sqrt Abs Residuals vs Fit and Response vs Fit plots. A rugplot is a sequence of vertical bars along the x-axis that mark the "observed" x values.
id.n
the number of extreme points that will be identified on the Residuals vs Fit, Sqrt Abs Residuals vs Fit, Residual's Normal QQ and Cook s Distance plots. The row names from the models data frame will be used to identify the points.
plotPartialResid.p
if TRUE, partial residual plots for all the terms in the model will be created.
plotPartialFit.p
if TRUE, the partial fit for the term is also displayed on the partial residual plots.
rugplotPartialResid.p
if TRUE, a rugplot is displayed on the partial residual plots. A rugplot is a sequence of vertical bars along the x-axis that mark the "observed" x values.
scalePartialResid.p
if TRUE, all the partial residual plots will have the same vertical units. This is essential for comparing the importance of fitted terms in additive models.

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.

SIDE EFFECTS:

Plots will be drawn if requested. The objects save.results will be created or appended to if fitted values or residuals are saved.

SEE ALSO:

, , , , , , , , , .