Dear Stata Users,
I am attempting to use marginsplot to show in graph the moderating effect of a variable on the main (curvilinear relationship). I report below the model.
In particular my main relationship is between X1 and X1squared ("c.L.X1##c.L.X1") and the dep. variable "rd_sales2_w2".
I want to see the moderating effect of the variable "GII". So, in the model, I include GII and the interaction between GII and X1 ("X1_GII").
After launching the model, I have tried to work with margins and marginsplot command, but I did not obtain what I am looking for.
I want to show how my main curvilinear relationship changes for low and high levels of GII.
I would like to show graphs as in the following paper (page 207 fig. 2 and 3).
https://onlinelibrary.wiley.com/doi/...aCXoHwmVXDJQOA
Any suggestions would be really useful for my research, if you have any questions do not hesitate to ask
Thank you in advance
I am attempting to use marginsplot to show in graph the moderating effect of a variable on the main (curvilinear relationship). I report below the model.
In particular my main relationship is between X1 and X1squared ("c.L.X1##c.L.X1") and the dep. variable "rd_sales2_w2".
I want to see the moderating effect of the variable "GII". So, in the model, I include GII and the interaction between GII and X1 ("X1_GII").
Code:
. xtreg rd_sales2_w2 c.L.X1##c.L.X1 l.Employee l.Tdeb_Tc l.Roa l.Capex l.Bsize l.Bind l.CEOsep l.CEO_bMemb l.GII l.X1_GII l.GDPper i > .year if Region != "Africa" & Region != "Middle-east" , fe F(21,865) = 5.69 corr(u_i, Xb) = -0.0255 Prob > F = 0.0000 rd_sales2_w2 Coef. Std. Err. t P>t [95% Conf. Interval] X1 L1. .1088029 .0246564 4.41 0.000 .0604095 .1571963 cL.X1#cL.X1-.0012465 .0004478 -2.78 0.005 -.0021255 -.0003676 Employee L1. 9.18e-07 2.53e-06 0.36 0.716 -4.04e-06 5.88e-06 Tdeb_Tc L1. 7.32e-06 .0008716 0.01 0.993 -.0017033 .0017179 Roa L1. -.0396293 .0072838 -5.44 0.000 -.0539253 -.0253332 Capex L1. -.0046327 .0137816 -0.34 0.737 -.031682 .0224166 Bsize L1. -.016503 .0342187 -0.48 0.630 -.0836644 .0506584 Bind L1. -.0100269 .0044302 -2.26 0.024 -.0187221 -.0013316 CEOsep L1. -.1390527 .1711974 -0.81 0.417 -.4750635 .1969582 CEO_bMemb L1. -1.134796 .3335148 -3.40 0.001 -1.789388 -.4802026 GII L1. 28.97293 8.051821 3.60 0.000 13.16954 44.77632 X1_GII L1. -.1919284 .0731795 -2.62 0.009 -.3355585 -.0482983 GDPper L1. .0000713 .0000134 5.32 0.000 .000045 .0000976 year 2012 -.0878556 .1936203 -0.45 0.650 -.4678761 .292165 2013 -.0978832 .1975297 -0.50 0.620 -.4855768 .2898104 2014 .1055205 .198037 0.53 0.594 -.2831688 .4942098 2015 .1892702 .2333239 0.81 0.417 -.2686771 .6472175 2016 .4074635 .2378825 1.71 0.087 -.059431 .874358 2017 .4754091 .2531208 1.88 0.061 -.0213937 .9722119 2018 .6449463 .2853322 2.26 0.024 .0849219 1.204971 2019 .9432578 .3573599 2.64 0.008 .2418638 1.644652 _cons 1.910243 1.941787 0.98 0.326 -1.900923 5.721409
After launching the model, I have tried to work with margins and marginsplot command, but I did not obtain what I am looking for.
I want to show how my main curvilinear relationship changes for low and high levels of GII.
I would like to show graphs as in the following paper (page 207 fig. 2 and 3).
https://onlinelibrary.wiley.com/doi/...aCXoHwmVXDJQOA
Any suggestions would be really useful for my research, if you have any questions do not hesitate to ask
Thank you in advance
Comment