levene | R Documentation |
Levene's test and Brown-Forsythe test for equality of variances between groups on each row/column of the input matrix.
row_levene(x, g)
col_levene(x, g)
row_brownforsythe(x, g)
col_brownforsythe(x, g)
x |
numeric matrix. |
g |
a vector specifying group membership for each observation of x. |
NA values are always ommited. If values are missing for a whole group - that group is discarded.
row_levene(x, g)
- Levene's test on rows.
col_levene(x, g)
- Levene's test on columns.
row_brownforsythe(x, g)
- Brown-Forsythe test on rows.
col_brownforsythe(x, g)
- Brown-Forsythe test on columns.
a data.frame where each row contains the results of the Levene's test
performed on the corresponding row/column of x.
Each row contains the following information (in order):
1. obs.tot - total number of observations
2. obs.groups - number of groups
3. df.between - between group (treatment) degrees of freedom
4. df.within - within group (residual) degrees of freedom
5. statistic - F statistic
6. pvalue - p.value
Difference between Levene's test and Brown-Forsythe test is that the Brown-Forsythe test uses the median instead of the mean in computing the spread within each group. Many software implementations use the name "Levene's test" for both variants.
Karolis Koncevičius
leveneTest
col_levene(iris[,1:4], iris$Species)
row_brownforsythe(t(iris[,1:4]), iris$Species)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.