I'm currently running a series of regressions using US State data. So far, I've created my data necessary transformations for each state, made state labels, appended these 50 files into one .dta file, and estimated my regressions. These regressions are specific for each state, and I want to use Coefplot to illustrate them.
Code:
egen state_no=group(state), label forval no=1/50{ quietly reg y x if state_no==`no' eststo b_`no' } coefplot b_*, vertical legend(off) drop(_cons)
The plot is decent, however, I want each b_`no' to be a state. Essentially, b_1 is Alabama, b_2 is Alaska, etc. How can I show this in my Coefplot? Additionally, is it possible to order the coefficient estimates from smallest to largest in the graph? Thank you for your help!
0 Response to Plotting Different Regression Values in One Graph with Coefplot
Post a Comment