1
$\begingroup$

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?

$\endgroup$
2
$\begingroup$

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.

$\endgroup$

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.