For overdispersed Poisson, negative binomial and gamma GLMMs with log link, the observation-level variance can be obtained via the variance of the lognormal distribution (electronic supplementary material, appendix S1). This is the approach that has led to the terms presented above. There are two more alternative methods to obtain the same target: the delta method and the trigamma function. The two alternatives have different advantages and we will therefore discuss them in some detail in the following.
The delta method for variance approximation uses a first-order Taylor series expansion, which is often employed to approximate the standard error (error variance) for transformations (or functions) of a variable
x when the (error) variance of
x itself is known (see [18 (
link)]; for an accessible reference for biologists, [19 (
link)]). The delta method for variance approximation can be written as where
x is a random variable (typically represented by observations),
f represents a function (e.g. log or square-root), var denotes variance and d/d
x is a (first) derivative with respect to variable
x. Taking derivatives of any function can be easily done using the R environment (examples can be found in the electronic supplementary material, appendices). It is the delta method that Foulley
et al. [20 (
link)] used to derive the distribution-specific variance for Poisson GLMMs as 1/
λ (see also [21 (
link)])
. Given that in the case of Poisson distributions and , it follows that (note that for Poisson distributions without overdispersion, is equal to because ).
One clear advantage of the delta method is its flexibility. We can easily obtain the observation-level variance for all kinds of distributions/link functions. For example, by using the delta method, it is straightforward to obtain for the Tweedie distribution, which has been used to model non-negative real numbers in ecology (e.g. [22 (
link),23 (
link)]). For the Tweedie distribution, the variance on the observed scale has the relationship where
μ is the mean on the observed scale and
φ is the dispersion parameter, comparable to
λ and
ω in equation (3.1), and
p is a positive constant called an index parameter. Therefore, when used with the log-link function, can be approximated by according to equation (4.1). The lognormal approximation is also possible (see the electronic supplementary material, appendix S1;
table 1).
The use of the trigamma function is limited to distributions with log link, but it is considered to provide the most accurate estimate of the observation-level variance in those cases. This is because the variance of a gamma-distributed variable on the log scale is equal to where
ν is the shape parameter of the gamma distribution [24 (
link)] and hence is . At the level of the statistical parameters (
table 1; on the ‘expected data’ scale;
sensu [25 (
link)]; see their fig. 1), both Poisson and negative binomial distributions can be seen as special cases of gamma distributions, and can be obtained using the trigamma function (
table 1). For example, for the Poisson distribution is (note that ). As shown in the electronic supplementary material, appendix S2, ln(1 + 1/
λ) (lognormal approximation), 1/
λ (delta method approximation) and (trigamma function) give similar results when
λ is greater than 2. Our recommendation is to use the trigamma function for obtaining whenever this is possible.
The trigamma function has been previously used to obtain observation-level variance in calculations of heritability (which can be seen as a type of ICC although in a strict sense, it is not; see [25 (
link)]) using negative binomial GLMMs ([24 (
link),26 (
link)]; cf. [25 (
link)]).
Table 1 summarizes observation-level variance for overdispersed Poisson, negative binomial and gamma distributions for commonly used link functions.
Nakagawa S., Johnson P.C, & Schielzeth H. (2017). The coefficient of determination R2 and intra-class correlation coefficient from generalized linear mixed-effects models revisited and expanded. Journal of the Royal Society Interface, 14(134), 20170213.