Residual Variance or Dispersion of Gamma GLMER
Depending on what exactly you mean by for "dispersion" (there are lots of different definitions depending on context): sigma() gives you 1/sqrt(shape) (i.e. the scaled standard deviation or coefficient of variation: mean=shape*scale, variance=shape*scale^2, so sd/mean = sqrt(shape)*scale/(shape*scale) = 1/sqrt(shape). In the classic GLM sense phi=sigma^2=1/shape is the dispersion parameter, because we define variance= V(mu)/phi, V=mu^2 ((shape*scale)^2/shape = shape*scale^2 - variance). sigma() is the same value as the one reported in the Residual Std.Dev. column. For what it's worth I wouldn't call the conditional (Gamma) model "zero-altered" in this case, as the Gamma has a zero (or infinite) probability density for x=0 anyway.
On 17-10-25 10:31 AM, andreu blanco wrote:
Hi, I am trying to fit a Hurdle model using glmer, however in order to calculate the variance of the Hurdle model I need to know the dispersion of the gamma ZAG, which I cannot find from the summary of my model:
summary(H1)
Generalized linear mixed model fit by maximum likelihood (Laplace
Approximation) ['glmerMod']
Family: Gamma ( log )
Formula: Biomass ~ Protection * Exposure + (1 | Location)
Data: Aarmata.pos
AIC BIC logLik deviance df.resid
644.9 657.5 -316.4 632.9 55
Scaled residuals:
Min 1Q Median 3Q Max
-1.2278 -0.7188 -0.1149 0.3721 3.4934
Random effects:
Groups Name Variance Std.Dev.
Location (Intercept) 0.5489 0.7409
Residual 0.6531 0.8082
Number of obs: 61, groups: Location, 8
Fixed effects:
Estimate Std. Error t value
Pr(>|z|)
(Intercept) 4.1195 0.4866 8.466
<2e-16 ***
ProtectionProtected 0.2202 0.6940 0.317
0.7510
ExposureSemiexposed -0.6357 0.3319 -1.915
0.0555 .
ProtectionProtected:ExposureSemiexposed -0.7128 0.5492 -1.298
0.1944
---
Signif. codes: 0 ?***? 0.001 ?**? 0.01 ?*? 0.05 ?.? 0.1 ? ? 1
Correlation of Fixed Effects:
(Intr) PrtctP ExpsrS
PrtctnPrtct -0.701
ExpsrSmxpsd -0.212 0.143
PrtctnPr:ES 0.131 -0.242 -0.562