Announcement

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

  • Difference in difference analysis (different treatment dates)

    Hi all,

    I'm at the moment in the exhausting process of writing my master thesis and I stumbled upon this problem while trying to perform a difference-in-difference analysis.

    I've a dataset in which I have basically a variable CTX and a variable CTX_firm.
    In the years when CTX is not implemented in the firm,* it contains the value "0". In the year when it is implemented and the years thereafter, it contains the value "1". If CTX is implemented in the period 2000-2013,* I call it* a CTX firm and thus the variable CTX_firm is "1" for all firm years (treatment group) and "0" if a firm has not implemented CTX yet (control group).

    Therefore,* three situations are possible:
    A firm has for all years (2000-2013) a "0" and for all years the firm is thus not a CTX firm and the variable CTX firm contains thus a value "0" (control group).

    A firm has for specific years a "0"(pre treatment period - not implemented ctx yet)) and for a couple of years value "1" (post-treatment perio, implemented ctx) and for all years the value "1" for the variable ctx_firm(treatment group).

    I'm using the following model:
    a +* b1*CTX_firm +* b2*post_treatment* +* B3 (CTX_firm x post_treatment) + e**

    The problem however is that the control group didn't implement CTX in the period 2000-2013.* However,* the treatment groups firms who did implement CTX didn't do it all at the same time.* One did it in 2003, one in 2008 and so on.

    Therefore, I am stuck right now. Is it for example safe to just compute an average year of implementation, like for example 2006 is the average,* and compare control groups and treatment groups before and after 2006.* This is not really accurate, so I hope you have a better solution for me.

    Thanks in advance.
    Last edited by Arnold Vasquez; 03 Jun 2015, 07:19.

  • #2
    Why do you want to do a difference-in-difference analysis? It doesn't seem particularly well suited to your application.

    Also, as you describe the variables, post_treatment is equal to CTX_firm x post_treatment, so there's no reason to include the second one.

    Comment


    • #3
      Hi Arnold,

      What are you trying to ascertain here? How many CTX and non-CTX firms do you have? As Liam points out, it seems that only CTX firms can actually take on a value of "1" for the post-treatment variable, so adding the interaction term does not get you any new variation.

      My immediate thought is to use only CTX firms in the regression and use the pre-implementation period as a comparison group, but this would really depend on how many observations you have and what you want to know.

      Best,

      Josh

      Comment


      • #4
        help

        Comment


        • #5
          As a profession we have failed teaching so-called "diff-in-diffs," and I have to accept some blame. With panel data, diff-in-diffs is a special case of a general methodology. Simply define a dummy variable for each (i,t) combination. It takes the value 1 if firm i at time t was subject to the treatment, and zero otherwise. This is CTX_firm*post_treatment, but you should just define a new variable, called "treat" (say). You do not need to include post_treatment separately because you should include instead a full set of year dummes. You do not need CTX_firm on its own because you should use fixed effects at the firm level. So I would do this:
          Code:
          xtset firmid year
          gen treat = CFX_firm*post_treatment
          xtreg y i.year treat, fe cluster(firmid)
          In the T = 2 case with a before-after period, this produces exactly the diff-in-diffs estimate. But this is general as it allows different treatment times. You can even include a lag, such as L.treat, to see if there are lasting effects. You can add any controls you want in the general case.

          An example of this methodology is given in Example 14.1, Chapter 14, of my book "Introductory Econometrics: A Modern Approach," 5th edition, Cengage Learning, 2013.

          I hope this helps.
          JW

          Comment


          • #6
            Hello,
            Sorry to ressurect this old thread but I don't understand what is the variable "post_treatment" in this example. Is it not the same that "CTX" ?

            Thanks
            Peter

            Comment

            Working...
            X