Dear Stata Forum,

I am trying to figure out how I can test for how an interaction effect between two continuous variables is affected by another continuous moderating variable.

To be more exact I am trying to figure out how internal and external R&D approaches of a firm interact, and how this interaction effect is, in turn, affected by the knowledge breadth of a firm (the moderator that is influencing the interaction effect).

I have initially tried to interpret such a three-way-interaction using the margins and marginsplot command to graphically interpret the effects of breadth on the interaction effect between the two variables. Yet, this does not work as the test only allows me to test for the effect of two moderating variables on one independent variable.

It would, for example, be great to find a way to show how the interaction effect between the two variables varies for certain levels of the moderating variable "breadth".

Could a moderated mediation test be the way to go?

I am working with panel data in what is currently a negative binomial regression.


I hope my problem becomes clear,

I would be very grateful for any help,

Regards, Lennart