[FEATURE] Add functions for Simulation-Based Calibration (SBC) analysis#36
Merged
Conversation
Feature: Add functions for Simulation-Based Calibration (SBC) analysis
Added an example of using SBC for model validation
cmt2
approved these changes
Oct 3, 2025
cmt2
left a comment
Collaborator
There was a problem hiding this comment.
Thanks Basanta, looks great!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi,
This PR introduces a new workflow for processign and visualizing Simulation-Based Calibration results for validating models implemented in RevBayes.
This new functionality is encapsulated in two new exported functions: processSBC() and plotSBC().
Summary of changes:
processSBC(): A new function that reads the output directory of RevBayes validation analysis.plotSBC(): A new plotting function that createsggplotobjects that compare the observed coverage probability to the expected probability.codapackage has been added to theDESCRIPTIONfile.This addition provides the model validation procedure directly within the
RevGadgetsecosystem.Additionally, I realized that the unit tests via GitHub Actions were failing during the installation of the
ggtreepackage due to a version conflict withggplot2.A globally set
R_BIOC_VERSION: 3.19was forcing the jobs running to fetch incompatible packages from Bioconductor.To resolve this and hopefully improve future stability, this PR:
R_BIOC_VERSIONoverride from the workflow file.pkg.lockfile to prevent this kind of 'dependency drift' from causing issues in the future.I plan to write a detailed guide on troubleshooting these type of issues to the Developer Guide in a separate, follow-up PR.
EDIT: I managed to put it in the latest commit in this PR.
I hope this will be a useful contribution to the package.