Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Margins: Graph moderator/interaction effect

    Hi,

    I want to create a graph of the interaction between my independent variable and moderator with the margins command but it does not seem to work. My variables are:
    - independent variable - tmt_deg_rep: ratio variable between 0 and 1
    - moderator variable - roa_av_2y: continuous variable with minimum -.0463754 and maximum .646758.
    (- dependent variable - divestment_rate: continuous variable)

    After I ran my regression I directly I tried multiple commands like:
    margins, at(c.tmt_deg_rep=(0 1)) c.roa_av_2y= (-.0463754 .646758) )
    margins, at(c.tmt_deg_rep=(0 1)) roa_av_2y= (-.0463754 .646758) )
    margins, at(c.tmt_deg_rep=(0 1)) c.roa_av_2y= (0 .7) )

    but none of them worked: "option roa_av_2y not allowed" "option c.roa_av_2y not allowed".

    I tried the margins command directly after a xtpoisson regression including multiple interaction effects: xtpoisson divestment_rate c.tmt_deg_rep##c.tmt_age_diversity c.tmt_deg_rep##c.roa_av_2y c.tmt_deg_rep##c.roe_av_2y log_emp tmt_average_tenure tmt_average_age tmt_members, fe

    and also directly after a xtpoisson regression containing the interaction effect described above only: xtpoisson divestment_rate c.tmt_deg_rep##c.roa_av_2y log_emp tmt_average_tenure tmt_average_age tmt_members, fe

    The independent variable is significant in the model containing the control variables and the independent variable, and the interaction effect tmt_deg_rep x roa_av_2y is significant in the full model including the moderators.

    How can I run the margin command correctly?

    Thank you in advance!
Working...
X