Marginal effect plot for an interaction effect from GLMM following a beta-distribution (glmmTMB)
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? -------------- next part -------------- A non-text attachment was scrubbed... Name: 1603138302457blob.jpg Type: image/png Size: 3705 bytes Desc: not available URL: <https://stat.ethz.ch/pipermail/r-sig-mixed-models/attachments/20201019/abc6ace5/attachment-0001.png>