@Test void testB() { MultipleTestingCorrection bonf = new BenjaminiYekutieli(); bonf.adjustPvals(pvallist); PValue item = getResult(MadeUpPValues.B,pvallist); assertNotNull(item); double adjpval = item.getAdjustedPValue(); assertEquals(0.009954687,adjpval,EPSILON); }
@Override public void adjustPvals(List<? extends PValue> pvals) { Collections.sort(pvals); int N = pvals.size(); double h = 0.0; for (int l = 1; l <= N; l++) { h += 1.0 / l; } for (int r = 0; r < N; r++) { PValue item = pvals.get(r); double raw_p = item.getRawPValue(); double adj_p = raw_p * N * h / (r + 1); item.setAdjustedPValue(adj_p); } enforcePValueMonotony(pvals); }
BenjaminiYekutieli implements MultipleTestingCorrection { @Override public void adjustPvals(List<? extends PValue> pvals) { Collections.sort(pvals); int N = pvals.size(); double h = 0.0; for (int l = 1; l <= N; l++) { h += 1.0 / l; } for (int r = 0; r < N; r++) { PValue item = pvals.get(r); double raw_p = item.getRawPValue(); double adj_p = raw_p * N * h / (r + 1); item.setAdjustedPValue(adj_p); } enforcePValueMonotony(pvals); } }
BenjaminiYekutieli implements MultipleTestingCorrection { @Override public void adjustPvals(List<? extends PValue> pvals) { Collections.sort(pvals); int N = pvals.size(); double h = 0.0; for (int l = 1; l <= N; l++) { h += 1.0 / l; } for (int r = 0; r < N; r++) { PValue item = pvals.get(r); double raw_p = item.getRawPValue(); double adj_p = raw_p * N * h / (r + 1); item.setAdjustedPValue(adj_p); } enforcePValueMonotony(pvals); }  }
BenjaminiYekutieli implements MultipleTestingCorrection { @Override public void adjustPvals(List<? extends PValue> pvals) { Collections.sort(pvals); int N = pvals.size(); double h = 0.0; for (int l = 1; l <= N; l++) { h += 1.0 / l; } for (int r = 0; r < N; r++) { PValue item = pvals.get(r); double raw_p = item.getRawPValue(); double adj_p = raw_p * N * h / (r + 1); item.setAdjustedPValue(adj_p); } enforcePValueMonotony(pvals); }  @Override void adjustPvals(List<? extends PValue> pvals); String getName(); }
BenjaminiYekutieli implements MultipleTestingCorrection { @Override public void adjustPvals(List<? extends PValue> pvals) { Collections.sort(pvals); int N = pvals.size(); double h = 0.0; for (int l = 1; l <= N; l++) { h += 1.0 / l; } for (int r = 0; r < N; r++) { PValue item = pvals.get(r); double raw_p = item.getRawPValue(); double adj_p = raw_p * N * h / (r + 1); item.setAdjustedPValue(adj_p); } enforcePValueMonotony(pvals); }  @Override void adjustPvals(List<? extends PValue> pvals); String getName();  }