Stat { public static double logoggs(double p) { return Math.log(p) - Math.log(1 - p); }  static double hg(long D, long gt, long S); static double hgapprox(long D, long gt, int S); static double beta_CDF(double x, int a, int b); static double incompleteBeta(double x, int a, int b); static double beta(int a, int b); static double ix(double x, int a, int b); static double logNfact(long n); static long nFactExact(long n); static double binom(int n, int i); static double logBinom(int n, int i); static double logoggs(double p); static double logit(double logodds); static void main(String[] args);  }
@Test public final void testLogoggs() { double arg1s[] = { 0.05, 0.1, 0.15, 0.2, 0.25, 0.3, 0.35, 0.4, 0.45, 0.5, 0.55, 0.6, 0.65, 0.7, 0.75, 0.8, 0.85, 0.9, 0.95 }; double ress[] = { -2.944, -2.197, -1.735, -1.386, -1.099, -0.847, -0.619, -0.405, -0.201, 0, 0.201, 0.405, 0.619, 0.847, 1.099, 1.386, 1.735, 2.197, 2.944 }; List<ModelDoubleDouble> testData = TestDataManager.fillTestCasesDoubleDouble(arg1s, ress); for (ModelDoubleDouble datum: testData) { assertEquals(datum.getRes(), Stat.logoggs(datum.getArg1()), TestDataManager.DELTA_DOUBLE); } }