To whom can solve this problem:
Please kindly help! I need to draw an interaction plot figure to see the moderator effect. However, I tried codes such as "margins" according to the state help guide but it did not work... Also I need to do additional control but do not know how...The data seting is as follows:
I use "xtgls" to regress "y x1 x2 x1*x2 x3 x4", among which x1 x2 are independent variables, and x3 and x4 are controlled variables. x2 moderates the relationship between x1 and y.
x1 and x2 are continuous variables. x1 ranges from -0.36 to 0.06. x2 ranges from -0.71 to 1.42.
Except for x1 and x2, other variables (x3 and x4) need to be constrained to their mean values.
It is expected that x-axis is for x1, and y-axis is for y; there are two lines in the plane, showing x1*high-level_x2's relationship with y and x1*low-level_x2's relationship with y respectively.
It is also expected that there would be a second figure with the differences between the two lines in the first figure at the y-axis and with x1 at the x-axis.
Both figures need labels of the variables at their places.
Please help with this. Looking for your guidance!
Thank you!
Related Posts with How to do the Interaction plot with continuous variables and constrain other control variables at mean
Measuring effects from interaction termGood evening, I'm running multiple regressions based on my IV of living in a district that varyies …
Error while declaring panel dataDear Statalisters, I am new to stata. I have an unbalanced dataset on firms' investment and number …
ppml_panel_sg : collinearity over lhs>0Hi, I am training to estimate the impact of one FTA on bilateral trade: ppml_panel_sg TRADE FTA i…
local gives some incorrect resultsHi, I am quite new in using loop in Stata, and I find of great help this forum. I did some search on…
Graphing age and period main effects derived from mixed-effects logit modelHello Everyone, I am estimating an age-period-cohort (APC) model to isolate cohort trends in diabet…
Subscribe to:
Post Comments (Atom)
0 Response to How to do the Interaction plot with continuous variables and constrain other control variables at mean
Post a Comment