I have run into a number of practical questions when modeling count data from experimental research using a within-subject experiment. I briefly describe the experiment, data, and what I have done so far, followed by my questions.
Four different movies were shown to a sample of respondents in sequence. After each movie an interview was conducted of which we counted the number of occurrences of certain statements that were of interest for the RQ (predicted count variable). We also recorded the maximum number of possible occurrences (coding units; offset variable). In addition, several features of the movies were measured on a continuous scale, of which for one we have a causal hypothesis of an effect of the movie feature on the count of statements while the others are control (predictors).
The modeling strategy adopted so far is as follows:
Estimate a random effect Poisson model, where the causal variable is used as a covariate and the other variables as control covariates. This model has an offset equal to ‘log(units)’ (coding units). Random effects are taken across subjects (movie-specific counts are nested in subjects). We find the causal hypothesis confirmed (sig. coefficient of causal variable). In estimation we used the lme4 package in R, in particular the function glmer.
Now I have the following questions. A common problem in Poisson regression is overdispersion. I know that this can be tested by using a negative binomial regression and evaluating whether its dispersion parameter improves model fit of a simple Poisson model. However, I do not know how to do so in a random effect context.
- How should I test for overdispersion in my situation? I tested overdispersion in a simple Poisson/negative binomial regression (without random effects) that I know how to fit. The test suggests presence of overdispersion. However since these models do not take the clustering into account I suppose this test is incorrect. Also I am not sure about the role of the offset for tests of overdispersion.
- Is there something like a negative binomial random effect regression model and how should I fit it in R?
- Do you have suggestions for alternative models that I should try on the data, i.e. taking the repeated measures structure, count variables and exposure (coding units) into account?