Repository navigation
Fix zero-inflation parameters in bootstrapped glmmTMB output - #1287
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Copilot review overview
2 open issues
1 file not reviewed
man/model_parameters.glmmTMB.Rd: Generated file
What changed in this PR
Fixes bootstrap output for glmmTMB models so zero-inflation (ZI) parameters are correctly named and surfaced as a distinct component, aligning bootstrap behavior with non-bootstrap output.
Changes:
- Name ZI bootstrap draw columns as
<name>_ziinbootstrap_model()and map them back to standard parameter names +Componentin bootstrap summaries. - Update
model_parameters.glmmTMB()bootstrap path to filter bycomponent, drop dispersion rows for bootstrap, and adjust footer/attributes for bootstrap intervals. - Add tests covering column naming, component handling, printing, and matching of draws to the correct parameters.
| File | Description |
|---|---|
| tests/testthat/test-bootstrap_parameters.R | Adds regression tests for ZI naming/component behavior and bootstrap printing/footer expectations. |
| R/methods_glmmTMB.R | Adjusts bootstrap handling for component, removes dispersion row for bootstrap, and sets bootstrap CI metadata. |
| R/bootstrap_parameters.R | Adds helper to restore ZI parameter names and attach Component for bootstrapped glmmTMB parameters. |
| R/bootstrap_model.R | Names ZI draw columns with _zi suffix to avoid NA column names and missing estimates. |
| NEWS.md | Documents the fix and behavior changes for bootstrap + components/dispersion/footer. |
| DESCRIPTION | Bumps package version. |
Review effort: Lite
Contributor
Author
|
Copilot stopped reviewing on behalf of
jmgirard due to an error
October 19, 2026 17:24
mattansb
reviewed
Oct 20, 2026
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.


Fixes #1284
The example from the issue now gives:
bootstrap_model()now names the zero-inflation columns<name>_zi, assimulate_model()does. Withbootstrap = TRUE,model_parameters()now respectscomponent, no longer adds the dispersion row with Wald intervals (component = "dispersion"gives an error), and the footer says the intervals are bootstrapped.Still open:
ci()andp_value()withmethod = "boot"return Wald values for glmmTMB, and the bootstrap path ignoresp_adjustandci_method, as before.