Context: I have created a beta-binomial model using glmmTMB() from the glmmTMB package and I am now trying to simulate a beta-binomial outcome using pbetabinom() from the VGAM package. The parametrization of the the variance in each package is different. Here on pg. 28 it's shown that the beta-binomial variance in the glmmTMB package is V = $\mu$(1-$\mu$)(n($\phi$+n)/($\phi$+1)) and here it's shown for the VGAM package as V = $\mu$(1-$\mu$)(1+(n-1)$\rho$)/n. How can I related $\phi$ to $\rho$?

The pbetabinom() utilizes the $\rho$ parameter, what it is calling a correlation parameter, which is defined between 0 and 1. But this $\rho$ is not given in the output of glmmTMB(), rather we get a dispersion parameter, $\phi$.

I want to simulate based off my model output, but I am struggling how to relate $\phi$ to $\rho$. Setting the variances equal, and isolating $\rho$, my algebra is getting me to:


I have tried playing around with simplifying this but cannot get 'n' out the equation. I can also see, assuming some positive value for $\phi$, that $\rho$ would not be bound between 0 and 1, which per the VGAM details it should.

So, my questions are: How can I use the dispersion parameter, $\phi$, given by glmmTMB() output to simulate a beta-binomial outcome which requires the correlation parameter, $\rho$ as defined by VGAM's pbetabinom()? Where am I going wrong in relating to the two given variance equations?

  • $\begingroup$ You appear to be comparing moments of a quantity in one case to moments of its mean in the other: see en.wikipedia.org/wiki/…. $\endgroup$
    – whuber
    Apr 19 at 20:11
  • $\begingroup$ Okay, so I cannot "convert" my estimated dispersion into a meaningful correlation parameter. Do you have any guidance on how I can use the dispersion to simulate beta-binomial data? @whuber $\endgroup$
    – Reid
    Apr 20 at 17:17
  • $\begingroup$ What about using glmmTMB::simulate? $\endgroup$
    – dipetkov
    Apr 21 at 20:39


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.