easystats / performance

:muscle: Models' quality and performance metrics (R2, ICC, LOO, AIC, BF, ...)
https://easystats.github.io/performance/
GNU General Public License v3.0
1.01k stars 87 forks source link

ICC for Beta-Binomial GLMM? #291

Open utekleong opened 3 years ago

utekleong commented 3 years ago

Dear Developers,

I understand that the icc() supports models of the glmmTMB class. However, I could not find any documentation pertaining to the support of the beta-binomial distribution family.

Would I be able to use the icc function to check the ICC of an unconditional beta-binomial GLMM? If not, are there any alternatives or manual workarounds that I could implement?

Thank you so much, please do let me know if I overlooked anything.

Regards, Utek

bwiernik commented 3 years ago

@strengejacke I'm not sure why var.random isn't returned here and the var.dispersion looks wrong:

data(cbpp, package="lme4")
library(glmmTMB)
m <- glmmTMB(cbind(incidence, size-incidence) ~ period + (1|herd),
                              family=betabinomial(), data=cbpp)
insight::get_variance(m)
summary(m)
strengejacke commented 3 years ago

The random effect variances can't be calculated because they're close to zero (see warning message). According to the dispersion variance: I adopted the code, and it's similar to the random effects variances. But not sure about this, in most cased it is zero, I think.