obrien.test {vartest} | R Documentation |
O'Brien Test
Description
obrien.test
performs O'Brien variance homogeneity test.
Usage
obrien.test(formula, data, center = "mean", trim.rate = 0.25, alpha = 0.05,
na.rm = TRUE, verbose = TRUE)
Arguments
formula |
a formula of the form |
data |
a tibble or data frame containing the variables in |
center |
a character string to define how to center. "mean": mean, "median": median, and "trim.mean": trimmed mean. |
trim.rate |
the rate of observations trimmed from each tail of the distribution. Default is set to 0.25. |
alpha |
the level of significance to assess variance homogeneity. Default is set to alpha = 0.05. |
na.rm |
a logical value indicating whether NA values should be stripped before the computation proceeds. |
verbose |
a logical for printing output to R console. |
Value
A list containing the following components:
statistic |
the corresponding test statistic. |
parameter |
the parameter(s) of the approximate F distribution of the test statistic. |
p.value |
the p-value of the test. |
method |
the character string "O'Brien Test". |
data |
a data frame containing the variables in which NA values (if exist) are removed. |
formula |
a formula of the form |
Author(s)
Gozde Cosar and Osman Dag
References
O'Brien, R.G. (1981). A Simple Test for Variance Effects in Experimental Designs. Psychological Bulletin, 89:3, 570-574.
Gorbunova, A.A., Lemeshko, B.Y. (2012). Application of Parametric Homogeneity of Variances Tests under Violation of Classical Assumption. 2nd Stochastic Modeling Techniques and Data Analysis International Conference, 5:8, 253-260.
Examples
library(vartest)
obrien.test(Sepal.Length ~ Species, data = iris, center="mean")