Dear all,
I use coefplot to show salary differences. With the code below I can display the values of the respective coefficients directly at each bar.
coefplot (c1, label(Total content: Unadjusted) pstyle(p1)) ///
(c2, label(total salary: adjusted) pstyle(p2)) ///
(c3, label(Base salary: Unadjusted) pstyle(p3)) ///
(c4, label(Base salary: Adjusted) pstyle(p4)) ///
, ci(95) vertical recast(bar) keep(male) barwidth(0.15) fcolor(*.5) ciopts(recast(rcap)) ///
citop xlabel("") xtitle("") ylabel(-0.02(0.04)0.22, format(%4.2f) labsize(small)) ytitle("") ///
title("") graphregion(color(white)) yline(0, lcolor(black) lpattern(dashed)) legend(cols(1) pos(6)) ///
addplot(scatter @b @at, ms(i) mlabel(@b) mlabformat(%4.3f) mlabpos(2) mlabcolor(black)) ///
aspectratio(2) ysize(2) xsize(1) scale(2) ///
save("$workdir/graph.gph", replace)
Now I want to convert the values to percentages and display them directly on the graph. For the transformation I use (exp( b )-1)*100.
How is it possible to integrate the transformed values as mlabels in coefplot?
I would be very grateful for an answer or any idea.
Best regards
Isea Cieply
I use coefplot to show salary differences. With the code below I can display the values of the respective coefficients directly at each bar.
coefplot (c1, label(Total content: Unadjusted) pstyle(p1)) ///
(c2, label(total salary: adjusted) pstyle(p2)) ///
(c3, label(Base salary: Unadjusted) pstyle(p3)) ///
(c4, label(Base salary: Adjusted) pstyle(p4)) ///
, ci(95) vertical recast(bar) keep(male) barwidth(0.15) fcolor(*.5) ciopts(recast(rcap)) ///
citop xlabel("") xtitle("") ylabel(-0.02(0.04)0.22, format(%4.2f) labsize(small)) ytitle("") ///
title("") graphregion(color(white)) yline(0, lcolor(black) lpattern(dashed)) legend(cols(1) pos(6)) ///
addplot(scatter @b @at, ms(i) mlabel(@b) mlabformat(%4.3f) mlabpos(2) mlabcolor(black)) ///
aspectratio(2) ysize(2) xsize(1) scale(2) ///
save("$workdir/graph.gph", replace)
Now I want to convert the values to percentages and display them directly on the graph. For the transformation I use (exp( b )-1)*100.
How is it possible to integrate the transformed values as mlabels in coefplot?
I would be very grateful for an answer or any idea.
Best regards
Isea Cieply
Comment