1
$\begingroup$

I am trying to understand the zero-inflated poisson (ZIP) model used in Bayesian regression modelling. I came across code here for the ZIP model. My question is related to the 3rd line of code within the for loop, that is:

phi[i]<- -LL[i]+10000

I am not sure why the 10,000 is used here. For instance, when you look at appendix A for the ZIP regression Winbugs code in a paper found here, there is no use of this 10,000. Any clarification would be appreciated

$\endgroup$

1 Answer 1

2
$\begingroup$

This is the zero’s trick used to define a new sampling distributions in WinBUGS. Check the manual about defining new sampling distributions or see here.

$\endgroup$
2
  • $\begingroup$ one more question.......as shown by the paper which does not use the '10,000', does it mean the zero trick is not always needed? $\endgroup$
    – user121
    Commented Sep 14, 2018 at 4:57
  • 1
    $\begingroup$ In the mathematical definition of the model you don’t need it. It’s just a trick used in WinBUGS. $\endgroup$ Commented Sep 14, 2018 at 5:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.