Fix unconditional exact proportion intervals for tied tables - #1541
Arthur031221 wants to merge 2 commits into
Conversation
Apply the tolerance proposed in issue 1539 and cover its example in both group orders and tail directions. Co-authored-by: Wojtek <11532997+wwojciech@users.noreply.github.com> Signed-off-by: Arthur031221 <levi74108520963@gmail.com>
|
Hi @Arthur031221 ! Thank you for preparing the PR for this. I think it would be better not to hard-code this tolerance, but instead pass it as an additional argument to Then: include_table <- if (tail == "upper") {
t_values >= (t0 - tol)
} else {
t_values <= (t0 + tol)
}@danielinteractive - FYI. Please also have a look and let me know if this approach is okay, or if there is a better way of handling this that I may not be aware of. Thanks! |
|
I tested your |
wwojciech
left a comment
There was a problem hiding this comment.
Introduce new tol argument for the respective functions.
Co-authored-by: Wojtek <11532997+wwojciech@users.noreply.github.com> Signed-off-by: Arthur031221 <levi74108520963@gmail.com>
|
Added |
|
I found a fix which does not need a tolerance at all. Preparing a separate PR for that now. |
Ooo, that is amazing, I am very curios about it :) |
|
Hi @Arthur031221 , I noticed that @danielinteractive opened a separate PR to address this issue - #1542 |
|
Agreed, let's continue in #1542. I'll close this PR. Thanks! |
|
Why do I have the feeling that this was kind of a "robot" generated PR?... 😄 |
I had a similar feeling, although I wasn’t sure about it. It would be quite disappointing if that were actually the case. @shajoezhu - could you please shed some light on what’s happening here? I’d be genuinely disappointed if this was indeed generated by a bot. I’ve spent quite a bit of time and effort reviewing and discussing this, and I’d hate to find out that I was essentially talking to a bot rather than a person. |
Fixes #1539
Users of
prop_diff_uncond_exact()could get confidence intervals that were too narrow because floating point rounding excluded mathematically tied tables from the tails. Add a1e-9tolerance to include those ties.Builds on @wwojciech's patch and regression table.
Added tests for the reported table and tail membership.
Rscript -e 'testthat::test_local(filter = "prop_diff")'passes.Co-authored-by: Wojtek 11532997+wwojciech@users.noreply.github.com