I struggle with understanding the dispersion model and dispersion parameter of glmmTMB
, and could not find answers on github, in the vigniette or on stackexchange/stackoverflow.
I constructed a GLMM using glmmTMB
with a dispersion paramenter to account for heteroscedastictity that is related to one of my predictors.
Questions:
I read on github or stackexchange, that the dispersion model 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 since 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 function
dispformula
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 continous outcome (count data for psychopathologic symptom load) is influenced by time (3 time points: factor, 3 levels), treatment group (factor, 2 levels) and occurence 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. Unfortunatly the plots of residuals (using DHARMa
) revealed a pattern that suggested diverging variance with model preditions. Plotting predictor time against standardized residuals revealed heteroscedasticity. To account for the heteroscedastictidy, I moved to constructing 4 different glmmTMB
(because I have 4 outcomes) with dispersion parameter like so:
m1 <- glmmTMB(outcome1 ~ event * time * group + (1|code), dispformula = ~time , family = "nbinom2", data = data_long)