Announcement

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

  • Using matching with DID for repeated cross sectional data

    I am new to STATA and working on repeated cross-sectional data for Difference-in-Difference analysis. I have treatment and control groups before and after the intervention. My treatment and control groups are, however, unbalanced (the covariates are significantly different across the two groups both in pre-and post-intervention). I, therefore, want to apply the matching technique to match the three groups (pre-treatment, pre-control, post-control) to my post-treatment group and then use DID. Any guidance about the STATA commands and references to papers that have applied this technique would be helpful.

  • #2
    Econometrically speaking, I wouldn't resort to matching on covariates if I were you. You may want to check out Zeldow and Hatfield (2021) and Arkhangelsky et al. (2021) to see why.

    You may want to check out community contributed commands sdid or scul.

    Comment


    • #3
      Thank you for replying. I will look at these references.

      Comment


      • #4
        I am the author of scul, and if you decide to use it, I do not recommend you use covariates in the estimation process. I give the user the option to do so should they want to, but it really isn't needed and is arguably undesirable. I'm also not understanding the matching technique you discuss. You write
        I, therefore, want to apply the matching technique to match the three groups (pre-treatment, pre-control, post-control) to my post-treatment group
        This isn't how it works! If this were machine learning, we'd say this is training your model on your test data. You want to match on pre-intervention qualities only. In fact, let me give an example of doing just this. This will be an excerpt from my SJ paper, which has recieved very good feedback from the reviewers. Consider the Proposition 99 example for synthetic controls. If you haven't, install lassopack if you wanna follow along with me.
        Code:
        version 17
        //set varabbrev off
        
        clear *
        
        set scheme sj
        
        use "https://github.com/scunning1975/mixtape/blob/master/smoking.dta?raw=true", clear
        
        xtset state year, y
        
        loc int_time = 1989
        
        local lbl: value label `r(panelvar)'
        
        
        loc unit ="California":`lbl'
        
        g treat = cond(`r(panelvar)'==`unit' & `r(timevar)' >= `int_time',1,0)
        lab var cigsale "Cigarette Sales"
        lab var year "Year"
        
        lab var treat "Proposition 99"
        
        
        /*#########################################################
        
            * Figure 1
        
            Creates a SC using OLS and SCM
        *########################################################*/
        
        *** SCUL
        keep cigsale state year
        
        label var year "Year"
        
        qui greshape wide cigsale, j(state) i(year)
        
        tsset year
        
        order cigsale`unit', a(year)
        cls
        cvlasso cigsale`unit' cigsale1-cigsale39 if year < `int_time', lopt h(5) lglmnet roll
        
        predict cf, lopt
        
        keep year cf cigsale`unit'
        
        label var cigsale "Real California"
        
        label var cf "SCUL California"
        
        twoway (tsline cig, lcolor(black)) ///
        (tsline cf, lcolor(red) lwidth(medium) lpattern(shortdash)) //
        What I am doing here, is I am fitting a LASSO to the treated unit of interest (California) predicting from 1970 to 1988, since the intervention took place in 1989. If you do any matching here, you'll wanna match on pre-treatment characteristics only, not on post outcome values.

        Comment


        • #5
          Dear @Bhawna Taneja; I face also the same problem. If someone has a way to find its application using STATA.
          Originally posted by Bhawna Taneja View Post
          I am new to STATA and working on repeated cross-sectional data for Difference-in-Difference analysis. I have treatment and control groups before and after the intervention. My treatment and control groups are, however, unbalanced (the covariates are significantly different across the two groups both in pre-and post-intervention). I, therefore, want to apply the matching technique to match the three groups (pre-treatment, pre-control, post-control) to my post-treatment group and then use DID. Any guidance about the STATA commands and references to papers that have applied this technique would be helpful.

          Comment

          Working...
          X