Handle brms 0 + Intercept formulas in get_modelmatrix()#1199
Merged
Conversation
Agent-Logs-Url: https://github.com/easystats/insight/sessions/599f4836-a7a8-431d-9330-d2405f4aff38 Co-authored-by: DominiqueMakowski <8875533+DominiqueMakowski@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix report() failure on brms with
Handle May 25, 2026
0 + Intercept formulabrms 0 + Intercept formulas in get_modelmatrix()
DominiqueMakowski
approved these changes
May 25, 2026
strengejacke
approved these changes
May 25, 2026
strengejacke
approved these changes
May 25, 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.
report()could fail onbrmsmodels fitted with formulas like0 + Intercept + wtbecauseinsight::get_modelmatrix()reconstructed the RHS from variable names and treatedInterceptas if it were a data column. This updates thebrmspath to preserve the intercept correctly when rebuilding the model matrix.Model-matrix reconstruction
get_modelmatrix.brmsfit()to:Interceptfrom predictor extractioninterceptsettingInterceptcolumn in the dataRegression coverage
brmstest for formulas of the form0 + Intercept + wt"(Intercept)""wt"Package metadata
Example of the affected case: