Solved – Computing repeatability from overdispersed zero-inflated negative binomial GLMMM in R

glmmnegative-binomial-distributionrrepeatabilityzero inflation

I'm trying to compute repeatability of a count response variable from a Generalized linear mixed model with multiple fixed effects and individual ID as a random effect. I'm dealing with both overdispersion and zero-inflation, and am therefore looking to use a negative binomial distribution and zero-inflated GLMM, which has lead me to use the glmmADMB package. My response variable is the number of times that a subdominant male reindeer is chased by a dominant male reindeer, used as a proxy for what I'm calling "boldness" for the time being (i.e. number of times that the subdominant male instigated aggression from dominant male). I am interested to see if this behaviour can be examined in the animal personality paradigm, and therefore am trying to calculate repeatability.

glmm.nb.zi <- glmmadmb(Times.chased.dis ~ factor(Year) + Obs.time + Age + Day_num + 
                                          ASR + Weight.adj + DomAg , 
                       random =~1|ID, data=data.r, zeroInflation=TRUE, family ="nbinom")

GLMM's in R powered by AD Model Builder: #'

Family: nbinom
alpha = 1.9336 
link = log 
Zero inflation: p = 0.18252 

Fixed effects:
 Log-likelihood: -924.442 
 AIC: 1874.884 
 Formula: Times.chased.dis ~ factor(Year) + Obs.time + Age + Day_num + ASR +  
                             Weight.adj + DomAg 
 (Intercept) factor(Year)2010 factor(Year)2013 factor(Year)2014         Obs.time 
  2.14602382       0.32409301       1.11688488       1.05475592       0.01505949 
         Age          Day_num              ASR       Weight.adj            DomAg 
  0.05685858      -0.07570367      -1.96255801      -1.76393450       1.41894334 

Random effects:
Structure: Diagonal matrix
Group=ID
        Variance StdDev
(Intercept)  0.03242   0.18

Number of observations: total=683, ID=46

I'm having trouble calculating repeatability as I cannot figure out the total variance associated with the random effect (specifically I don't know how to find the residual variance). Does anyone know how to calculate repeatability in this situation?

Would it be easier if I accounted for overdispersion by including an observation level random effect and allowed it to assume a Poisson distribution?

Best Answer

Unfortunately, as far as I know, there is currently no accepted way to estimate repeatability using a zero-inflated model. This is because of the two different distributions being fitted to the data which (I'm assuming) makes it very difficult to estimate the total variance in the data.

However, you can estimate repeatability using a Poisson error distribution as you suggested. The details for this are best found in Nakagawa & Schielzeth 2010 (Repeatability for Gaussian and non-Gaussian data, Biol Reviews). They detail the equations you need to estimate the residual variance for Poisson (or count) data. The key will be to determine whether your model estimates the overdispersion as additive or multiplicative - this changes how to estimate the residual. I'm not sure what glmmADMB uses but I know that MCMCglmm uses additive overdispersion and glmmPQL uses multiplicative overdispersion (and you can fit mixed effect poisson models with both). Nakagawa & Shielzeth did create a R package for estimating repeatability (rptR) associated with the paper, but as far as I can remember it doesn't handle other fixed or random effects and I don't think it has been updated lately (hence I haven't used it in several years). However, if you can get the code from the package, maybe that would be helpful?