View source: R/ifr-levene-test.R
ifr_levene_test | R Documentation |
ifr_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
ifr_levene_test(data, ...)
## Default S3 method:
ifr_levene_test(data, ..., group_var = NULL, trim_mean = 0.1)
data |
a |
... |
numeric; columns in |
group_var |
factor; column in |
trim_mean |
trimmed mean |
ifr_levene_test
returns an object of class "ifr_levene_test"
.
An object of class "ifr_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 |
infer_levene_test()
has been deprecated. Instead use ifr_levene_test()
.
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.
# using grouping variable
ifr_levene_test(hsb, read, group_var = race)
# using variables
ifr_levene_test(hsb, read, write, socst)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.