@Test public void testTest() { logger.info("test"); TransposeDataList transposeDataList = new TransposeDataList(); transposeDataList.put(0, new FlatDataList(Arrays.asList(new Object[]{56,75,45,71,61,64,58,80,76,61}))); transposeDataList.put(1, new FlatDataList(Arrays.asList(new Object[]{66,70,40,60,65,56,59,77,67,63}))); boolean is_twoTailed = true; double aLevel = 0.05; boolean expResult = true; boolean result = SpearmanCorrelation.test(transposeDataList, is_twoTailed, aLevel); assertEquals(expResult, result); }
public static boolean test(TransposeDataList transposeDataList, boolean is_twoTailed, double aLevel) { if(transposeDataList.isEmpty()) { return false; } double SpearmanCorrelation= calculateCorrelation(transposeDataList); Object firstKey = transposeDataList.keySet().iterator().next(); int n=transposeDataList.get(firstKey).size(); double pvalue = scoreToPvalue(SpearmanCorrelation,n); boolean rejectH0=false; double a=aLevel; if(is_twoTailed) { a=aLevel/2; } if(pvalue<=a || pvalue>=(1-a)) { rejectH0=true; } return rejectH0; }
SpearmanCorrelation { public static boolean test(TransposeDataList transposeDataList, boolean is_twoTailed, double aLevel) { if(transposeDataList.isEmpty()) { return false; } double SpearmanCorrelation= calculateCorrelation(transposeDataList); Object firstKey = transposeDataList.keySet().iterator().next(); int n=transposeDataList.get(firstKey).size(); double pvalue = scoreToPvalue(SpearmanCorrelation,n); boolean rejectH0=false; double a=aLevel; if(is_twoTailed) { a=aLevel/2; } if(pvalue<=a || pvalue>=(1-a)) { rejectH0=true; } return rejectH0; } }
SpearmanCorrelation { public static boolean test(TransposeDataList transposeDataList, boolean is_twoTailed, double aLevel) { if(transposeDataList.isEmpty()) { return false; } double SpearmanCorrelation= calculateCorrelation(transposeDataList); Object firstKey = transposeDataList.keySet().iterator().next(); int n=transposeDataList.get(firstKey).size(); double pvalue = scoreToPvalue(SpearmanCorrelation,n); boolean rejectH0=false; double a=aLevel; if(is_twoTailed) { a=aLevel/2; } if(pvalue<=a || pvalue>=(1-a)) { rejectH0=true; } return rejectH0; }  }
SpearmanCorrelation { public static boolean test(TransposeDataList transposeDataList, boolean is_twoTailed, double aLevel) { if(transposeDataList.isEmpty()) { return false; } double SpearmanCorrelation= calculateCorrelation(transposeDataList); Object firstKey = transposeDataList.keySet().iterator().next(); int n=transposeDataList.get(firstKey).size(); double pvalue = scoreToPvalue(SpearmanCorrelation,n); boolean rejectH0=false; double a=aLevel; if(is_twoTailed) { a=aLevel/2; } if(pvalue<=a || pvalue>=(1-a)) { rejectH0=true; } return rejectH0; }  static double calculateCorrelation(TransposeDataList transposeDataList); static boolean test(TransposeDataList transposeDataList, boolean is_twoTailed, double aLevel); }
SpearmanCorrelation { public static boolean test(TransposeDataList transposeDataList, boolean is_twoTailed, double aLevel) { if(transposeDataList.isEmpty()) { return false; } double SpearmanCorrelation= calculateCorrelation(transposeDataList); Object firstKey = transposeDataList.keySet().iterator().next(); int n=transposeDataList.get(firstKey).size(); double pvalue = scoreToPvalue(SpearmanCorrelation,n); boolean rejectH0=false; double a=aLevel; if(is_twoTailed) { a=aLevel/2; } if(pvalue<=a || pvalue>=(1-a)) { rejectH0=true; } return rejectH0; }  static double calculateCorrelation(TransposeDataList transposeDataList); static boolean test(TransposeDataList transposeDataList, boolean is_twoTailed, double aLevel);  }