Announcement

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

  • CSDID Triple Difference Option?

    Hello Stata Community!


    I'm new to Callaway and Sant'anna's CSDID/DRDID package. I have two hypotheses with staggered treatments. I've used the CSDID command successfully on my first hypothesis, but I am thinking that I need a triple difference model for my second hypothesis.

    I am wondering if there is a way that I can force the CSDID command to accept an interaction term. The way that we specify the treatment, gvar(), makes me uncertain of whether this will work.

    My variables are as follows:

    factory - 0 for every year before the unit gets a factory and 1 for every year after it gets its first factory
    foodprices - a continuous variable of the global food market price in a given year
    foodpricesXfactory - an interaction term of the above two variables.
    firsttreated - the gvar() specification variable for the first year that a given unit gets its first factory and 0 for all units that never get a factory
    unrest - my outcome variable which captures the count of protest in a given unit-year

    My general model that I am attempting via CSDID is:

    Y = β1Factory + β2Food Prices + β3(Factory x Food Prices) + ε


    When I put it into the Stata command, it looks like:

    csdid unrest factory foodprices foodpricesXfactory, ivar(unit) time(year) gvar(firsttreated)


    This command runs, but I am not sure that it is outputting intelligible results. If not, I am not sure how to account for a staggered treatment in other Stata DID packages. Could someone provide insight on whether this regression is properly handling the interaction term considering the structure of the command?

    Thank you so much and please respond if any clarification is needed!

  • #2
    Csdid doesn’t allow for triple differences
    the only way, and only partially a ddd, is to run csdid over the two subsamples and then compare the estimates

    Comment


    • #3
      Hello Fernando,

      I would like to save an aggregate coefficient from csdid regression as a variable. I run the following code, but Stata produces an error (variable ATT not found) after the command ren ATT ATT_g1:

      csdid lemp if g1==1, ivar(countyreal) time(year) gvar(first_treat) saverif(f1) replace

      use f1, clear
      csdid_stats simple, save
      ren ATT ATT_g1
      save f1, replace

      Any help with fixing this problem would be greatly appreciated.

      Thank you.
      Iryna

      Comment


      • #4
        Hi Iryna
        This addition of "save" was very recent. Start by making sure you have the latest version of the program (1.72 csdid 1.71 drdid)
        Thank you

        Comment


        • #5
          Thank you so much Fernando for your help. I installed the latest version of csdid and the code works now.

          Comment


          • #6
            I am using Callaway and Sant'Anna (2021) to estimate cohort-specific AATs. However, I also like to find out how another variable impacts the group-time ATTs through the treatment variable. Using TWFE, I would probably interact (PosttXDi) with the third variable. However, this is not allowed when I use the csdid command. Is there a way I can interact the cohort-specific dummy with another covariate that is possibly time varying to estimate how it impacts on the group-time ATT?

            Comment


            • #7
              And if csdid does not allow interaction with the group-time variable (gvar), is there another way around this issue or another estimator (in the family of staggered DID estimators) that would allow this interaction? Thank you

              Comment


              • #8
                Did2s may allow this
                also jwdid although this one doesn’t provide aggregations, just the interactions with cohort period specific attgts

                Comment


                • #9
                  I am trying to evaluate the impact of a program. The treatment was given in 3 different phases. My main specification is as follows

                  Model 1: Y= Treat + Post + Treat#Post + Set_of_Controls

                  Now I would like to implement CSDID.

                  I have created my gvar to take the year of treatment for the regions as per phases. There is no 0, as all received treatment in some period. This is how I have implemented the same using CSDID

                  csdid Y Set_of_Controls, time(year) gvar(gvar)


                  Now I have a second hypothesis. Where I believe that only households of a certain kind would be impacted by the policy. I call these households FB_Female, which I have defined as a dummy variable. For this my specification is:

                  Model 2: Y= Treat + Post + FB_female + Treat#Post + Treat#FB_Female +FB_female#Post + Treat#Post#FB_Female + Set_of_Controls

                  Can the gvar be altered to take the value 0 if it is not FB_female household and then implement CSDID using the updated gvar just as above?

                  Comment

                  Working...
                  X