bfmedian.test | R Documentation |
The function performs the robust Brown-Forsythe test using the group medians.
bfmedian.test(formula, data, alpha = 0.05, na.rm = TRUE,
verbose = TRUE)
formula |
a formula of the form lhs ~ rhs where lhs gives the sample values and rhs the corresponding groups. |
data |
a tibble or data frame containing the variables in formula. |
alpha |
the level of significance to assess the statistical difference. Default is set to alpha = 0.05. |
na.rm |
a logical value indicating whether NA values should be stripped before the computation proceeds. Default us set to TRUE. |
verbose |
a logical for printing output to R console. |
Levene (1960) proposed a test for homogeneity of variances in k groups which is based on the ANOVA statistic applied to absolute deviations of observations from the corresponding group mean. The robust Brown-Forsythe version of the Levene-type test substitutes the group mean by the group median in the classical Levene statistic.
A list with class "owt" containing the following components:
statistic |
the Brown-Forsythe test statistic. |
parameter |
the parameter(s) of the approximate F distribution of the test statistic. |
p.value |
the p-value of the test. |
alpha |
the level of significance to assess the statistical difference. |
method |
the character string "Brown-Forsythe-Median Test". |
data |
a data frame containing the variables in which NA values (if exist) are removed. |
formula |
a formula of the form lhs ~ rhs where lhs gives the sample values and rhs the corresponding groups. |
Modified from the onewaytests
package and vGWAS
.
Kristian Ullrich
Brown, M. B. and Forsythe, A.B. (1974). Robust tests for
equality of variances.
Journal of the American Statistical Association, 69,
364-367.
Levene, H. (1960).
Robust Tests for Equality of Variances, in Contributions
to Probability and Statistics, ed. I. Olkin, Palo Alto, CA: Stanford Univ.
Press.
data(pheno)
data(geno)
df <- data.frame(phenotype = pheno, genotype = as.factor(geno[, 911]))
bfmedian.test(phenotype ~ genotype, data = df)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.