Class KruskallWallisTest

java.lang.Object
dk.alexandra.fresco.stat.tests.KruskallWallisTest
All Implemented Interfaces:
dk.alexandra.fresco.framework.builder.Computation<dk.alexandra.fresco.lib.fixed.SFixed,​dk.alexandra.fresco.framework.builder.numeric.ProtocolBuilderNumeric>

public class KruskallWallisTest
extends Object
implements dk.alexandra.fresco.framework.builder.Computation<dk.alexandra.fresco.lib.fixed.SFixed,​dk.alexandra.fresco.framework.builder.numeric.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<dk.alexandra.fresco.framework.DRes<dk.alexandra.fresco.framework.value.SInt>>> observed)  
  • Method Summary

    Modifier and Type Method Description
    dk.alexandra.fresco.framework.DRes<dk.alexandra.fresco.lib.fixed.SFixed> buildComputation​(dk.alexandra.fresco.framework.builder.numeric.ProtocolBuilderNumeric builder)  
    static List<List<dk.alexandra.fresco.framework.DRes<dk.alexandra.fresco.framework.value.SInt>>> fromSFixed​(List<List<dk.alexandra.fresco.framework.DRes<dk.alexandra.fresco.lib.fixed.SFixed>>> observed)
    If the test is to be applied on fixed point numbers (SFixed's), this method should be used to transform the data,

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • KruskallWallisTest

      public KruskallWallisTest​(List<List<dk.alexandra.fresco.framework.DRes<dk.alexandra.fresco.framework.value.SInt>>> observed)
  • Method Details

    • fromSFixed

      public static List<List<dk.alexandra.fresco.framework.DRes<dk.alexandra.fresco.framework.value.SInt>>> fromSFixed​(List<List<dk.alexandra.fresco.framework.DRes<dk.alexandra.fresco.lib.fixed.SFixed>>> observed)
      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 dk.alexandra.fresco.framework.DRes<dk.alexandra.fresco.lib.fixed.SFixed> buildComputation​(dk.alexandra.fresco.framework.builder.numeric.ProtocolBuilderNumeric builder)
      Specified by:
      buildComputation in interface dk.alexandra.fresco.framework.builder.Computation<dk.alexandra.fresco.lib.fixed.SFixed,​dk.alexandra.fresco.framework.builder.numeric.ProtocolBuilderNumeric>