![]() ![]() What's the best way to change the color of just the coefficient for the reference category?Ĭode: * Example generated by -dataex. But I think in this case, the graphs would end up next to each other rather than on top each other (like in the one from this example: ) Another way I could think of doing it is running the original regression, storing those estimates, and then running a regression that only graphs the baseline and then laying them on top of each other. I've tried something like (baselevel, mcolor(red)), where I get "invalid 'mcolor'". Recast(connected) lpattern(dash) xlabel(, angle(90))The baselevel option is the one that shows the coefficient for the reference year (2003). Xline(5, lpattern(solid) lcolor(black)) graphregion(fcolor(white)) /// (If so, please report back here!) And then, you should have what you need for your actual application.Īdded in edit - the author's original Stata Journal article is available for free download at and perhaps among the extensive writeup there will be found some relevant examples.Code: reghdfe lhsvar ib0.1#ib2003.year ///Ībsorb(country) vce(cluster country#year) If not, perhaps you can alter the second two examples to produce success. Perhaps the first two examples suffice for you. Or, possibly, the options need to be placed differently, although I admit the section of the help titled "Placement of options" did not reveal to me the problem with my naive code.īut for me this would all now be trial and error. For g3 and g4, though, the graph combine that is obviously used to produce the array of plots does not seem to notice the options. The results were as I hoped for g1 and g2. Regress price mpg headroom trunk length turn if foreign=1Ĭoefplot domestic foreign, drop(_cons) xline(0) graphregion(color(white)) bgcolor(white) name(g2)Ĭoefplot domestic || foreign, drop(_cons) xline(0) graphregion(color(white)) bgcolor(white) name(g3)Ĭoefplot domestic || foreign, yline(0) bycoefs vertical byopts(yrescale) graphregion(color(white)) bgcolor(white) name(g4)Copy this into your do-file editor and run it. Regress price mpg headroom trunk length turn if foreign=0 Regress price mpg headroom trunk length turnĬoefplot, drop(_cons) xline(0) graphregion(color(white)) bgcolor(white) name(g1) ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |