Package dk.alexandra.fresco.stat.tests
Class KruskallWallisTest
Object
KruskallWallisTest
- All Implemented Interfaces:
Computation<SFixed,ProtocolBuilderNumeric>
public class KruskallWallisTest extends Object implements Computation<SFixed,ProtocolBuilderNumeric>
Compute the Kruskall-Wallis test statistic on k groups, also known as one-way ANOVA on ranks. The test statistic may be approximated by a 𝛘2 distribution with k-1 degrees of freedom.
The elements are ranked sequentially ignoring ties unless the averageTies parameter is set, in which case ties are replaced with the average of the ranks of the elements it is tied with. Setting averageTies to true returns the standard test statistics, but using false should not affect the test statistic too much. If averageTies is set to true, the ranks of the ties will be leaked to all parties.
-
Constructor Summary
Constructors Constructor Description KruskallWallisTest(List<List<DRes<SInt>>> observed)
-
Method Summary
Modifier and Type Method Description DRes<SFixed>
buildComputation(ProtocolBuilderNumeric builder)
static List<List<DRes<SInt>>>
fromSFixed(List<List<DRes<SFixed>>> observed)
If the test is to be applied on fixed point numbers (SFixed's), this method should be used to transform the data,
-
Constructor Details
-
Method Details
-
fromSFixed
If the test is to be applied on fixed point numbers (SFixed's), this method should be used to transform the data,- Parameters:
observed
- The data as fixed point numbers.- Returns:
- The input data scaled to integers to be used in the test.
-
buildComputation
public DRes<SFixed> buildComputation(ProtocolBuilderNumeric builder)- Specified by:
buildComputation
in interfaceComputation<SFixed,ProtocolBuilderNumeric>
-