Announcement

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

  • Difference in Difference when treatment switching on and off

    Hello Statlist,

    I have a panel data for patients from year 2015-2019. The treatment started in 2017. There are several cohort of patients:
    1- cohort of untreated=those who never took treatment
    2- cohort of always treated=those who always took the treatment
    3- cohort of only 2017=those who take the treatment in 2017 but not in 2018 and 2019
    4- cohort of only 2018=those who take the treatment in 2018 but not in 2017 and 2019
    5-cohort of only 2019=those who take the treatment in 2019 but not in 2017 and 2018
    6-mixed cohort 2017 and 2018= those who take the treatment in 2017 and 2018 and not in 2019
    7-mixed cohort 2017 and 2019= those who take the treatment in 2017 and 2019 and not in 2018
    8-mixed cohort 2018 and 2019= those who take the treatment in 2018 and 2019 and not in 2017

    I want to see the effect of treatment on outcome1. Could you please show me how may I implement a DD model in this case where the treatment switches on and off? I appreciate your help.

    best,
    Mahmoud

  • #2
    DD isn't a thing when you're always treated. There's not basis to compare you to as a counterfactual, since we can't observe you before you were treated


    https://ideas.repec.org/p/zbw/iwhdps/52019.html

    Comment


    • #3
      I agree with Jared that you should drop cohort 2 because you need a pre-treatment period to get a convincing causal effect. But you can handle the rest. In my recent work, I have proposed an extension of the usual TWFE approach to allow for full flexible. Define cohort dummies that differ by first date and least date of treatment. So D_17_17 is one for cohort three, zero otherwise. D_17_18 is one for cohort 6. And so on. These can be interacted with the treatment dummy (which I call W) and the year dummies starting in the year of the treatment. You can find a simple example at my shared Dropbox:

      DiD with Exit

      My published paper on this is in the Econometrics Journal in the latest issue: "Simple Approaches to Nonlinear Difference-in-Differences with Panel Data."

      Comment


      • #4
        My friend and I actually have been looking for such an estimator... a DD estimator where the treatment may switch on, and off. Is that about what your paper discusses? Jeff Wooldridge

        That is, he was considering the impact of the Iran deal (treatment 1) and the subsequent sanctions (treatment 2). As you can likely imagine, we first considered SCM, but nobody that I know of has even touched that, yet. I know DD has done this, but I wonder how it would preform with one one unit being treated.

        Comment


        • #5
          Originally posted by Jared Greathouse View Post
          DD isn't a thing when you're always treated. There's not basis to compare you to as a counterfactual, since we can't observe you before you were treated


          https://ideas.repec.org/p/zbw/iwhdps/52019.html
          Thanks, Jared. I see your point. What I meant by "cohort 2 always treated" was "always treated after treatment started in 2017 and remain in the treatment group" meaning "no reversibility" in cohort 2.

          Comment


          • #6
            .

            Comment


            • #7
              Originally posted by Jeff Wooldridge View Post
              I agree with Jared that you should drop cohort 2 because you need a pre-treatment period to get a convincing causal effect. But you can handle the rest. In my recent work, I have proposed an extension of the usual TWFE approach to allow for full flexible. Define cohort dummies that differ by first date and least date of treatment. So D_17_17 is one for cohort three, zero otherwise. D_17_18 is one for cohort 6. And so on. These can be interacted with the treatment dummy (which I call W) and the year dummies starting in the year of the treatment. You can find a simple example at my shared Dropbox:

              DiD with Exit

              My published paper on this is in the Econometrics Journal in the latest issue: "Simple Approaches to Nonlinear Difference-in-Differences with Panel Data."
              Thanks Dr. Wooldridge, I will try to implement it with my data and will post the examples and codes here.

              Comment

              Working...
              X