If I had a
glm using on count data I may do the following:
glm(response ~ exp1 * exp2, family = poisson, data =data)
The first thing I would do here is check for overdispersion with the
residual deviance/df. If there was overdispersion I may choose to use
family = quasipossion
glm(response ~ exp1 * exp2, family = quaispoisson, data =data)
I would then simplify my model to find the optimal model using analysis of deviance based on log likelihoods (likelihood ratio tests)e.g.
m1 <- glm(response ~ exp1 * exp2, family = quaipoissn, data =data) m2 <- glm(response ~ exp1 + exp2, family = quaipoissn, data =data) #remove interaction anova(m1, m2, test = "chi") #if it was still poisson # or anova(m1, m2, test = "F") #for quasipoisson # using p-values to assess the significance of the removed interaction
Finally then I would then validate my model by plotting deviance residuals against fitted values, explanatory values e.g.
plot(m2). If all is ok, there is independence and no patterns, I don't have to add in extra explanatory variables etc.
My question is, what are the key differences to this process using
glmer(response ~ exp1 * exp2 + (1|random1/random2), family = poisson, data =data)
glmyou do not. Is it the equivalent form of the standard LMEM $y|\gamma \sim N(X\beta + Z\gamma,\sigma^2 I)$ you are looking for but for a Poisson model now? $\endgroup$
glmerare the same. Best. $\endgroup$