For my research I'm estimating the same regression with three different dependent variables, which are different variations of GDP per capita. In order to graphically compare my coefficients I'm using coefplot to plot them with a 95% confidence intervals above each other. So far I'm using the following code to store each estimation result as a seperate model to then tell coefplot to plot all three models.
This results in a graph with a single "x1" on my y-axis and three different lines in my graph, which represent my three different models as the legend shows.
In order for a neater graphical presentation I would like Stata to show my three model names (results_1, results_2 and results_3) on the y-axis (instead of the single "x1") at the height of the corresponding line in the graph, just as coefplot does for estimates with multiple independent variables.
So far I've been tweaking around with the legend options, but it doesn't trun out nicely.
I think this problem may be solved by storing all three results in a single matrix, but I have trouble how to construct such a matrix and how to tell coefplot to get it right.
Code:
reg logY_1 x1 estimates store results_1 reg logY_2 x1 estimates store results_2 reg logY_3 x1 estimates store results_3 coefplot results_1 results_2 results_3, drop(_cons)
In order for a neater graphical presentation I would like Stata to show my three model names (results_1, results_2 and results_3) on the y-axis (instead of the single "x1") at the height of the corresponding line in the graph, just as coefplot does for estimates with multiple independent variables.
So far I've been tweaking around with the legend options, but it doesn't trun out nicely.
I think this problem may be solved by storing all three results in a single matrix, but I have trouble how to construct such a matrix and how to tell coefplot to get it right.
Comment