Announcement

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

  • Coefplot issue

    Hi all,

    I have a quick question. My code is below. When I do this code without the "at(vertical)" part I get a normal looking graph (first picture). However, I would really like to have the coefficients on the Y axis and the months on the x-axis, so I added at(vertical) and the second picture attached happened. I am not sure how to make it look right. Ca n you help?

    Code:
    preserve
    keep if months_since_first_call>=-12 & months_since_first_call<=12
    tab months_since_first_call, generate(call_dummy)
    *labels
    label var call_dummy1 "-12"
    label var call_dummy2 "-11"
    label var call_dummy3 "-10"
    label var call_dummy4 "-9"
    label var call_dummy5 "-8"
    label var call_dummy6 "-7"
    label var call_dummy7 "-6"
    label var call_dummy8 "-5"
    label var call_dummy9 "-4"
    label var call_dummy10 "-3"
    label var call_dummy11 "-2"
    label var call_dummy12 "-1"
    label var call_dummy13 "0"
    label var call_dummy14 "1"
    label var call_dummy15 "2"
    label var call_dummy16 "3"
    label var call_dummy17 "4"
    label var call_dummy18 "5"
    label var call_dummy19 "6"
    label var call_dummy20 "7"
    label var call_dummy21 "8"
    label var call_dummy22 "9"
    label var call_dummy23 "10"
    reghdfe service_this_month call_dummy*, absorb(i.yearmonth i.mci) vce(cluster mci)
    coefplot, keep(call_dummy3 call_dummy4 call_dummy5 call_dummy6 call_dummy7 call_dummy8 call_dummy9 call_dummy10 call_dummy11 call_dummy12 call_dummy13 call_dummy14 call_dummy15 call_dummy16 call_dummy17 call_dummy18 call_dummy19 call_dummy20 call_dummy21 call_dummy22 call_dummy23) title("Effect of First Call on Services") ytitle("Coef.") xtitle("Months Since First Call") at(vertical) 
    restore
    Click image for larger version

Name:	coef1.png
Views:	1
Size:	81.7 KB
ID:	1639187

    Click image for larger version

Name:	COEF2.PNG
Views:	1
Size:	70.4 KB
ID:	1639188

  • #2
    replace at(vertical) with vertical

    Comment


    • #3
      Oh my goodness, thank you!

      Comment

      Working...
      X