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

add zero-inflated Poisson/negative binomial distributions #104

Open
pkoaz opened this issue Nov 8, 2022 · 1 comment
Open

add zero-inflated Poisson/negative binomial distributions #104

pkoaz opened this issue Nov 8, 2022 · 1 comment

Comments

@pkoaz
Copy link

pkoaz commented Nov 8, 2022

I'm interested in using zero-inflated distributions for count data. These are available in brms. I'd be happy to contribute code but I could use some pointers to get started.

@beckyfisher
Copy link
Collaborator

Hi Peter, yes zero-inflated models could certainly be useful in some cases. At this stage we don;t have time to implement them, but would be happy to review a PR if you are up to coding it up yourself. Otherwise, if you share an example fitted outside bayesnec using just brms, that would help move things forward when we get a chance to look at it.

In the meantime, you could build the non-linear formula with our package and then run the thing with brms, ie:
fit <- bnec(fvfm ~ crf(log(concentration), model = "nec4param"), data = data)
nl_f <- fit$fit$formula
test <- brms::brm(nl_f, data = data, family = ..., prior = ...)
You would need to construct your own priors but you could also use the priors from the fit as a starting point for that (see our priors vignette, https://open-aims.github.io/bayesnec/articles/example3.html).

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

No branches or pull requests

2 participants