1

I am working with observational data which has a right skew in the dependent variable. This is a mixed effect model with a poisson distribution as based on discrete data. After finding the residuals from the model were not normal, and sjstats function overfit(model) highlighted zero-inflation to be an issue I ran the model in glmmTMB:

fit_zipoisson <- glmmTMB(freq~(B1 + B2)+(1|ref),data=da, ziformula=~1,
    family=poisson())

But running the model diagnostics afterwards still reveal a non-normal distribution and a zero-inflation.

zero_count(fit_zipoisson)

Zero-Count overfitting

Observed zero-counts: 295
Predicted zero-counts: 100
                 Ratio: 0.34

Model is underfitting zero-counts (probable zero-inflation).

Shapiro-Wilk normality test

data:  resid(fit_zipoisson)
W = 0.57262, p-value < 2.2e-16

Does anyone have any advice on what to do next?

kjetil b halvorsen
  • 63,378
  • 26
  • 142
  • 467
demmuster
  • 11
  • 3
  • 2
    You have a poisson model, so why do you expect normal residuals? Besides, there is no no "normality assumption" in poisson regression. To test residuals, see https://stats.stackexchange.com/questions/25068/interpreting-plot-of-residuals-vs-fitted-values-from-poisson-regression and https://stats.stackexchange.com/questions/70558/diagnostic-plots-for-count-regression/248035#248035 – kjetil b halvorsen Mar 05 '19 at 14:23

1 Answers1

3

A better way to check the fit of such a model would be the simulated scaled residuals of the DHARMa package. In addition, note that the glmmTMB() fits the model using the Laplace approximation which may not be optimal do discrete data. As an alternative you may also try the GLMMadaptive package that fits the same model using the adaptive Gaussian quadrature. You can also find an example of testing the goodness-of-fit here.

kjetil b halvorsen
  • 63,378
  • 26
  • 142
  • 467
Dimitris Rizopoulos
  • 17,519
  • 2
  • 16
  • 37