Hello everyone,

I am currently struggling to create a graph to visualize the moderation effect in my panel regression:

Code:
 xtreg ROA_centered_industry MarkCap_centered_industry c.MarkCap_centered_industry#DigitalisierunglowHigh c.MarkCap_centered_industry#DigitalisierunglowHigh#c.Firm_Size_centered c.MarkCap_centered_industry#c.Firm_Size_centered OpCap_centered_industry c.OpCap_centered_industry#DigitalisierunglowHigh c.OpCap_centered_industry#DigitalisierunglowHigh#c.Firm_Size_centered c.OpCap_centered_industry#c.Firm_Size_centered c.MarkCap_centered_industry#c.OpCap_centered_industry c.MarkCap_centered_industry#c.OpCap_centered_industry#DigitalisierunglowHigh c.MarkCap_centered_industry#c.OpCap_centered_industry#c.Firm_Size_centered DigitalisierunglowHigh Firm_Size_centered Firm_Age, re vce (cluster GlobalCompanyKey)
I am interested in visualizing the moderation effect of digitalization and Firm_Size on MarkCap. The graph I want to produce should possibly look something like this for each moderation variable:

Array
The two lines indicate two different levels of the moderation variables. The moderator digitalisierunglowHigh just takes two values (1 or 2) so I guess some form of this graph should be possible.
For the second moderator (Firm_Size) I guess it becomes more difficult as the variable is continuous. I was told that I could simply define a cut-off value (e.g. the mean) to split the values into two categories low/high for the graph. I was wondering if this would affect my regression? If the suggested graph would not be possible does anybody have an idea how to visualize the moderation effect of a continuous moderator?

I have found this thread:

https://www.statalist.org/forums/for...teraction-plot

but as I'm quite new to Stata I'm struggling to understand and apply it.
I somehow tried to apply the margins command and received:
Code:
 margins c.MarkCap_centered_industry#DigitalisierunglowHigh
only factor variables and their interactions are allowed
Does this mean that I can't use the margins command as MarkCap is a continuous variable?

Thanks in advance!

Best,
Till