Hi,
I am trying to generate an outcomes coefficient plot to demonstrate balance across outcomes at baseline using the coefplot command, but I seem to be running into some issues. I'm running several regressions with only two independent variables in each, and want to graph the independent variables on the y-axis with the different dependent variables stacked in-line with their appropriate independent variables.
I've included sample code below. The issue is that I want the mpg and foreign variables on the same plot but overlayed, and want the legend labels to appear on the y-axis instead.
Code:
I've also attached a working paper I found online below with an example that mimics I want to produce (See Figure 3 on page 42). Source: https://www.nber.org/system/files/wo...785/w25785.pdf
I am trying to generate an outcomes coefficient plot to demonstrate balance across outcomes at baseline using the coefplot command, but I seem to be running into some issues. I'm running several regressions with only two independent variables in each, and want to graph the independent variables on the y-axis with the different dependent variables stacked in-line with their appropriate independent variables.
I've included sample code below. The issue is that I want the mpg and foreign variables on the same plot but overlayed, and want the legend labels to appear on the y-axis instead.
Code:
Code:
sysuse auto.dta, clear egen price_std=std(price) egen weight_std=std(weight) egen length_std=std(length) reg price_std mpg foreign est store price reg weight_std mpg foreign est store weight reg length_std mpg foreign est store length coefplot price weight length, drop(_cons) xline(0) coeflabel(price="price" weight="weight" length="length") bycoef legend(off)
I've also attached a working paper I found online below with an example that mimics I want to produce (See Figure 3 on page 42). Source: https://www.nber.org/system/files/wo...785/w25785.pdf
Comment