equalvar: Equality of Variances

View source: R/equalvar.R

equalvarR Documentation

Equality of Variances

Description

Equality of Variances

Usage

equalvar(data, formula, center = "median", plots = FALSE)

Arguments

data

A data.frame containing columns of variables.

formula

An object of class formula. The left side of the formula should be a numeric continuous response. The right side of the formula should consist of categorical factors. The variables on the right-hand-side of the model must all be factors and must be completely crossed.

center

The name of a function to compute the center of each group; mean gives the original Levene's test; the default, median, provides a more robust test.

plots

A TRUE/FALSE boolean indicating whether or not to produce boxplots

Value

Returns a data.frame meant to be printed showing the results of the test.

Note

This function primarily utilizes functionality from the car package

References

Fox, J. (2016) Applied Regression Analysis and Generalized Linear Models, Third Edition. Sage.

Fox, J. and Weisberg, S. (2019) An R Companion to Applied Regression, Third Edition, Sage.

Examples

equalvar(data=mtcars, mpg~am*vs, center="median")

jprice80/lmmaov documentation built on Sept. 6, 2024, 11:54 a.m.