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
Keeping data for last date of each month for each companyHi I am working with daily stock price data for a large number of companies. I want to keep the las…
Data cleaning - drop all observations for ID if one observation in var x contains xyzI am having a small problem. I am trying to clean my data set: I would like to remove all observati…
using macro variables in loopDear all, I am writing to ask for help in using macro variables in loops. My code is something as …
How to identify the "case" corresponding to the min value obtain from summary statisitcs?Hello I have run the following summary stats and obtained the following: . . sum a_buy_gas_elec_ap…
Two-Sample KS testGood day, I have a sample of European countries and I'm analyzing bank profitability for EU banks w…
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