[R-sig-ME] Marginal effect plot for an interaction effect from GLMM following a beta-distribution (glmmTMB)

Ben Bolker bbo|ker @end|ng |rom gm@||@com
Mon Oct 19 22:54:05 CEST 2020


   I always get confused about the different meanings of the term 
'marginal', but it's possible that the emmeans package will do what you 
want ...

On 10/19/20 4:21 PM, Jan anye Velimsky via R-sig-mixed-models wrote:
> 
> Dear R project mixedmodels users,
> 
> I am struggling to estimateand visualize the marginal effects (interaction effect) from a GLMM Model.
> 
> We have been estimatinga GLMM model following a beta-distribution with the glmmTMB-package. The model consistsof factors influencing referendum turnout (range between 0-1) in german municipalities.The primary units of investigation are city districts nested in referendumsnested in cities.
> 
> Here an example model:
> 
> model1 <- glmmTMB (ref_turnout ~ unemployment + contestation+ experience_with_ref + (experience_with_ref *unemployment)+ (1| town/ referendum), family=list(family="beta", link ='logit'), data = ml)
> 
>   
> 
> Results example model:
> 
>                                                                                                    Estimate      Std. Error    zvalue     Pr(>|z|)
> 
> (Intercept)                                                                                -0.583             0.131      -4.455     8.4e-06***
> 
> unemployment                                                                        -0.067              0.002      -30.397    < 2e-16 ***
> 
> contestation                                                                             0.008              0.003        2.398     0.0165 *
> 
> experience_with_ref                                                               0.012              0.052       0.228      0.8200
> 
> unemployment: experience_with_ref                                 -0.001             0.001      -1.725      0.0845 .
> 
>   
> 
> The model contains an interaction effect with unemploymentper district and experience with referendums in the respective city.
> 
> The aim is to visualize the interaction effects plotting the marginal effects.
> 
> With the "marginal_effects" command from the (margins-package) it was possible to estimate marginal effects,but no further summaries which are needed for plotting the model.  The "margins" command does not work for the glmmTMBmodel.  The idea is to have a simplemarginal effects plot for the interaction effect like this:
> 
> 
> Thanks a lot for your help!
> Jan Velimsky
> 
> -- Jan Velimsky, MAResearch associate
> Ludwig-Maximilians-Universität Munich
> Geschwister-Scholl-Institut of Political Science (GSI)
> Oettingenstrasse 67
> D-80538 Munich
> 
> 
> 
> 
> 
> 
> _______________________________________________
> 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