Announcement

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

  • event study

    Hi all--I am working on an event study and wondering if something I am doing here is wrong. I have started by creating a variable called rel_date`x' that=1 if you are that many time periods away from the event date. For instance, if rel_date2=1 in my code below, this means that you are two time periods before the change_date (qtr is the qtr we are in and change_date is the event so qtr-change_date=-4 + 6=2). One question I have is why the coefficient for t=-6 is so far from the others--am I thinking of this model correctly? Thanks in advance.


    Code:
    * Relative year 7 is the event year
    forvalues change=1/1{
        gen diff`change'= (qtr - change_date`change')+6
        forvalues rel=0/19{
            replace rel_date`rel'=1 if diff`change'==`rel'
        }
        replace rel_date0=1 if diff1<=0
        replace rel_date19=1 if diff1>=19
        drop diff`change'
    }
    
    forvalues i=0/19{
        gen rel_date_x_diff`i' = rel_date`i'*diff_rate
        local var = `i'-6
        label var rel_date_x_diff`i' "`var'"
    }
    
    areg units rel_date_x_diff0-rel_date_x_diff4 o.rel_date_x_diff5 ///
        rel_date_x_diff6-rel_date_x_diff19 rel_date0-rel_date19 c.diff_rate i.qtr, a(group_provider_service)
    count if e(sample)
    coefplot, keep(rel_date_x_diff*) vertical base omitted msymbol(diamond) ///
            xtitle("QTR Relative to Price Change") ytitle("# of Units, unweighted")  ///
            mcolor("106 208 200") ciopts(lcolor("118 152 160")) note("N=`r(N)'")  title("Full sample") ///
            yline(0,lcolor("106 208 200") lpattern(dash)) xline(6, ///
            lpattern(dash) lcolor(red)) scale(.8) xsize(9) ysize(7) ///
            graphregion(fcolor(white) ifcolor(white) ilcolor(white)) ///
            xscale(lcolor("0 51 102")) yscale(lcolor("0 51 102")) coeflabels(, truncate(10) angle(45)) ///
            xlabel(, labcolor("0 51 102") noticks) 
    graph export ../output/es_units_diff_rate.pdf, replace
    Click image for larger version

Name:	statlist2.png
Views:	1
Size:	47.7 KB
ID:	1727270

    Attached Files

  • #2
    Have you looked for outliers or data coding problems?

    Drop the -6 observations and see what it looks like. Could be something strange in the way you are plotting. Might be that the -6 is capturing more than you intend (measuring something different than the others; like a constant term).

    also create a timesincetreat variable and just i.timesincetreat and your regressor.

    reghdfe will let you absorb the qtr.

    run it with eventdd to see if you get the same (you'll need timesincetreat for that).






    Comment

    Working...
    X