[R-sig-ME] Shape parameter for Gamma glmer?

Phillip Alday me @end|ng |rom ph||||p@|d@y@com
Fri Apr 29 19:20:42 CEST 2022

Once again in plain text for the list
> On 4/28/22 16:32, Miranda Fix wrote:
> Hi,
> My understanding is that one can obtain the Gamma shape parameter from a
> glmer object, let's say "mod", by 1/sigma(mod)^2. In other words, 1 over
> the dispersion. However, for a glm the dispersion is only a crude estimate
> and there is a gamma.shape function in the MASS package to provide a better
> estimate of the shape parameter. So my question is twofold:
> 1) Is sigma(mod)^2 a good estimate of the dispersion in the glmer case?
> (i.e., is 1/sigma(mod)^2 a good estimate of the shape?)

I suspect it's about the same quality as for glm() because ultimately
the dispersion is estimated in a fairly similar manner.

> 2) If not, is there an equivalent of MASS::gamma.shape for a glmer object
> instead of a glm object?
Not to my knowledge, though looking at the source for
MASS::gamma.shape.glm I suspect that it would be trivial to modify it to
work with glmer. You would "just" need to change the bits that extract
the relevant components from the model (fitted values, deviance, etc),
and the rest should work. The only tricky bit is the residual degrees of
freedom, though maybe somebody here can provide an idea about that. (I'm
pretty weak on gamma regression, even in the non mixed case, to be honest.)

> Thanks so much for your help!
> 	[[alternative HTML version deleted]]
> _______________________________________________
> R-sig-mixed-models using r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models

More information about the R-sig-mixed-models mailing list