Closed zbinney closed 5 years ago
Welcome to Bayesian statistics! :-)
In general, I prefer brms related questions being asked on https://discourse.mc-stan.org (with the Interfaces - brms tag) rather than on github as they have much better visibility on discourse. Github issues are reserved for feature requests and bug reports. Thus, would you mind reposting your questions on discourse?
You bet. Thanks for the clarification. I was agonizing over the best place to put this. Heading over there now!
Hi,
First of all, thanks for a great package. I'm pretty new to Bayesian stuff and this is my first time ever posting a question on Github, so I apologize in advance if the answer is obvious or I do anything dumb.
I'm trying to get comfortable with zero-inflated Poisson models in brms, and I'm working through the example in Statistical_rethinking_recoded. What's confusing me is why the following two models aren't yielding exactly the same results:
`prob_drink <- 0.2 # 20% of days drinking -> 0 manuscripts rate_work <- 1 # average 1 manuscript per day (lambda)
b11.4a <- brm(data = d, family = zero_inflated_poisson, Y ~ 1, prior = c(prior(normal(0, 10), class = Intercept), prior(beta(2, 2), class = zi)), # the brms default is beta(1, 1) cores = 4, seed = 11, inits = "random")
b11.4_b <- brm(data = d, family = zero_inflated_poisson(link_zi = "identity"), bf(Y ~ 1, zi ~ 1), prior = c(prior(normal(0, 10), class = Intercept), prior(beta(2, 2), class = Intercept, dpar = zi)), # the brms default is beta(1, 1) iter = 2000, warmup = 1000, chains = 4, cores = 4, seed = 11)`
The results are effectively the same (within simulation error), but the n_eff is different. I compared the stan code produced by both these models and do see some differences, but I'm not skilled enough to know exactly what I'm looking at.
Regardless of why they're different, would model b11.4_b be a good basis for future zero-inflated Poisson models?
Thank you!
I'm on Windows 10, brms v. 2.9.0