Skip to content

feat: Add Kahouadji method for binomial confidence intervals.#177

Open
carljpearson wants to merge 1 commit into
AndriSignorell:masterfrom
carljpearson:feature/kahouadji-binomci
Open

feat: Add Kahouadji method for binomial confidence intervals.#177
carljpearson wants to merge 1 commit into
AndriSignorell:masterfrom
carljpearson:feature/kahouadji-binomci

Conversation

@carljpearson
Copy link
Copy Markdown

I added a new method for BinomCI based on current best practices, implementing the "adjusted Wilson of type ϵ" confidence interval (essentially expanding on Agresti-Coull's addition of pseudo-observations for confidence levels outside of 95%). We briefly discussed this here some time ago.
Here is a brief summary of the changes I have successfully integrated:

  1. BinomCI.R Updated:
  • Added "kahouadji" to the method choices lists and argument logic.
  • Added the internal .binomci.kahouadji generator method logic. This includes the experimentally verified pseudo-observation (epsilon) mappings for 90% (ϵ=3), 95% (ϵ=4), and 99% (ϵ=6) confidence intervals.
  • Implemented a fallback logic for unoptimized limits (using the rounded squared critical z-value) that triggers a helpful warning.
  1. BinomCI.Rd Documentation Updated:
  • Reflected "kahouadji" argument possibilities.
  • Included methodological explanations.
  • Inserted the reference to Kahouadji (2025).
  1. Functionality Verified:
  • I wrote an explicit test for the generated .binomci.kahouadji method and confirmed it accurately outputs p_tilde, respects the confidence interval levels correctly, and triggers the helpful warning log for unoptimized limits safely.

If it looks okay to you, I'd like to be listed with my name (Carl J. Pearson) and email (carl.j.pearson@gmail.com) in the package documentation. Please let me know if I need to make any edits. Thanks!

@carljpearson
Copy link
Copy Markdown
Author

@AndriSignorell Hi! Does this look like a useful and appropriate addition to the package? Please let me know!

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