Stata Interaction Plot. We can also get the slopes for the two groups using the margins command. Plotting a binary x continuous interactionplotting a binary x continuous interaction.
If we had used at effort effa eff effb hours 0 1 4 then effort would have been on the x axis separated by hours. Today i want to show you how to use margins and twoway contour to graph predictions from a model that includes an interaction between two continuous. What clyde and oded showed above my post is the best route to a line graph.
Stata knows to plot hours on the x axis and separate lines by effort because of the order by which we specified the at option.
The value for the female by socst interaction is 2047 which is the difference in slope between the male and female group i e the slope for the female group would be about 6248 2047 4201. This is particularly true for models with interaction terms. Graphics overview of twoway plots stata learning modules this module shows examples of the different kinds of graphs that can be created with the graph twoway command. Now we can plot the simple slopes using the marginsplot command introduced in stata 12.
