Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bayesian_as_frequentist() fails for brms 0 + Intercept formula #646

Open
DominiqueMakowski opened this issue Mar 29, 2024 · 3 comments
Open
Labels
bug 🐛 Something isn't working

Comments

@DominiqueMakowski
Copy link
Member

The 0 + Intercept syntax in brms is useful to facilitate prior specification for the intercept, but it leads to issues in check_model whereby it wrongly believes that Intercept is a variable and not a special term.

model <- brms::brm(qsec ~ mpg, data=mtcars, refresh=0)
#> Compiling Stan program...
#> Start sampling
performance::check_model(model)
#> Not enough model terms in the conditional part of the model to check for
#>   multicollinearity.

model <- brms::brm(qsec ~ 0 + Intercept + mpg, data=mtcars, refresh=0)
#> Compiling Stan program...
#> Start sampling
performance::check_model(model)
#> Error in eval(predvars, data, env): object 'Intercept' not found

Created on 2024-03-29 with reprex v2.0.2

@strengejacke
Copy link
Member

Error comes from bayestestR::bayesian_as_frequentist(model).

@strengejacke strengejacke transferred this issue from easystats/performance Mar 29, 2024
@strengejacke strengejacke added the bug 🐛 Something isn't working label Mar 29, 2024
@strengejacke strengejacke changed the title check_model fails for brms' 0 + Intercept formula bayesian_as_frequentist() fails for brms 0 + Intercept formula Mar 29, 2024
@DominiqueMakowski
Copy link
Member Author

Should be fixed by making our own plot (see easystats/performance#477)

@strengejacke
Copy link
Member

Not sure. Most of current checks don't work for Bayesian models, that's why we convert to frequentist

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants