[R-sig-ME] glmer() Gamma distribution - constant coefficient of variation

Ben Bolker bbo|ker @end|ng |rom gm@||@com
Tue Mar 30 02:54:02 CEST 2021


   I would start by checking the scale-location plot, i.e.

plot(fitted_model, sqrt(abs(resid(., type="pearson"))) ~ fitted(.))

if that's fairly flat, you should be OK.

    Not that important, but can you tell me why you're fitting an 
identity-link Gamma model?  I'm always curious (I've read Lo and Andrews 
[2015] but don't find their argument particularly convincing ...).  Do 
you have reasons to believe the relationships are linear rather than 
log-linear?

Lo, Steson, and Sally Andrews. “To Transform or Not to Transform: Using 
Generalized Linear Mixed Models to Analyse Reaction Time Data.” 
Frontiers in Psychology 6 (August 7, 2015). 
https://doi.org/10.3389/fpsyg.2015.01171.




On 3/22/21 5:24 PM, Hedyeh Ahmadi wrote:
> Hi all,
> I am running a glmer() with Gamma distribution and identity link. The R output is as follows. I would like to check the constant coefficient of variation assumption in R but I am not sure where to start. Any help would be appreciated.
> 
> Generalized linear mixed model fit by maximum likelihood (Laplace Approximation) ['glmerMod']
>   Family: Gamma  ( identity )
> Formula: Y ~ 1 + pm252016aa + race +prnt.empl + overall.income +  (1 | site)
> Data: Family
> Control: glmerControl(optimizer = "bobyqa", optCtrl = list(maxfun = 100000))
> 
>       AIC       BIC           logLik           deviance df.resid
>   68781.7   68917.1 -34371.8     68743.7     9180
> 
> Scaled residuals:
>      Min      1Q             Median      3Q        Max
> -1.9286   -0.7314   -0.0598    0.6770    3.9599
> 
> Random effects:
>   Groups    Name               Variance   Std.Dev.
>   site (Intercept)      0.66157    0.8134
>   Residual                            0.04502     0.2122
> Number of obs: 9199,  groups:  site, 21
> 
> Fixed effects:
>                                                                 Estimate     Std. Error         t value             Pr(>|z|)
> (Intercept)                                              52.3578               1.3102            39.962         < 0.0000000000000002 ***
> pm252016aa                                         -0.1260                 0.1099           -1.147            0.251212
> race_1                                                     1.0913                  0.7106         -1.536             0.124628
> race_2                                                     -1.1787                  0.6870          3.171             0.001518 **
> prnt.empl                                               2.8852                  0.4377            4.307            0.000016517 **
> overall.income[>=100K]                      -1.8476                 0.3693          -5.003            0.000000566 ***
> overall.income[>=50K & <100K]        -0.8644                0.3403             -2.540            0.011078 *
> ---
> Signif. codes:  0 �***� 0.001 �**� 0.01 �*� 0.05 �.� 0.1 � � 1
> 
> 
> Best,
> 
> Hedyeh Ahmadi, Ph.D.
> Statistician
> Keck School of Medicine
> Department of Preventive Medicine
> University of Southern California
> 
> Postdoctoral Scholar
> Institute for Interdisciplinary Salivary Bioscience Research (IISBR)
> University of California, Irvine
> 
> LinkedIn
> www.linkedin.com/in/hedyeh-ahmadi<http://www.linkedin.com/in/hedyeh-ahmadi>
> <http://www.linkedin.com/in/hedyeh-ahmadi><http://www.linkedin.com/in/hedyeh-ahmadi>
> 
> 
> 
> 
> 
> 	[[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