Package ubic.basecode.math
Class KruskalWallis
java.lang.Object
ubic.basecode.math.KruskalWallis
Perform a Kruskal-Wallis test.
- Author:
- paul
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic int
dof
(DoubleArrayList scores, IntArrayList groupings) static double
kwStatistic
(DoubleArrayList scores, IntArrayList groupings) static double
test
(DoubleArrayList scores, IntArrayList groupings) Perform a Kruskal-Wallis one-way ANOVA.
-
Constructor Details
-
KruskalWallis
public KruskalWallis()
-
-
Method Details
-
dof
- Parameters:
scores
-groupings
-- Returns:
- number of degrees of freedom (number of groups - 1)
-
kwStatistic
- Parameters:
scores
-groupings
-- Returns:
- statistic; chi-squared with numgroups - 1 dof under the null.
-
test
Perform a Kruskal-Wallis one-way ANOVA.Implementation note: Does not make special corrections for ties, though ties are given the averaged ranks. Completely bare-bones. Missing values are not tolerated well.
- Parameters:
scores
-groupings
- integer indicators of which values are in which groups. The actual values don't matter.- Returns:
- p-values based on the chi-squared statistic.
-