diff --git a/tetrad-lib/src/main/java/edu/cmu/tetrad/search/DeltaSextadTest.java b/tetrad-lib/src/main/java/edu/cmu/tetrad/search/DeltaSextadTest.java index c22ade5900..f8762ad67d 100644 --- a/tetrad-lib/src/main/java/edu/cmu/tetrad/search/DeltaSextadTest.java +++ b/tetrad-lib/src/main/java/edu/cmu/tetrad/search/DeltaSextadTest.java @@ -364,13 +364,13 @@ private double r(double array1[], double array2[], int N) { private int dofDrton(int n) { int dof = ((n - 2) * (n - 3)) / 2 - 2; - if (dof < 0) dof = 0; + if (dof < 1) dof = 1; return dof; } private int dofHarman(int n) { int dof = n * (n - 5) / 2 + 1; - if (dof < 0) dof = 0; + if (dof < 1) dof = 1; return dof; } diff --git a/tetrad-lib/src/test/java/edu/cmu/tetrad/test/TestDeltaSextadTest.java b/tetrad-lib/src/test/java/edu/cmu/tetrad/test/TestDeltaSextadTest.java index 85402f9960..207f8d0c24 100644 --- a/tetrad-lib/src/test/java/edu/cmu/tetrad/test/TestDeltaSextadTest.java +++ b/tetrad-lib/src/test/java/edu/cmu/tetrad/test/TestDeltaSextadTest.java @@ -144,7 +144,7 @@ public void testBollenExampleb() { IntSextad[] _sextads = {t2, t5, t10, t3, t6}; double p = test.getPValue(_sextads); - assertEquals(0.90, p, 0.01); + assertEquals(0.21, p, 0.01); _sextads = new IntSextad[] {t10}; p = test.getPValue(_sextads);