Announcement

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

  • Adding baseline reference to coefplot

    Dear all,

    I am trying to add a the baseline point to my coefplot. The baseline is period -1 in the eventdd command, but when I plot the coefficients I do not get a value of point estimate of 0 at the baseline -1 (i.e. on the X-axis).

    Here is my code:


    Code:
    eventdd sharearranged treatment educ_years  i.age_marriage i.district, timevar(timetotreat) inrange leads(4) lags(3) ci(rcap) baseline(-1)  graph_op(ytitle("share arranged" , size(small)) xtitle("Year since event", size(small))  legend(off)  scheme(s1mono)) coef_op(msymbol(Oh) mcolor(green)) method(ols, level(90))  cluster(district)
    //
    
    
    estimates store leads_lags
    
    
    
    
    
    coefplot leads_lags, keep(lead5 lead4 lead3 lead2 lead1 lag_0 lag1 lag2 lag3 lag4 lag5plus) vertical rename(lag4 ="3" lag3="2" lag2="1" lag1="0" lag0="0"  lead1 ="-1"  lead2 = "-2" lead3 = "-3" lead4 = "-4". lead5 = "-5") baselevels graphregion(color(white)) xline(5) recast(line) lw(medthick) lp(dash)  lc(ebblue) ciopts(recast(rcap)) xtitle("Year since event", size(small)) ytitle("Point Estimates for Share of Arranged" , size(small)) ysc(titlegap(1.6)) xsc(titlegap(1.6))
    However, the graph does not show the zero at -1, even when I change the rename of the axis. I attach a picture of the figure

    Any help would be appreciated, thank you very much in advance.

    Click image for larger version

Name:	Screenshot 2023-05-10 at 13.28.57.png
Views:	2
Size:	458.2 KB
ID:	1713099

    Click image for larger version

Name:	Screenshot 2023-05-10 at 13.28.57.png
Views:	2
Size:	458.2 KB
ID:	1713100
    Last edited by Enrique Alameda; 10 May 2023, 06:40.

  • #2
    Does anyone have any idea? I had a look through the help file and attempted everything from "baselevels" to "omitted" and "nodrop" to no avail.

    Comment

    Working...
    X