2
$\begingroup$

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 e.g.

glmer(response ~ exp1 * exp2 + (1|random1/random2), family = poisson, data =data)
$\endgroup$
  • $\begingroup$ Out of morbid curiosity what does the AIC tells you about your models? Also how "big" is your data? $\endgroup$ – usεr11852 Dec 1 '13 at 16:32
  • $\begingroup$ Hey @user11852 , why is the curiosity morbid :) ? The structure of my data is similar to this question. There are ~240 data points. You want to know my interpretation of model selection using AIC or the use of AIC in general? As I don't think I mentioned the use of AIC in comparing glms $\endgroup$ – user1320502 Dec 1 '13 at 16:48
  • $\begingroup$ I mentioned it cause I believe it is slightly better than using raw LRT. I also asked about your size of dataset cause for a small sample asymptotic properties (as with all LRTs) suffer. In general your question seems a bit too open I think. In your second case you incorporate random effects, with glm you 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$ – usεr11852 Dec 1 '13 at 22:11
  • $\begingroup$ the title sounded so well, but the question "what are the key differences to this process using glmer" disappointed me. Very basic, trivial question, google what random effect means. It would be much more interesting to ask how one knows that the random effect improved the model and how to select between various model with or without various random effects. $\endgroup$ – Curious Dec 2 '13 at 23:00
  • $\begingroup$ @Tomas Thanks for your interest, sorry the question did not live up to the title. There are however many conflicting ideas on this subject and I thought perhaps useful question. Although i am interested in you statements regarding testing the random effect, i.e. if the variance is zero and whether or not the definition of deviance on the glm and glmer are the same. Best. $\endgroup$ – user1320502 Dec 3 '13 at 22:19
4
$\begingroup$

A good deal of this is covered in Ben Bolker's excellent at mixed models in R FAQ/wiki

$\endgroup$
  • $\begingroup$ +1. While it would not be my first suggestion to understand the GLM/GLMM comparison it will probably beneficial for the OP indeed. $\endgroup$ – usεr11852 Dec 5 '13 at 4:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.