We are applying a GzLM (using SPSS) for analysing the effects of two fixed categorical predictors (habitat type (2 levels) and seasons (4 leves), and their interaction, on data regarding counts per m2 (dv). Some samples have zeros, and we have detected overdispersion using a GzLM with Poisson error structure. We then proceed to use a negative binomial error distribution with log link, with a better fit of the model. My questions are:

(1) It is correct to run a GzLM for this kind of data where both predictors are categorical? We used to analyse this kind of data using GLM ANOVA with transformations (e.g. sqrt) but data is still non-normal, positive skewed.

(2) SPSS report the estimated marginal means and SE, it is ok to report these values in order to interpret the interaction?

  • $\begingroup$ how many samples? reasonably balanced between habitats and seasons? max, mean counts? $\endgroup$
    – Ben Bolker
    Feb 16, 2016 at 13:51
  • $\begingroup$ Hi Ben, we have a nearly balanced design (around 15-20) replicates for each combination of habitat and season. Max: 178, mean count: 16.1 $\endgroup$
    – AnastD
    Feb 16, 2016 at 14:28
  • $\begingroup$ I correct myself, we have 30-37 replicates for each combination $\endgroup$
    – AnastD
    Feb 16, 2016 at 14:48

1 Answer 1


If you have categorical data the chances are that your dependent variable depends not only on each of the predictors but also on their combinations.

To put it simply, your current model looks like this (let's pretend it has only 2 predictors):

Y = b0 + b1*x1 + b2*x2 + e

However, the model below might be a better fit:

Y = b0 + b1*x1 + b2*x2 + b3*x1*x2 + e

Be aware that even with just a few predictors you might end up with too many combinations which in turn make your model unfeasible. But if you select only reasonable combinations you might get a model that fits much better to you data.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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