infer_levene_test {inferr} | R Documentation |
Levene's test for equality of variances
Description
infer_levene_test
reports Levene's robust test statistic
for the equality of variances and the
two statistics proposed by Brown and Forsythe that replace the mean in
Levene's formula with alternative location estimators. The first alternative
replaces the mean with the median. The second alternative replaces
the mean with the 10
Usage
infer_levene_test(data, ...)
## Default S3 method:
infer_levene_test(data, ..., group_var = NULL, trim_mean = 0.1)
Arguments
data |
a |
... |
numeric; columns in |
group_var |
factor; column in |
trim_mean |
trimmed mean |
Value
infer_levene_test
returns an object of class "infer_levene_test"
.
An object of class "infer_levene_test"
is a list containing the
following components:
bf |
Brown and Forsythe f statistic |
p_bf |
p-value for Brown and Forsythe f statistic |
lev |
Levene's f statistic |
p_lev |
p-value for Levene's f statistic |
bft |
Brown and Forsythe f statistic using trimmed mean |
p_bft |
p-value for Brown and Forsythe f statistic using trimmed mean |
avgs |
mean for each level of the grouping variable |
sds |
standard deviations for each level of the grouping variable |
avg |
combined mean |
sd |
combined standard deviation |
n |
number of observations |
n_df |
numerator degrees of freedom |
d_df |
denominator degrees of freedom |
levs |
levels of the grouping variable |
lens |
number of observations for each level of the grouping variable |
type |
alternative hypothesis |
Deprecated Function
levene_test()
has been deprecated. Instead use infer_levene_test()
.
References
Bland, M. 2000. An Introduction to Medical Statistics. 3rd ed. Oxford: Oxford University Press.
Brown, M. B., and A. B. Forsythe. 1974. Robust tests for the equality of variances. Journal of the American Statistical Association 69: 364–367.
Carroll, R. J., and H. Schneider. 1985. A note on Levene’s tests for equality of variances. Statistics and Probability Letters 3: 191–194.
Examples
# using grouping variable
infer_levene_test(hsb, read, group_var = race)
# using variables
infer_levene_test(hsb, read, write, socst)