Moderated Mediation in STATA with SEM

#1
Hi! I’m in dire need of some urgent help! I’m trying to do a moderated mediation analysis in STATA with the following variables (see also the figure below):
  • IV: Identity - Measured on scale from 1 to 5
  • DV: Torture Attitudes - Measured on scale from 1 to 7
  • Mediator: Perceived threat - Measured on scale from 1 to 5
  • Moderator: Political Discourse - Categorical numerical variable (scale from 1 to 4)
  • And I have 9 control variables that should also be added to the analysis.

I managed to do the analysis for the mediation, but I’m having some trouble with the final moderated mediation part, specifically adding the discourse variable in the equation. I know I should have an interaction term in the b path, but I have no idea how to write this. I managed to do it with the moderator as a dichotomous variable, but for this analysis, I need to keep it as the original variable with all categories. Anyone kind enough to help me?
moderated mediation figure.jpg