I struggle with understanding the dispersion model and dispersion parameter of glmmTMB
, and could not find answers anywhere.
I constructed a GLMM using glmmTMB
with a dispersion paramenter dispformula
to account for heteroscedastictity that is related to one of my predictors (to be exact from my time variable in my longitudinal data, because the variance at BL is greater than at the follow-up data points).
Questions:
I read on github or stackexchange, that the dispersion model of
glmmTMB
was not constructed to be used with RE. Does anybody know whether that still up to date? Am I allowed to include a varying dispersion parameter to a model with a random effect? I need the random effect because I have repeated measures.In my model I am interested in the three-way interaction term (of my three predictors) and wonder whether I can still interpret the conditional model the normal way. I usually investigate the model structure with
summary(model)
. My dispersion model is highly significant, but I can`t find any explanation on how to interpret and deal with a dispersion model. I found a comment concerning this that confuses me: >"When the same variables are in the conditional and dispersion models, the mean-variance relationship can be manipulated, but this could potentially lead to non-convergence issues."< (from an R Journal Article of Brooks et al., 2017).?sigma.glmmTMB
says >"nbinom2: returns an overdispersion parameter (usually denoted theta or k); in contrast to most other families, larger theta corresponds to a lower variance which is mu(1+mu/theta)."<. Since I do not understand what the dispersion parameter actually does, this information is not helpful. How do I have to adapt my interpretation of a model that includes a dispersion parameter with the package-built-in functiondispformula
?
Background information about my data and model:
I was fitting a GLMM for a randomized controlled trial with repeated measures. It is assumed that the continuous outcome (count data for psychopathologic symptom load) is influenced by time (3 time points: factor, 3 levels), treatment group (factor, 2 levels) and occurrence of certain events (factor, 2 levels) and their interactions. I fitted an glmer accordingly:
glmer(outcome ~ time*group*event + (1| ID) , ... )
. With poisson distribution it was very overdispersed, and I therefore moved to a negative binomial model. Unfortunately the plots of residuals (using DHARMa
) revealed a pattern that suggested diverging variance with model predictions. Plotting predictor time against standardized residuals revealed heteroscedasticity. To account for the heteroscedasticity, I moved to constructinga glmmTMB
with dispersion parameter like so:
m1 <- glmmTMB(outcome1 ~ event * time * group + (1|code), dispformula = ~time , family = "nbinom2", data = data_long)