From 5d1ea00146a822cac6a12d19e1124c5da3b5ceb5 Mon Sep 17 00:00:00 2001 From: John Halley Gotway Date: Wed, 4 Sep 2024 13:57:05 -0600 Subject: [PATCH] Per #2958, fix SECI confidence interval bug as well as BAGSS integer division issue. --- src/libcode/vx_statistics/contable_stats.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/libcode/vx_statistics/contable_stats.cc b/src/libcode/vx_statistics/contable_stats.cc index 7e7194c11..7e7b8b478 100644 --- a/src/libcode/vx_statistics/contable_stats.cc +++ b/src/libcode/vx_statistics/contable_stats.cc @@ -309,8 +309,8 @@ double TTContingencyTable::bagss() const { ha = (double) oy() - (fy_on() / lf) * lw; } - num = ha - (oy() * oy() / n()); - den = 2.0*oy() - ha - (oy() * oy() / n()); + num = ha - ((double) oy() * oy() / n()); + den = 2.0*oy() - ha - ((double) oy() * oy() / n()); if(is_eq(den, 0.0)) v = bad_data_double; else v = num/den; @@ -698,7 +698,7 @@ double TTContingencyTable::sedi_ci(double alpha, double &cl, double &cu) const { double v, h, f, b, se, mf, mh; - v = edi(); + v = sedi(); f = (double) fy_on() / (fy_on() + fn_on()); h = pod_yes(); b = baser();