[R] Include Random Effects in Poisson Regressing (Nested Data)

el_alisio malnamalja at gmx.de
Sat Mar 29 19:52:46 CET 2014


Hi,

one way to include a random effect would be:

require("lme4")
mymodel <- lmer(counts ~ Season + Rainfall + (1 | Year), family =
quasipoisson,  data = mydata) 

Nevertheless, there are other ways to include a random effect using R. 

In any case, you need to provide justification why you are using a
quasipoisson method as this is just a quick-and-dirty solution for
overdispersion. Furthermore, there have been already various discussions on
random effects and poisson models. Please have a look at them before posting
a comment. Additionally, there are some excellent books on mixed-effects
models with R (e.g., Zuur et al., 2009).

Cheers, 

Jannes



--
View this message in context: http://r.789695.n4.nabble.com/Include-Random-Effects-in-Poisson-Regressing-Nested-Data-tp4687737p4687819.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list