Learn R Programming

matrixTests (version 0.2.2)

levene: Levene test

Description

Levene's test and Brown-Forsythe test for equality of variances between groups on each row/column of the input matrix.

Usage

row_levene(x, g)

col_levene(x, g)

row_brownforsythe(x, g)

col_brownforsythe(x, g)

Value

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

Arguments

x

numeric matrix.

g

a vector specifying group membership for each observation of x.

Author

Karolis Koncevičius

Details

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.

See Also

Examples

Run this code
col_levene(iris[,1:4], iris$Species)
row_brownforsythe(t(iris[,1:4]), iris$Species)

Run the code above in your browser using DataLab