Announcement

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

  • Wrong legend symbols for some labels under event_plot

    Code:

    event_plot ols sa_b#sa_v bjs dcdh_b#dcdh_v cs, stub_lag(L#event L#event tau# Effect_# Tp#) stub_lead(F#event F#event pre# Placebo_# Tm#) plottype(scatter) ciplottype(rcap) together trimlead(`lead') trimlag(`lag') noautolegend graph_opt(title("`var'", size(medlarge)) xtitle("Periods since the event") ytitle("Average causal effect", angle(horizontal)) ysc(titlegap(`titlegap')) xlabel(-`lead'(1)`lag') legend(order(1 "OLS" 3 "Sun-Abraham (2020)" 5 "Borusyak et al. (2021)" 2 "de Chaisemartin-D'Haultfoeuille (2020)" 4 "Callaway-Sant'Anna (2020)") rows(3) region(style(none)) size(small) ) yline(0, lcolor(grey)) ) ///
    lag_opt1(msymbol(+) color(cranberry)) lag_ci_opt1(color(cranberry)) ///
    lag_opt2(msymbol(O) color(purple)) lag_ci_opt2(color(purple)) ///
    lag_opt3(msymbol(Dh) color(navy)) lag_ci_opt3(color(navy)) ///
    lag_opt4(msymbol(Th) color(forest_green)) lag_ci_opt4(color(forest_green)) ///
    lag_opt5(msymbol(Sh) color(dkorange)) lag_ci_opt5(color(dkorange));

    Output:
    Click image for larger version

Name:	2023-04-05 23.11.40.png
Views:	1
Size:	91.9 KB
ID:	1708589





    How to make the last two label symbols correct?



  • #2
    Anyone can help? Thanks in advance!

    Comment


    • #3
      What should the legend symbols be in your view?

      event_plot is a command from SSC, as you are asked to explain (FAQ Advice #12).

      Its author Kirill Borusyak posted once here in 2018.

      If you don't get a detailed answer, you may need to contact him directly. I suspect he would much prefer to see a data example, as might anyone who has used the command (not me) who is reading this.

      Comment


      • #4
        Hi Akaguro I have the same problem, did you manage to find a solution?

        Comment

        Working...
        X