I would like to use coefplot to plot different regression results on the same graph. I would like to control the color of each coef plot but somehow I fail to do so. Typically I would like to present on the same graph the impact on the full sample and on two sub-groups. Here is an example:
Code:
sysuse auto.dta reg price mpg est store fs reg price mpg if foreign ==0 est store f0 reg price mpg if foreign ==1 est store f1 coefplot fs || (f0, offset(-0.15)) (f1, offset(+0.15)) ||, vertical bycoefs keep(mpg) nooffsets
Code:
coefplot fs, pstyle(p1) || (f0, offset(-0.15) pstyle(p2)) (f1, offset(+0.15) pstyle(p3)) , vertical bycoefs keep(mpg) nooffsets
Do you have an idea to give individuals color to each subgraph?
Thanks
0 Response to Coefplot colors across subgraphs
Post a Comment