kruskalwallis: Kruskal-Wallis rank sum test

kruskalwallisR Documentation

Kruskal-Wallis rank sum test

Description

Performs a Kruskal-Wallis rank sum test on each row/column of the input matrix.

Usage

row_kruskalwallis(x, g)

col_kruskalwallis(x, g)

Arguments

x

numeric matrix.

g

a vector specifying group membership for each observation of x.

Details

row_kruskalwallis(x, g) - Kruskal Wallis test on rows. col_kruskalwallis(x, g) - Kruskal Wallis test on columns.

Results should be the same as running kruskal.test(x, g) on every row (or column) of x

Value

a data.frame where each row contains the results of a Kruskal-Wallis 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
4. df - degrees of freedom
5. statistic - chi-squared statistic
6. pvalue - p.value

Author(s)

Karolis Koncevičius

See Also

kruskal.test()

Examples

col_kruskalwallis(iris[,1:4], iris$Species)
row_kruskalwallis(t(iris[,1:4]), iris$Species)


matrixTests documentation built on Oct. 6, 2023, 1:07 a.m.