Skip to content

Commit

Permalink
Per #2883, need to call set_n_pairs() in a few spots to set ECLV TOTA…
Browse files Browse the repository at this point in the history
…L column correctly ci-run-unit
  • Loading branch information
JohnHalleyGotway committed Oct 7, 2024
1 parent ace7c1b commit 55dbd06
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
2 changes: 2 additions & 0 deletions src/libcode/vx_statistics/contable.cc
Original file line number Diff line number Diff line change
Expand Up @@ -646,6 +646,7 @@ void TTContingencyTable::set_size(int NR, int NC) {
TTContingencyTable finley() {
TTContingencyTable t;

t.set_n_pairs(2803);
t.set_fy_oy(28);
t.set_fn_oy(23);
t.set_fy_on(72);
Expand All @@ -665,6 +666,7 @@ TTContingencyTable finley() {
TTContingencyTable finley_always_no() {
TTContingencyTable t;

t.set_n_pairs(2803);
t.set_fy_oy(0);
t.set_fn_oy(51);
t.set_fy_on(0);
Expand Down
3 changes: 3 additions & 0 deletions src/libcode/vx_statistics/contable_nx2.cc
Original file line number Diff line number Diff line change
Expand Up @@ -541,6 +541,9 @@ TTContingencyTable Nx2ContingencyTable::ctc_by_row(int row) const {
exit(1);
}

// Store the number of pairs
tt.set_n_pairs(Npairs);

double sy = 0.0;
double sn = 0.0;

Expand Down
8 changes: 4 additions & 4 deletions src/libcode/vx_statistics/met_stats.cc
Original file line number Diff line number Diff line change
Expand Up @@ -428,10 +428,10 @@ void CTSInfo::compute_ci() {
void CTSInfo::set_stat_ctc(const string &stat_name, double v) {

if(stat_name == "TOTAL") cts.set_n_pairs(nint(v));
else if(stat_name == "FY_OY") cts.set_fy_oy(nint(v));
else if(stat_name == "FY_ON") cts.set_fy_on(nint(v));
else if(stat_name == "FN_OY") cts.set_fn_oy(nint(v));
else if(stat_name == "FN_ON") cts.set_fn_on(nint(v));
else if(stat_name == "FY_OY") cts.set_fy_oy(v);
else if(stat_name == "FY_ON") cts.set_fy_on(v);
else if(stat_name == "FN_OY") cts.set_fn_oy(v);
else if(stat_name == "FN_ON") cts.set_fn_on(v);
else if(stat_name == "EC_VALUE") cts.set_ec_value(v);

return;
Expand Down

0 comments on commit 55dbd06

Please sign in to comment.