Poisson Lognormal
2010/3/26 Charles C. Berry <cberry at tajo.ucsd.edu>:
On Fri, 26 Mar 2010, Robert Ruser wrote: So this is the generalized linear model with a poisson family, log link, and a Gaussian random effect in the linear predictor. Take a look at lme4, MASS (glmmPQL), and try searching CRAN packages for 'glm' and 'GLM' (there are a bunch and several promise to handle random effects, but YMMV).
Thank you. But I'm wondering how to set random effect? I have the data 'my.data': #n number count 1 0 252 2 1 163 3 2 120 4 3 95 ............................ number | exp(lambda) ~poisson(exp(lambda)) exp(lambda) ~ normal(a,b) probably I should use a formula: model.est <- glmer(number ~ 1, family = poisson(link="log"), data = my.data) but how to set random effect? I do not have predictors. Second I need to remember that for example 0 occurred 252 times. How to do it - I can do it using number = seq(number,times=count), but calculation will last longer. I would appreciate any help. Robert