You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When calculating odds ratios, certain edge cases (e.g., no events in one group) can result in infinite or zero values. The current custom code does not produce meaningful confidence interval bounds (or_ci_lower, or_ci_upper) in such scenarios. We should rely on a standard, well-tested statistical function to compute odds ratios and their confidence intervals.
Rationale:
Using a robust statistical library or a well-established function will handle edge cases correctly and produce valid confidence intervals, even in extreme situations. This improves the reliability and interpretability of the results.
Proposed Changes:
Replace the custom odds ratio and CI computation code with a standard function from a reputable Python library (e.g., statsmodels).
Ensure that edge cases (inf, 0) produce sensible or bounded confidence intervals (e.g., using standard approximations or fallback values).
Add tests with scenarios that previously resulted in inf or 0 to ensure correct output.
The text was updated successfully, but these errors were encountered:
When calculating odds ratios, certain edge cases (e.g., no events in one group) can result in infinite or zero values. The current custom code does not produce meaningful confidence interval bounds (
or_ci_lower
,or_ci_upper
) in such scenarios. We should rely on a standard, well-tested statistical function to compute odds ratios and their confidence intervals.Rationale:
Using a robust statistical library or a well-established function will handle edge cases correctly and produce valid confidence intervals, even in extreme situations. This improves the reliability and interpretability of the results.
Proposed Changes:
statsmodels
).inf
or0
to ensure correct output.The text was updated successfully, but these errors were encountered: