WebBUGS >> Main page Recent changes | Show source History | |
Built-in models:Poisson regression | ||
---|---|---|
ModelThe Poisson regression can be written as \[y_{i} \sim Poisson(\lambda_{i})\] \[\log\lambda_{i} = \beta_{0}+\beta_{1}x_{1i}+\ldots+\beta_{q}x_{qi}\] Codemodel{ for (i in 1:N){ log(lambda[i])<-beta0+beta1*(x1[i]-mean(x1[]))+beta2*(x2[i]-mean(x2[])) y[i]~dpois(lambda[i]) } beta0~dnorm(0,1.0E-6) beta1~dnorm(0,1.0E-6) beta2~dnorm(0,1.0E-6) }
|
||
Powered by LionWiki. Last changed: 2014/11/11 21:45 Erase cookies | Show source History |