Announcement

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

  • Parallel trends with multiple pre-treatment periods

    I am trying to run a DID and testing the parallel trends assumption. I have followed the explanation in this paper: https://mpra.ub.uni-muenchen.de/1193...per_119367.pdf

    Is my code correct?

    Code:
    * "treat" identifies treated units. Treatment was given in round 14
    
    gen treatpost= treat*(round>=14)
    
    gen time_to_treat= round - 14
    
    gen pre=1 if time_to_treat<=-2
    replace pre=0 if time_to_treat>-2
    
    gen post=1 if time_to_treat>=0
    replace post = 0 if time_to_treat <0
    
    reghdfe y pre#treat post#treat, absorb(hh_id i.round) vce(cluster state)
    My specific questions:
    1. Should I use treat or treatpost in the regression?

    2. The treatment was given at the state level (some states received the treatment), but the data and outcome variable of interest is at the individual level. I can't include individual fixed effects, because the dataset is huge. Is it ok to have household fixed effects (in the absorb option) as shown above?

    3. I get the following message: is this to be expected? Essentially only one coefficient remains in the pre-period (pre=0, treat =1). I am testing if this coefficient is different from zero. For parallel trends to hold, the coefficient should not be different from zero.
    note: 1.pre#0b.treat omitted because of collinearity
    note: 1.pre#1.treat omitted because of collinearity
    note: 1.post#0b.treat omitted because of collinearity
    note: 1.post#1.treat omitted because of collinearity


  • #2
    Parul:
    why not using -didregress- or -xtdidregress-?
    Kind regards,
    Carlo
    (StataNow 18.5)

    Comment


    • #3

      Code:
      * MAIN REGRESSION
      reghdfe y c.post#c.treat, absorb(hh_id round) cluster(state)
      
      * FALSE TREAT
      g fpost = post>=12
      reghdfe y c.fpost#c.treat if !post, absorb(hh_id round) cluster(state)

      Comment


      • #4
        Carlo: Sample size is very large, -didregress- takes very long, and -ptrends- is not working due to missing values in the panel.

        George: Is this for testing parallel trends. Why are we calling it "false treatment"?

        Comment


        • #5
          A false treatment can be used to evaluate parallel trends (there is no test for parallel trends).

          Here's a hard code of ptrends (a few ways) that may work for you.

          Code:
          * Example data:
          webuse hospdd , clear
          
          * Example model:
          didregress (satis ) (procedure), group(hospital) time(month)
          
          * Linear trends model results:
          estat ptrends, verbose
          
          bys hospital : egen evertreated = max(procedure)
          gen post = month > 3
          areg satis  i.month 1.post#1.evertreated       ///
                     i.post#1.evertreated#c.month,                ///
                     absorb(hospital) vce(cluster hospital)
                    
          reghdfe satis  i.month 1.post#1.evertreated       ///
                     i.post#1.evertreated#c.month,                ///
                     absorb(hospital) vce(cluster hospital)
                    
          g did = post*evertreated
          reghdfe satis i.post#1.evertreated#c.month, absorb(hospital month did) vce(cluster hospital)
          test 0.post#1.evertreated#c.month

          Comment


          • #6
            Parul:
            see this PowerPoint Presentation
            Kind regards,
            Carlo
            (StataNow 18.5)

            Comment

            Working...
            X