bambinos / bambi

BAyesian Model-Building Interface (Bambi) in Python.
https://bambinos.github.io/bambi/
MIT License
1.08k stars 124 forks source link

I cannot set priors on auxillary parameters in distributional regressions #854

Open zwelitunyiswa opened 2 days ago

zwelitunyiswa commented 2 days ago

Thanks for the ongoing work on this great package. My issue is that I cannot set priors on auxillary parameters in distributional regressions.

For example, I am using a beta_binomial likelihood, and my prior for mu is recognized, by my priors for kappa are ignored:

Screenshot 2024-11-06 at 6 00 36 AM

Same thing when I change the formula for kappa:

Screenshot 2024-11-06 at 6 03 24 AM

I have had issues when I have tried other distributions as well.

tomicapretto commented 2 days ago

I think you need a nested dictionary, like

priors = {
    "mu": {"1|snf_id": bmb.Prior(...)},
    "kappa":  {"Intercept": bmb.Prior(...), "snf_id": bmb.Prior(...)}.
}

Let me know if that doesnt work and I can double check