I am trying to plot the effect on Value of an interaction between Trend and Experience, at high vs. low levels of Trend.
(I would like to see the effect of value of Experience in high vs. low trend levels)
First, I ran the regression of value on Trend, Experience, Interaction, and my controls,
Second, I used the following code:
margins, at(Trend=(2.09 4.53) Experience =(0 .75 1.5 2.25))
In the Parentheses, I added for Trend the average +/- standard-deviation; and for Experience few observations to generate scenarios for the graph.
To obtain the Graph, I then added the following code:
marginsplot, xdimension(Experience) recastci(rarea)
This resulted in two lines that are perfectly parallel with their areas that are perfectly similar. I have repeated this exercise using Excel and the results are not the same. Specifically, the slope of the two lines (at 2.09 and 4.53) are not the same.
Can anyone advise what could be the problem in the code? Thanks.
Related Posts with Plotting an Interaction
cmp models with zero-inflationI have recently started using cmp models which I find to be very much useful in building multivariat…
Changing the date formatCurrently, I have the variable, calldate, which is in the format 09jul2019, 10jul2019, etc. Is ther…
Graph by categories and groupsTrying to plot a graph (scatter plot with line ) using a variable (rip) which takes values different…
Dynamic panel data, with small N and large TI have a panel data with N=17 and T=46. The model has a dynamic specification as it includes a lagge…
Stata Matrix errorHi. I am doing a regression based decomposition analysis. This is my code Code: global X "Educatio…
Subscribe to:
Post Comments (Atom)
0 Response to Plotting an Interaction
Post a Comment