julien martin <julemartin0320 <at> gmail.com> writes:

> (2) The second part of the script calls WinBUGS and run the binomial
> mixture models on the count data. In this case the count matrix y was
> converted to a vector C1 before being passed over to BUGS
> Any idea how to create a zero truncated Poisson for parameter lam1
> (i.e., parameter lambda of the Poisson distribution)
> 
> Thank you for your help.
> 
> lam1~dgamma(.01,.01)
> # Likelihood
> # Biological model for true abundance
>  for (i in 1:R) {                     # Loops over R sites
>    N1[i] ~ dpois(lambda1[i])
>    lambda1[i] <- lam1
>   }

  Do you mean that N1[i] should be drawn from a zero-truncated
Poisson rather than a Poisson distribution in the snippet above?
If so, I think you want to search for the "ones trick" or the 
"zeros trick" in WinBUGS documentation, e.g.
http://mathstat.helsinki.fi/openbugs/data/Docu/Tricks.html

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to