I have currently fitted a negative binomial model in rstanarm, but i would like to fit the same data using poisson-lognormal model. Is there a way I can achieve that in rstanarm?
y_(i,t) ~ Poisson(ε_i λ_(i,t))
Where:
y_(i,t) = Observed number of crashes at site i in year t
λ_(i,t) = Expected number of crashes at intersection I in year t
ε_i = Multiplicative random effect at site i
The main difference between the Poisson-Lognormal and Poisson-Gamma model in estimating the expected crashes is on estimating the multiplicative random effect for site i. the following equations describe the estimation of ε_i for the two models.
For the Poisson-Lognormal model, ε_i ~ LogN(0,σ^2)
For the Poisson-Gamma model, ε_i ~ Gamma(φ,(1/φ)
Thank you for the response. I followed the option you proposed and its working fine. I am just wondering what is the site variable?