Announcement

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

  • How to test for assumption of parallel trend between treatment and control group in DID estimation?

    Click image for larger version

Name:	Dear statalist members001001.png
Views:	1
Size:	145.7 KB
ID:	1429613


    Thank you!




  • #2
    The gist of your proposed command is correct. But I would not use xi: to create dummy variables and interactions. -xi- is a now nearly obsolete command whose functions have almost entirely been replaced by factor-variable notation. Run -help fvvarlist- to read about that. There are still a few dusty corners of Stata where factor-variable notation is not supported, but most of those are ancient commands whose functions can be accomplished with newer commands that do allow factor-variable notation. There are also a few "exotic" situations with more modern commands where -xi- still is needed, but they are really uncommon. So you should more or less forget you ever heard about xi.

    Code:
    xtreg i.time##i.exp, fe
    xtreg i.time##i.exp the_year, fe
    The benefit of using factor variable notation is that you get to use the -margins- command afterwards. -margins- provides quick and painless interpretation of interaction models.

    Code:
    margins time#exp, noestimcheck // EXPECTED OUTCOMES EACH TIME IN EACH GROUPO
    margins exp, dydx(time) // MARGINAL EFFECT OF ONSET OF TREATMENT ERA IN EACH GROUP
    Note that I suggest using -xtreg- rather than -regress-. This is because you have panel data and you need to take that non-independent data structure into account.

    As for your question about parallel trends, the parallel trends estimation should include the covariates if and only if your final analysis does. That is, parallel trends estimation should be carried out using the same model as the final DID analysis.

    Comment


    • #3
      Thank you for your helpful comments, Dr.Schechter. I'll try as you suggested
      the most frequently used reference books for the study of Stata in Korea (Min& Choi, 2012, 2015) are still using the command 'xi' widely.
      I guess from now on I need to learn and practice more about this factor-variable notation as you recommand.
      And I'll also keep your comment on PTestimation in mind when I write my paper

      I again deeply appreciate your kind & quick comments.
      Dongseok


      Comment


      • #4
        Hello All,

        Clyde Schechter. I hope you are well! I recently created a new post in the general forum about the identification of parallel paths. At the moment, I am quite lost to be honest and I didn't find quite the right command for me. Could you perhaps help?

        The link to the post is the following https://www.statalist.org/forums/for...nce-estimation

        I thank you very much in advance. Best Regards,
        Hannes

        Comment


        • #5
          Hi all,
          I want to get the understanding of this post correctly before attempting a parallel trends test with panel data (annual) from 1990-2018. My cross-section identifier is c_id (identifying countries) and I have two countries. My equation for my DiD analysis is as follows:

          Exports = β0 + β1y2011 + β2country + β3y2011*Country + control variables+ ε

          where y2011 = 1 for observations from 2011 onwards, 0 otherwise
          Country = 1 for UK, 0 for Australia


          To conduct this test, would I therefore need the following code, if I were to follow the one given by Dongseok?

          Code:
          xtset c_id Year
          xtreg i.Year##i.Country,fe
          And I believe that you look at the p values to determine its significance and if the p value is shown to be insignificant for the coefficients before the policy intervention (2011 in my case) then the outcome trends for both groups are the same and we can conclude that the parallel trends assumption holds?

          Comment

          Working...
          X