Plotting Interaction for Binomial GLMM Multi-Membership Model

@avehtari @paul.buerkner
I am having trouble plotting interaction for my Binomial GLMM model

Predictors

Gender: Female or Male (Female is the base level)

Male_degree: number of other males that the focal male met

Interaction Gender:Male degree

I want to plot the interaction effect but am not sure how to calculate the predicted probabilities.

I calculated the predicted probabilities of the effect of male degree by:

exp(Intercept+male_degreex)/(1+exp(Intercept+male_degreex))

I then took the mean of these values and plotted it against x.

How would I incorporate the interaction term into this for both Statuses.

Would it be like this:
Male
exp(Intercept+male_degreex+status_M:male_degreex)/(1+exp(Intercept+male_degreex+status_M:male_degreex))

Female
exp(Intercept+status_M:male_degreex)/(1+exp(Intercept+status_M:male_degreex))

@jd_c would you possbily know?

This is what the conditional_effects() function in brms is designed for. See the brms manual, as it has great examples of how to plot interactions. https://cran.r-project.org/web/packages/brms/brms.pdf

1 Like

@jd_c

Could you possibly look at this post: Beta-Binomial Multi-Membership Results Interpretation Issues - Interfaces / brms - The Stan Forums (mc-stan.org)

It was an addition to this and I been having alot of trouble with this.

1 Like