1
$\begingroup$

I have percentage data so I am using a beta distribution and I want to do a mixed-effect model so I am still trying to decide between glmmTMD or the brm packages. I saw somewhere that some distribution types are affected by overdispersion more like Poisson however they said Beta isn't that much of a concern (is that true?). For the glmmTMB, I have two models one is looking at just random intercept model and the other is looking at the random slope intercept

glmmTMB(Redecimal ~ Region+food+genus +Region:food + Region:genus + genus:food + (1|sample), family = beta_family(link = "logit"), data = REdata) 
glmmTMB(Redecimal ~ Region+food+genus +Region:food + Region:genus + genus:food + (1+food|sample), family = beta_family(link = "logit"), data = REdata_with_Pro_NA)

When I run the summary for these models I get very different overdispersion parameters. For the random intercept model I get a score of 26.9

Family: beta  ( logit )
Formula:          
Redecimal ~ Region + food + genus + Region:food + Region:genus +  
    genus:food + (1 | sample)
Data: REdata_with_Pro_NA

     AIC      BIC   logLik deviance df.resid 
  -670.3   -608.3    353.2   -706.3      214 

Random effects:

Conditional model:
 Groups Name        Variance Std.Dev.
 sample (Intercept) 0.05991  0.2448  
Number of obs: 232, groups:  sample, 48

Overdispersion parameter for beta family (): 26.9 

and for the random slope model I get a crazy high number (also warnings about convergence but that's another problem since I am missing data for one group

Family: beta  ( logit )
Formula:          
Redecimal ~ Region + food + genus + Region:food + Region:genus +  
    genus:food + (1 + food | sample)
Data: REdata_with_Pro_NA

     AIC      BIC   logLik deviance df.resid 
      NA       NA       NA       NA      200 

Random effects:

Conditional model:
 Groups Name        Variance Std.Dev. Corr                    
 sample (Intercept) 0.3329   0.5770                           
        foodHNA     0.7688   0.8768   -0.63                   
        foodLNA     1.0893   1.0437   -0.59  0.82             
        foodPro     0.3381   0.5815   -0.67  0.61  0.51       
        foodSyn     0.6385   0.7990   -0.68  0.55  0.45  0.79 
Number of obs: 232, groups:  sample, 48

Overdispersion parameter for beta family (): 1.42e+08 

then I was using the DHARMa package

res <-simulateResiduals(glmmtbm, plot = T)
testDispersion(res)

for the intercept model score 26.9 I got these plots

enter image description here

enter image description here

DHARMa nonparametric dispersion test via sd of residuals fitted
    vs. simulated

data:  simulationOutput
ratioObsSim = 1.1623, p-value = 0.008
alternative hypothesis: two.sided

and then for the slope model which had an overdispersion value of 1.42^8 I got

enter image description here

enter image description here

DHARMa nonparametric dispersion test via sd of residuals fitted
    vs. simulated

data:  simulationOutput
ratioObsSim = 0.99052, p-value = 0.92
alternative hypothesis: two.sided

I am confused at why the intercept model that had a much lower value for the overdispersion parameter was significant using the DHARMa package and the slope model was not. My main question is should I worry about the value for beta distribution and if so what should I do. This is my first time trying to do any generalized mixed-effects modeling. And also for the brm package how would I go about testing it for overdispersion since the summary doesn't give a parameter value like glmmtmb

$\endgroup$
2
$\begingroup$

DHARMa tests are comparing your residuals to ones that are generated based on your model specifications. So in the first case, dispersion is higher than that of the simulations, in the second it is not.

It is not overdispersion, despite the term used in the summary. It is the dispersion parameter, which for the beta is phi with variance equal to mean*(1-mean)/(1+phi). So a high dispersion parameter value results in smaller variance.

See also this answer https://stats.stackexchange.com/a/451453/273568

$\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.