Skip to content

Correct misclassification risk estimates and align result interpretation - #133

Merged
sbalci merged 3 commits into
masterfrom
fix/misclassificationbias-reporting
Nov 28, 2026
Merged

sbalci merged 3 commits into
masterfrom
fix/misclassificationbias-reporting

Conversation

@sbalci

@sbalci sbalci commented Nov 27, 2026 •

Copy link
Copy Markdown
Owner

Summary

Rebased onto master after #132 (@chenyangsu's corrected risk denominators and asymmetric fixture) was merged. This PR now carries only the reporting and interpretation changes on top of it.

  • Preserve the corrected risk denominators: compare (a/(a+c)) with (b/(b+d)). The fixture recovers exposed and unexposed risks of 0.10 and 0.05, adjusted RR 2.000 and RD 0.050; OR stays 2.111.
  • Use one direction comparison and one message for the table and narrative. The fixture's observed RR 1.638 is closer to 1 than the adjusted RR 2.000; the old note said the opposite. Compare ratios on the log scale, differences on the original scale, distinguish ties and reversals, and describe estimates under assumptions rather than asserting a known true effect.
  • Report missing bias percentage at the adjusted null instead of dividing by zero. Add a result caveat for RR/RD with outcome-sampled data, a notice when the main corrected cells are floored, and an explicit common-rate range-grid notice in differential mode.

Before production

The model, floor, continuity correction and bootstrap are unchanged. Sensitivity and specificity are held fixed in the bootstrap; the intervals do not propagate uncertainty in those rates. The range grid is not a differential sensitivity analysis. Separately consider rejecting multilevel/invalid level selections, and deciding whether to withhold infeasible corrections instead of flooring them. Do not read an OR as an RR.

Validation

Independent arithmetic and static source review. Added regression cases for the asymmetric fixture (including OR), attenuation, exaggeration, equality, reversal and undefined bias percentage at the null. After the rebase, tests/testthat/test-misclassificationbias.R passes locally: 12 tests, 26 assertions, 0 failures. It was run by sourcing the analysis files, not through an installed package. It has not been checked in the jamovi app. Red Ubuntu checks before the mltools Remotes/Imports fix reaches master are a dependency-resolution failure, not test results.

@sbalci
sbalci force-pushed the fix/misclassificationbias-reporting branch from 5d49b6f to acbf07b Compare November 28, 2026 10:28
@sbalci
sbalci marked this pull request as ready for review November 28, 2026 10:29
@sbalci
sbalci merged commit a865cac into master Nov 28, 2026
0 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant