Skip to content

Remove all remnants of default 89% CI#756

Open
mattansb wants to merge 9 commits intomainfrom
final-fix-to-default-95
Open

Remove all remnants of default 89% CI#756
mattansb wants to merge 9 commits intomainfrom
final-fix-to-default-95

Conversation

@mattansb
Copy link
Copy Markdown
Member

Closes #753

@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request standardizes the default credible interval to 95% across the bayestestR package. The changes ensure that all relevant functions, documentation, and examples consistently use 95% as the primary credible interval, thereby enhancing the package's usability and adherence to widely accepted statistical conventions. This update simplifies user experience by removing the previous 89% default and providing clearer guidance on CI interpretation.

Highlights

  • Default Credible Interval Update: The default credible interval (CI) used throughout the package has been updated from 89% to 95% to align with common statistical practices and improve consistency.
  • Documentation and Examples Alignment: Extensive updates were made across R files, man pages, and vignettes to reflect the new 95% default CI in function descriptions, examples, and detailed explanations of Bayesian concepts like HDI and ROPE.
  • Code Readability Improvements: Many function signatures were reformatted to enhance code readability and maintainability, particularly in ci, equivalence_test, hdi, mediation, and rope functions.
  • Clarification of CI Properties: Detailed explanations regarding the stability and advantages of 89% vs. 95% CIs were updated, emphasizing the importance of checking Effective Sample Size (ESS) and Monte Carlo Standard Error (MCSE) for interval precision.
Changelog
  • R/ci.R
    • Updated example usage of ci() to include 0.95 CI.
    • Reformatted function arguments for better readability.
  • R/equivalence_test.R
    • Updated documentation to refer to 95% HDI instead of 89% HDI.
    • Reformatted function arguments for better readability.
  • R/hdi.R
    • Updated documentation to refer to 95% CI as default.
    • Revised detailed explanation of 89% vs 95% intervals to emphasize checking ESS/MCSE.
    • Reformatted function arguments for better readability.
  • R/mediation.R
    • Updated documentation to specify 95% credible intervals as default.
    • Reformatted function arguments and alert messages for clarity.
  • R/rope.R
    • Updated function title and documentation to refer to 95% HDI as default.
    • Reformatted function arguments and alert messages for clarity.
  • README.Rmd
    • Updated examples for hdi() and eti() to remove explicit ci = 0.89.
    • Updated ROPE description to mention 95% HDI as default.
  • man/bci.Rd
    • Updated documentation to reflect 95% CI as default.
    • Revised details on 89% vs 95% intervals.
  • man/ci.Rd
    • Updated example usage of ci() to include 0.95 CI.
  • man/distribution.Rd
    • Updated parameter descriptions for n and mu.
  • man/equivalence_test.Rd
    • Updated documentation to refer to 95% HDI instead of 89% HDI.
  • man/eti.Rd
    • Updated documentation to reflect 95% CI as default.
    • Revised details on 89% vs 95% intervals.
  • man/hdi.Rd
    • Updated documentation to reflect 95% CI as default.
    • Revised details on 89% vs 95% intervals.
  • man/mediation.Rd
    • Updated documentation to specify 95% credible intervals as default.
  • man/rope.Rd
    • Updated function title and documentation to refer to 95% HDI as default.
  • man/sexit.Rd
    • Updated documentation to reflect 95% CI as default.
  • man/spi.Rd
    • Updated documentation to reflect 95% CI as default.
  • vignettes/bayestestR.Rmd
    • Updated vignette metadata and text to refer to 95% Credible Interval.
  • vignettes/credible_interval.Rmd
    • Updated vignette metadata, R code formatting, and text to reflect the new default CI and clarify details on 89% vs 95% intervals.
  • vignettes/example2.Rmd
    • Updated vignette metadata, R code formatting, and text to reflect 95% CI in examples and descriptions.
  • vignettes/mediation.Rmd
    • Updated vignette text to specify 95% credible intervals as default.
  • vignettes/region_of_practical_equivalence.Rmd
    • Updated vignette metadata and removed text discussing 89% HDI as a better choice.
Activity
  • The pull request addresses and closes issue Default CI for ROPE in vignette #753, indicating resolution of a specific task or bug.
  • The author, mattansb, implemented comprehensive changes across multiple R source files and documentation, suggesting a thorough review and update process.
  • Numerous function signatures were reformatted for improved code consistency and readability, making future maintenance easier.
  • Alert messages within the code were also adjusted for better user communication.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the package documentation (vignettes, README, and Rd/roxygen docs) to remove outdated references to a default 89% interval—especially around ROPE—and align narrative examples with the current 95% default.

Changes:

  • Updated vignettes/README/Rd docs to remove “default 89% CI/HDI” language and reference 95% where appropriate.
  • Refined explanatory text around CI stability/ESS/MCSE in CI/HDI/ETI documentation.
  • Reformatted several R functions (rope/ci/equivalence_test/mediation/hdi) for readability without intended behavioral changes.

Reviewed changes

Copilot reviewed 21 out of 21 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
vignettes/region_of_practical_equivalence.Rmd Removes vignette text claiming default 89% HDI for ROPE.
vignettes/mediation.Rmd Updates vignette text to 95% default credible intervals for mediation.
vignettes/example2.Rmd Updates CI text to 95% and reformats chunks/markdown (currently has broken fences).
vignettes/credible_interval.Rmd Expands discussion of 89% vs 95% and adds MCSE/ESS guidance (currently has duplication).
vignettes/bayestestR.Rmd Updates getting-started vignette to reference 95% credible intervals.
man/spi.Rd Minor Rd wording/formatting updates for CI default text.
man/sexit.Rd Minor Rd wording/formatting updates for CI default text.
man/rope.Rd Updates ROPE title/description and default interval wording (needs alignment with implementation).
man/mediation.Rd Updates mediation docs to state 95% default credible intervals.
man/hdi.Rd Updates HDI details text (MCSE/ESS guidance and formatting).
man/eti.Rd Updates ETI details text (MCSE/ESS guidance and formatting).
man/equivalence_test.Rd Updates equivalence test docs to reference 95% interval wording and formatting.
man/distribution.Rd Improves argument descriptions for distribution helpers.
man/ci.Rd Updates examples to include 0.95 in CI vectors.
man/bci.Rd Updates BCa interval docs text (MCSE/ESS guidance and formatting).
README.Rmd Updates README examples and ROPE default interval wording (needs alignment with implementation).
R/rope.R Updates ROPE roxygen text/title and reformats methods (docs currently conflict with default ci_method).
R/mediation.R Updates roxygen wording (89% -> 95%) and reformats functions for readability.
R/hdi.R Updates roxygen text (MCSE/ESS guidance) and reformats several functions.
R/equivalence_test.R Updates roxygen wording (89% -> 95%) and reformats methods for readability.
R/ci.R Updates roxygen examples and reformats several functions for readability.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request aims to remove the default 89% CI and standardize on 95%. The changes primarily involve updating documentation and examples to reflect this, along with some code reformatting for style consistency. The changes are generally good and align with the PR's goal. I've identified a few minor issues: two function definitions that are now inconsistent with the project's style guide, and a couple of broken code blocks in a vignette file that will likely prevent it from rendering correctly. Applying the suggested fixes will improve code consistency and resolve the vignette rendering issues.

strengejacke and others added 3 commits March 11, 2026 12:07
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@mattansb
Copy link
Copy Markdown
Member Author

These snapshottssssssss.....

@DominiqueMakowski wdyt?

@strengejacke
Copy link
Copy Markdown
Member

These snapshottssssssss.....

@etiennebacher is investigating possible related issues here:
easystats/modelbased#602

Not sure what's wrong with snapshot testing

@etiennebacher

This comment has been minimized.

@etiennebacher etiennebacher force-pushed the final-fix-to-default-95 branch from 58747f1 to cdaf277 Compare March 11, 2026 14:47
samples is sufficient to estimate the interval at the desired probability
level with good precision.
**people started using 95\%**, the arbitrary convention used in the **frequentist** world.
However, some authors suggested that 95\% might not be the most appropriate for Bayesian posterior distributions [@kruschke2014doing].
Copy link
Copy Markdown
Contributor

@bwiernik bwiernik Mar 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where in the book does Kruschke actually suggest this though? I've searched for all of the cases of 95% and 90% in the 2014/2015 edition and as far as I can find, he doesn't actually suggest using a width other than 95% anywhere. He discusses the stability of the tails in the section on ESS/MSCE (p 184 – 186), but even there he doesn't suggest using a narrower interval at all.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DominiqueMakowski do you know? I think you originally wrote that section.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pinging...

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.

Default CI for ROPE in vignette

6 participants