Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Using mlabvposition command while generating coefplot from etsto command

    I want the mlab position to be at 10 o clock when the beta is negative and 2 o clock for positive beta. while plotting result from matrices allows me to do that through mlabvposition command, I am not able to do that when I am trying to generate coefplot from eststo.

    Attached Files

  • #2
    Here's your code. Please don't use attachments for this purpose (FAQ Advice #12).

    Code:
    coefplot ///
        (sub_sample_1, keep(treatment) aseq("0-5 years") mcolor(purple%50) msymbol(dot) msize(small) ciopts(recast(rcap) color(purple%70)) mlabposition(1)) ///
        (sub_sample_2, keep(treatment) aseq("6-15 years") mcolor(purple%50) msymbol(dot) msize(small) ciopts(recast(rcap) color(purple%70)) mlabposition(1)) ///
        (sub_sample_3, keep(treatment) aseq("16-35 years") mcolor(purple%50) msymbol(dot) msize(small) ciopts(recast(rcap) color(purple%70)) mlabposition(1)) ///
        (sub_sample_4, keep(treatment) aseq("36-55 years") mcolor(purple%50) msymbol(dot) msize(small) ciopts(recast(rcap) color(purple%70)) mlabposition(1)) ///
        (sub_sample_5, keep(treatment) aseq("55 above") mcolor(purple%50) msymbol(dot) msize(small) ciopts(recast(rcap) color(purple%70)) mlabposition(6)) ///
        (sub_sample_6, keep(treatment) aseq("Female") mcolor(black%50) msymbol(dot) msize(small) ciopts(recast(rcap) color(black%70)) mlabposition(1)) ///
        (sub_sample_7, keep(treatment) aseq("Male") mcolor(black%50) msymbol(dot) msize(small) ciopts(recast(rcap) color(black%70)) mlabposition(6)) ///
    , aseq swapnames legend(off) coeflabels(, wrap(40)) drop(_cons) xline(0, lwidth(medium) lcolor(red) lpattern(dash))  ylabel(, angle(horizontal) labsize(vsmall)) mlabgap(*0.5) mlabsize(vsmall) mlabel(cond(@pval<.01, string(@b, "%9.2fc") + "***", cond(@pval<.05, string(@b, "%9.2fc") + "**", cond(@pval<.1, string(@b, "%9.2fc") + "*", string(@b, "%9.2fc"))))) plotregion(color(white) fcolor(white)) scheme(white_tableau) headings("0-5 years"="{bf:Age group}" "Female"="{bf:Gender}" "Female 0-5 years"="{bf:Female age group}" "Male 0-5 years"="{bf:Male age group}", labsize(vsmall)) graphregion(margin(r=15 l=15)) ///
            xscale(range(-0.1 0.1)) ///
            xlabel(-0.1(0.05)0.1, labsize(vsmall))
    coefplot is from SSC, as you are asked to explain (same place).

    mlabposition() and mlabvposition() are options (not commands) of graph twoway, which coefplot should be able to use.

    coefplot is a great command, which I don't use. I can't see here a graph, or an error message, or a way to test your code without a data example.

    Perhaps someone else can work out what you're asking here -- or be able to tell you what other information they need.

    Comment

    Working...
    X