|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecttrans.main.WilcoxonSignedRankTest
Implementation of a Wilcoxon Signed Rank Test. Many issues to consider: what to do about ties, what to do about zero diffs, what to use as the output (WPlus, WMinus, WCombine, which z-value (Zw or Zs), a p-value, or Affys -10*LogBase10(p-value) transformation, lastly how to handle situations where N<10. The minimal constructor here averages ties, throws out zero diffs, uses the Lowry z-value calculation method and the Affy p-value transformation (transformedPValueFloat) as the final output. Note: this transformedPValueFloat may be 0 indicating no significance (or N<5) (p-value > 0.05), 90 "very" significant (p-value < 1E-11) or something measurable in between. Affys favored 10-5 p-value cutoff corresponds to a LogTrans= 49.4, with bigger numbers "more significant" although in reality, anything bigger than LogTrans 13.1 is, by WSRT, significant, assuming a normal distribution and >10 non zero difference sample pairs. Uncomment the main() to test and tweak.
Constructor Summary | |
WilcoxonSignedRankTest()
|
|
WilcoxonSignedRankTest(float[] treatment,
float[] control)
Minimal constructor, fastest way to calculate a transformedPValueFloat |
Method Summary | |
static double |
calcSmallSample10Log10PValue(float W,
int N)
For calculating a -10Log10(pValue) for small sample sizes (N 5-9). |
void |
calculateSignedRankStatistics()
Calculates signed rank statistic S = sum of the ranks (aka WPlus) for WilcoxonSamplePairs with a positive difference and WMinus for those with a negative difference. |
void |
calculateTestStatisticZs()
Calculates test statistic Z from wsignsignrank.pdf Not used in this implementation. |
void |
calculateTestStatisticZw()
Calculates test statistic Z from Lowry . |
void |
createSamplePairs(float[] treatment,
float[] control,
boolean noZeros)
Creates WilcoxonSamplePair objects from two float[]s. |
double[] |
getAverageIntensityValues()
|
int |
getN()
|
int |
getNumberWMinusRanks()
|
int |
getNumberWPlusRanks()
|
double |
getTransformedPValue()
|
java.lang.String |
getTransformedPValueString()
|
float |
getW()
|
float |
getWMinus()
|
float |
getWPlus()
|
WilcoxonSamplePair[] |
getWsps()
|
float |
getZs()
|
float |
getZw()
|
static void |
main(java.lang.String[] args)
|
void |
rankSamplePairs()
Ranks a sorted array of WilcoxonSamplePairs based on absoluteDifference. |
void |
setWsps(WilcoxonSamplePair[] pairs)
|
static float[] |
signedDifference(float[] scores,
float median)
Returns signed difference between the scores and a median. |
double |
test()
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public WilcoxonSignedRankTest(float[] treatment, float[] control)
public WilcoxonSignedRankTest()
Method Detail |
public double test()
public void calculateTestStatisticZw()
public void calculateSignedRankStatistics()
public void rankSamplePairs()
public void createSamplePairs(float[] treatment, float[] control, boolean noZeros)
public static float[] signedDifference(float[] scores, float median)
public static double calcSmallSample10Log10PValue(float W, int N)
public java.lang.String toString()
public WilcoxonSamplePair[] getWsps()
public void setWsps(WilcoxonSamplePair[] pairs)
public float getZw()
public int getNumberWMinusRanks()
public int getNumberWPlusRanks()
public float getW()
public float getWMinus()
public float getWPlus()
public double getTransformedPValue()
public java.lang.String getTransformedPValueString()
public void calculateTestStatisticZs()
public static void main(java.lang.String[] args)
public int getN()
public float getZs()
public double[] getAverageIntensityValues()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |