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

Reconsider deprecation of global priors for categorical/mulinomial? #1420

Closed
bwiernik opened this issue Oct 24, 2022 · 4 comments
Closed

Reconsider deprecation of global priors for categorical/mulinomial? #1420

bwiernik opened this issue Oct 24, 2022 · 4 comments

Comments

@bwiernik
Copy link

I frequently fit categorical/multinomial families with 5 to 7 categories. This becomes inconvenient when I want to put priors on things like random intercepts. For most model families, I can do something like:

prior(normal(0, .1), class = "sd")

and it will be able to apply to all of the "sd" parameters, but with these families, I need to specify for each response category, even though I want to apply the same prior to each category.

prior(normal(0, .1), class = "sd", dpar = "catA") +
      prior(normal(0, .1), class = "sd", dpar = "catB") +
      prior(normal(0, .1), class = "sd", dpar = "catC") +
      prior(normal(0, .1), class = "sd", dpar = "catD") +
      prior(normal(0, .1), class = "sd", dpar = "catE")

It seems like this requirement was a recent change in how these families work, but it makes them very difficult to use. Is there any possibility that global parameters for these families might be re-enabled?

@paul-buerkner
Copy link
Owner

Yes, I understand that this is inconvenient. Does your issue relate only to the sd class or also to other classes? In the latter case, to which other classes?

@bwiernik
Copy link
Author

I've personally only run into this with "sd" class recently, but I can imagine wanting to do the same with "b" class -- eg, if I want to put a light regularizing prior for predictor X for each outcome option.

@mguzmann
Copy link

Just my perspective, but I run into this all the time with different kinds of predictors.

@paul-buerkner paul-buerkner added this to the 2.18.0++ milestone Oct 25, 2022
@paul-buerkner paul-buerkner modified the milestones: 2.18.0++, 2.19.0++ Mar 13, 2023
@paul-buerkner
Copy link
Owner

paul-buerkner commented May 16, 2023

I have reconsidered allowing the discussed prior specification options and even tried to implement them. However, the amount of special case coding and resulting maintence issues would not be justified by the advantages of the feature at this point. I may revisit such ideas at a later point when I have a good idea how to make it compatible with brms prior specification framework in a more natural and less awkward manner.

That said, prior specification in brms is vectorized nowadays, so you can do things like:

set_prior("normal(0, 2)", dpar = c("muX", "muY", "muZ"))

This should simplify the discussed case considerably.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants