Announcement

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

  • Controlling for pre-treatment variables in Difference-in-Difference

    In a classical Difference-in-DIfference, a common advice is to include pre-treatment covariates to improve parallel trends.
    Let's say the data starts in 1990 and treatment in 1993 and that the variable I want to control for is population. I am not sure which is the best way of including those controls:

    1. Alternative 1
    reg y treated post treated_post population1990 population1991 population 1992

    2. Alternative 2
    Recode population so that values since the treatment years are equal to the last pretreatment year value.

    Are there other alternatives?
    Do you know any paper or post about it?



  • #2
    Alternative 1 is better.

    Alternative 2, to me, makes no sense. It constrains the model to be valid only for entities whose population became frozen at its 1992 level for the rest of time. That is a very unnatural constraint on the model for which, I imagine, you have no evidence. And, in fact, I suspect if you were to obtain population data from 1993 and onward the probability is something like 10-1000000 that it would follow that bizarre pattern.

    Comment


    • #3
      Thanks, Clyde!
      Does Alternative 1 have the problem that population1990, population1991, and population1992 will not vary by the unit in the panel and, consequently, will be absorbed by the unit-Fixed-Effect (then, dropped from the equation)?

      Comment


      • #4
        Sorry, yes, it does have that problem. I was focused on the causality issues (see next paragraph) and forgot we were talking about a fixed-effects model.

        The concern about using covariates in these models arises from the possibility of reverse causality. If the intervention itself influences the covariate (either directly or indirectly through its effect on the outcome) then you will not be getting consistent estimates of the intervention effect when the covariate is included. You have not explained the context of your analysis, but do you really have a concern that your intervention will have an effect on population, either directly or indirectly through the outcome? If there is no such concern, then the best solution is to just include in each observation the population of that entity in that year. If, however, there is such a concern, then I don't know of any way to adjust for population in this kind of model.

        Comment


        • #5
          Thanks again, Clyde!
          You are correct. My treatment should not affect population.
          Let's say I want to include pre-treatment controls that should be affected by the treatment. Consequently, I should not include them directly. In this case, what would be the best way to calculate them and include them as pre-treatment controls?

          Comment


          • #6
            Let's say I want to include pre-treatment controls that should be affected by the treatment. Consequently, I should not include them directly. In this case, what would be the best way to calculate them and include them as pre-treatment controls?
            I do not know of a way to do this using a fixed-effects model. You might consider a random-effects model, if you can accept its downsides. Another possibility, retaining a fixed effects model, is to match on the pre-treatment covariates, though doing that with panel data can be complicated, and you risk shrinking and biasing your data by virtue of cases that have no acceptable match in the untreated group.

            Comment


            • #7
              There are a couple of things going on here. I assume this is panel data; the issue is a little different for repeated cross sections. With panel data, as noted earlier, adding time-constant variables does nothing because the estimation is by fixed effects (or some equivalent regression method). Relaxing the PT assumption requires you to interact the time constant variables with the time dummies. Do this with any other time-constant controls. And, if you want full flexibility, you should interact the treatment variable treated_post with the x variables, too (population in your case). This is exactly what the user-written jwdid command does (based on my 2021 working paper, "Two-Way Fixed Effects, the Two-Way Mundlak Regression, and Difference-in-Differences Estimators). A more recent version is here. If you have Stata 18, you can use xthdidregress twfe.

              The Callway-Sant'Anna approach, which can be implemented using the user-written command csdid, is similar, but it includes all pre-treatment indicators and, consequently, only uses the period just before the intervention as the reference period (1992 you your case).

              Code:
              gen first_treat = 0
              replace first_treat = 1993 if treat
              jwdid y population1990 population1991 population1992, ivar(id) tvar(year) gvar(first_treat)
              This assumes you have a cross-sectional identifier called "id." This command estimates the "extended two-way fixed effects" model described in my paper.

              Comment


              • #8
                Yes, the TW Mundlak regression! Thanks for your answer, Professor Wooldridge. I will try that one.

                Comment

                Working...
                X