I am referencing a follow-up idea from something I posted earlier (Zero-inflated Poisson and Gibbs sampling, proofs and sampling). I want to implement the Gibbs sampler, by generating a large (dependent) sample from the posterior distribution and use that to construct 95% Bayesian confidence intervals for $p$ and $\lambda$ using the data I generated in the first question on this page (Zero-inflated Poisson and Gibbs sampling, proofs and sampling). Basically, I want to know how to do this in R, so that I can play around with different values of $a$ and $b$.
asked Mar 26, 2015 at 5:12 Green Stone Green Stone 165 1 1 gold badge 3 3 silver badges 11 11 bronze badges$\begingroup$ You have the three full conditionals, where is the difficulty for you? (Please add self-study as a tag.) $\endgroup$
Commented Mar 26, 2015 at 6:30$\begingroup$ I guess the difficulty for me is knowing how to generate this in R. I am new to programming in R. I wanted to work on learning R and simulating this data to better understand it at the same time. Yes, I hope to supplement this all with self-study, but learning a new programming language (at least for me) is a slow process and that isn't always linear (I use multiple sources, including reading code written by others, and then dissecting that code to learn what functions they used etc.) $\endgroup$
Commented Mar 26, 2015 at 9:36$\begingroup$ You should first learn R then, since this question has to do with R and not with Gibbs sampling. $\endgroup$