Missing priors for `family='negativebinomial'`?
See original GitHub issueHi, I’m attempting to fit with the negativebinomial family and running into an error, despite it being listed as a valid family in the docs. I browsed around the codebase and looks like this config file might be lacking prior specs for negative binomial?
https://github.com/bambinos/bambi/blob/master/bambi/config/priors.json
283 if self._design.response is not None:
284 _family = family.name if isinstance(family, Family) else family
--> 285 self._add_response(self._design.response, family=_family, link=link)
286
287 if self._design.common:
/opt/anaconda3/envs/jan/lib/python3.7/site-packages/bambi/models.py in _add_response(self, response, prior, family, link)
329 """
330 if isinstance(family, str):
--> 331 family = self.default_priors.get(family=family)
332 self.family = family
333
/opt/anaconda3/envs/jan/lib/python3.7/site-packages/bambi/priors.py in get(self, dist, term, family)
189 elif family is not None:
190 if family not in self.families:
--> 191 raise ValueError(f"{family} is not a valid family name.")
192 _f = self.families[family]
193 prior = self._get_prior(_f["dist"])
ValueError: negativebinomial is not a valid family name.
Issue Analytics
- State:
- Created 2 years ago
- Comments:7
Top Results From Across the Web
Priors in Negative Binomial Multilevel with random intercept
Hi all! I'm new to the forum and new to rstanarm and need some help. I have searched the web and forum, but...
Read more >Chapter 12 Poisson & Negative Binomial Regression
Chapter 12 Poisson & Negative Binomial Regression ... wish to simulate the prior, and family = poisson indicates that we're using a Poisson...
Read more >20 Negative Binomial: Estimating Homicides in Census Tracks
Simon Jackman's Bayesian Model Examples in Stan.
Read more >Negative binomial not capturing overdispersion in glm model
I got the model to work with the following two steps: Most observations in the long tail was associated with one of the...
Read more >11 Monsters and Mixtures | Statistical Rethinking with brms ...
McElreath didn't give an example of negative-binomial regression in the text. Here's one with the UCBadmit data. brm(data = d, family = negbinomial,...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@No-Stream, @tomicapretto was kind enough to fix this in the PR above. Hopefully things work now if you install from master. I’ll follow up with a test and if you’re able to confirm its working for you I’ll close this.
Also, I forgot my manners earlier. Thank you for opening this issue and making it so detailed!
Happy to re-open this issue if you still encounter problems with negative binomial family. Again, thanks for reporting the problem 😃