Relative Content

Tag Archive for rr-marginaleffects

Issues with Interaction Terms in slopes() Function from marginaleffects

I am using the marginaleffects package in R to calculate marginal effects from a multinomial logistic regression model (MNL) that includes an interaction term. I want to calculate the Marginal Effects at the Mean (MEM) for each term in the MNL; the marginaleffects documentation refers me to the slopes function with the argument newdata = means. My MNL contains an interaction term, and the slopes function does not seem to be recognized correctly. Here’s a summary of my problem and what I’ve tried: