nix.affy.main
Class WilcoxonRankSumTest

java.lang.Object
  extended bynix.affy.main.WilcoxonRankSumTest

public class WilcoxonRankSumTest
extends java.lang.Object

Implementation of a Wilcoxon Rank Sum Test. Note, if the number of samples for either the treatment or control group is <10, no test statistics are calculated and the pValue is set to 1, logTPvalue is set to 0, and z to -10.


Constructor Summary
WilcoxonRankSumTest()
           
 
Method Summary
 double calculateZ()
          Only valid when # treatment samples and # control samples >9 each.
 double getLogTPvalue()
           
 int getNumberTreatmentsControls()
           
 void makeSamples(int[] treatment, int[] control)
           
 void rankSamples()
          Ranks a sorted array of WilcoxonSamples based on value.
 void setTwoTailed(boolean twoTailed)
           
 void sumRanks()
           
 double test(int[] treatment, int[] control)
          Returns a -10LogBase10(pValue) if n1 and n2 >9
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WilcoxonRankSumTest

public WilcoxonRankSumTest()
Method Detail

test

public double test(int[] treatment,
                   int[] control)
Returns a -10LogBase10(pValue) if n1 and n2 >9


calculateZ

public double calculateZ()
Only valid when # treatment samples and # control samples >9 each.


sumRanks

public void sumRanks()

rankSamples

public void rankSamples()
Ranks a sorted array of WilcoxonSamples based on value. If no ties are found then this is simply their array index number+1. (ie 1,2,3,4...) If ties are encountered, ties are assigned the average of their index positions+1. (ie if index+1's: 2,3,4 have the same absolute difference, all are assigned a rank of 3).


makeSamples

public void makeSamples(int[] treatment,
                        int[] control)

getLogTPvalue

public double getLogTPvalue()

getNumberTreatmentsControls

public int getNumberTreatmentsControls()

setTwoTailed

public void setTwoTailed(boolean twoTailed)