Announcement

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

  • Using xtdidregress to do DID with firm panel data

    Hi,
    I have a 10 year almost balanced dataset of 1200 firms. I want to assess the effect of some firms getting a treatment on their profitability. The treatment for some of the firms in a specific period is that they receive support money from the government. However the problem I have is that firms can receives the money in any of the 10 periods. Can I in this situation still identify the ATET with DID (in this case the xtdidregress command) or does treatment have to be in the same period for all firms?
    Best,
    Tom

  • #2
    Dear Tom,

    You can use -xtdidregress- to fit a model in which treatment is not in the same period for all firms. This would be equivalent to using fixed effects regressions including time dummies. It is what is referred to as two-way fixed effects or generalized difference-in-differences. You would type something like:

    . xtdidregress (outcome) (treatment_indicator), group(firm) time(timevar)

    Above, treatment_indicator is an observation-level indicator (not a group level indicator) that identifies an observation as treated. In the first parenthesis you put your outcome of interest.

    Interpreting this estimate as the ATET assumes that the treatment effect for the firms across time is homogeneous. There is a growing literature that is skeptical about this assumption and provides some alternatives. You could look into the community contributed command -bacondecomp- as a diagnostic of heterogeneity in treatment. If heterogeneity is a concern, you may want to look at the community contributed command -csdid- which looks into the Callaway and Santana estimation for heterogeneous treatments. You may also want to look into the Stata code provided by https://sites.google.com/site/clementdechaisemartin/. Additionally, Jeff Wooldridge proposes a two-way fixed-effects-type estimation using a Mundlak device to tackle heterogeneity, I however, do not have the latest version of his paper. There are other researchers working in this area currently and I do not do them justice by not mentioning them here. I am mentioning only the ones I am most familiar with.

    Comment


    • #3
      Thanks Enrique,
      I will follow this procedure. One thing however that I still don't understand in this case and which makes me worry a little is that if treatment is in different periods for the treated firms, how does the software determine the pre and post treatment periods for the untreated/control group?
      Best wishes,
      Tom

      Comment


      • #4
        Tom: The variable "treatment_indicator" should be defined so that it is one if and only if a unit is treated in the particular time period. Then, it just uses the usual TWFE estimator.

        If you're interested, here's a link to a Dropbox folder that contains a paper (which I'm currently revising) and some Stata files that show how to allow staggered interventions with TWFE.

        Staggered_DID

        Comment


        • #5
          I have Survey Panel Data of 6000 households, with 400 Primary Sample Units(PSU) wave 1, wave 2 and wave 3. Some PSU receive seasonal labor while other does not. Receiving seasonal labour is not systematic in the sense that
          Some PSU receives seasonal labor only in wave 1, around 21 PSU, some receive only in wave 2, around 16 PSU, and 88 PSU receive seasonal labor only in wave 3. Rest of the receiving PSU receive in mix of the waves .i.e 16 PSU receive in wave 1 and 3, 10 PSU receive in wave 1 and 2, 56 PSU receive in wave 2 and 3 while 27 PSU receive in all waves. My outcome variable is at the household level say expenditure on hired labour, and the interest variable is receiving seasonal labour which is at PSU level. Unbalanced Panel. Can I establish a causal relationship between the two? What would be the best strategy if it is possible? The data comes from Survey Data not RCT, meaning seasonal labor receiving is characteristic of the community we observed not a policy intervention.

          Comment


          • #6
            Hello Professor Wooldridge. I have read your paper titled "Two-Way Fixed Effects, the Two-Way Mundlak Regression, and Difference-in-Differences Estimators" and I have some queries (sorry if the questions look silly. I am not from economics background so these things are somewhat difficult for me to understand).

            1. How does the aggregation of ATTs work in staggered treatment setup that you have proposed ?
            2. How can we write the model, in case of staggered treatment, in terms of a regression equation ?
            3. Can we interact the the DID coefficient with another variable ?

            Comment


            • #7
              Originally posted by Enrique Pinzon (StataCorp) View Post
              Dear Tom,

              You can use -xtdidregress- to fit a model in which treatment is not in the same period for all firms. This would be equivalent to using fixed effects regressions including time dummies. It is what is referred to as two-way fixed effects or generalized difference-in-differences. You would type something like:

              . xtdidregress (outcome) (treatment_indicator), group(firm) time(timevar)

              Above, treatment_indicator is an observation-level indicator (not a group level indicator) that identifies an observation as treated. In the first parenthesis you put your outcome of interest.

              Interpreting this estimate as the ATET assumes that the treatment effect for the firms across time is homogeneous. There is a growing literature that is skeptical about this assumption and provides some alternatives. You could look into the community contributed command -bacondecomp- as a diagnostic of heterogeneity in treatment. If heterogeneity is a concern, you may want to look at the community contributed command -csdid- which looks into the Callaway and Santana estimation for heterogeneous treatments. You may also want to look into the Stata code provided by https://sites.google.com/site/clementdechaisemartin/. Additionally, Jeff Wooldridge proposes a two-way fixed-effects-type estimation using a Mundlak device to tackle heterogeneity, I however, do not have the latest version of his paper. There are other researchers working in this area currently and I do not do them justice by not mentioning them here. I am mentioning only the ones I am most familiar with.
              Hello, in what version was xtdidregress introduced? Thank you!
              Last edited by Nazzarena; 07 Oct 2024, 11:06.

              Comment


              • #8
                never mind, the IT service finally was able to locate the right license files for v18.

                Question: why the time variable must be nonnegative. In my case I have
                a- continuous values outcome
                b- group variable
                c- time variable that can be construed as exposure
                d- identifier (it's not individuals in a population, it's dimensions in one person, but the idea is similar, it's panel data)
                so i wanted to know if there are different trajectories in a according to b, after the event at the origin of c was detected
                xtdidregress (a) (b), group(d) time(c)
                wont run. I can certainly define d from the start of the observations, but the difference should be more meaningfully different between the group after the event occurred
                Again I am not trying to model a, but whether the change of a in time after vs. before c differs by b


                many thanks!

                Comment

                Working...
                X