Announcement

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

  • -Coefplot- Rotating Graph

    Dear all:
    I installed -coefplot- by Ben Jann and would like to rotate the graph so that the educational group appears on the x-axis and the wage gap in the y-axis.
    How should I change my code to rotate the graph correctly?

    Code:

    reg lwage i.foreign##i.educ i.gender exp [aw=factor], r
    margins [aw=factor], dydx(1.foreign) at(educ = (1/4)) post
    estimates store With_controls
    reg lwage i.foreign##i.educ [aw=factor], r
    margins, dydx(1.foreign) at(educ = (1/4)) post
    estimates store Without_controls
    coefplot With_controls Without_controls, ///
    title("Panel A: Wage gap", color(black) size(small)) ///
    xline(0) ///
    ytitle("") ///
    xtitle("Wage gap (log)", size(small)) ///
    rename(1._at="Less Than High School" 2._at="High School Completion" ///
    3._at="Technical Education Completion" 4._at="College Completion") ///
    ylabel (,angle(horizontal) labsize(vsmall)) ///
    xlabel(,angle(0) format(%03.1f) labsize(vsmall) nogrid) ///
    legend(order(2 "With controls" 4 "Without controls") ///
    position(6) rows(1) size(small)) ///
    saving("$outR/Wage_A1", replace)

    Click image for larger version

Name:	Figure9ALL_A.png
Views:	1
Size:	13.0 KB
ID:	1767881

    Thanks in advance!

  • #2
    coefplot is from SSC (FAQ Advice #12). Let's see a reproducible example.

    Comment

    Working...
    X