Announcement

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

  • Difference between DiD and two-way fixed effects model

    I am currently writing my master thesis, where I analyze the effect of hurricanes on the stock market. I have an unbalanced panel dataset with stock returns over several days prior to and after each hurricane over a time frame of several years. I created a dummy variable "hurricane" taking the value 1 if the stock is affected that day by a hurricane, 0 otherwise. I included time-fixed as well as firm-fixed effects and clustered the standard error on firm-level. I have run the following regression as a baseline model:

    xtreg RET i.hurricane i.date, fe vce(cluster PERMNO)

    Some stocks are never affected, whereas others are affected once or even multiple times. The dummy is intermittent (switches "on and off")

    Question:
    My understanding is, that this variable can be seen as the interaction term post*treated in the diff-in-diff model, is that correct? Is the TWFE model equivalent to the generalized DID?

    Any help would be highly appreciated!! Have a great NYE!



  • #2
    My understanding is, that this variable can be seen as the interaction term post*treated in the diff-in-diff model, is that correct? Is the TWFE model equivalent to the generalized DID?
    Your understanding is correct. Two-way fixed effects models, by themselves, are not equivalent to generalized DID, but when you add a variable like hurricane, calculated the way you have done it, to a two-way fixed effects, then you have a generalized DID model.

    Many people have told me that they find the following reference helpful for understanding generalized DID: https://www.annualreviews.org/doi/pd...-040617-013507.

    Happy New Year to you, too.

    Comment


    • #3
      Thank you so much Clyde, I truly appreciate your help and quick response even on NYE!! I have posted another question regarding the interpretation of the constant, do you by any chance have an answer to that as well? I am approaching the deadline of submitting my thesis very soon and due to that, I am a little stressed.

      Comment


      • #4
        One thing I would recommend with this design, if you've got the aptitude, is to use one of the newer event study designs.

        Comment


        • #5
          Clyde Schechter I have another question regarding the generalized diff-in-diff and two-way fixed effects. In one of my results, I test if pre- and post-hurricane landfall, the stock market reacts already, i.e., based on new information (dynamic treatment effect) . I find an effect already prior to the hurricane landfall date and post as well. One key condition of the diff-in-diff though is the parallel trend assumption, which is often tested with leads. According to my research, the coefficient for leads would need to be insignificant, but they are not. Is this a problem? Can I still say it is a diff-in-diff?

          Comment


          • #6
            It is still a DID model. If the parallel trends assumption fails, then causal inference fails with it. You do not show how you tested the parallel trends assumption, so I cannot say whether you have done that in a suitable way or not. But, frankly, I'm not surprised that it fails:

            Hurricanes, in the modern world, do not come out of the blue. Satellites spot them as soon as they are born as tropical depressions. Their courses are tracked, and by the time they are a few days from landfall we usually have a fair idea of where and when they will make landfall and how severe they are likely to be when they do. So it does not surprise me that any outcome variable that is subject to influence by human behavior (and the short term behavior of the stock market is nothing but the influence of human behavior) will show anticipatory effects. So I think that a DID model that is predicated on an effect that abruptly begins when the hurricane arrives is a serious misspecification of what's going on in the real world.

            The solution that comes to my mind would be to use a model that seeks to identify these anticipatory effects. Just how to do that is a substantive question I can't answer. I'm neither an economist, financier, nor meterologist. But it seems to me that if you can dig up the history of each hurricane and revise the model to look for effects beginning the first day that meteorologists were predicting an impending hurricane strike, rather than the day it actually struck, such a model would be more realistic. But I don't know how or where you would find that data, nor is it clear to me how to define that operationally. So, I think what you need at this point is advice from people with expertise in the content areas of the stock market and hurricane forecasting. This is no longer a question about statistics or Stata.

            Comment


            • #7
              Dear Clyde Schechter

              I read the paper you had linked in #2 and I find it really helpful, so thanks for that! I just have one question: on p. 460, when they introduce time-varying treatment effects, how can I interpret the coefficients on the leads and lags of the event? From other literature (e.g. Miller (2023)), I know that most commonly we omit the year before the event onset and use it as the reference. So do the post-event coefficients give the change in the outcome for the treatment group in e.g. the post-event year t+2 relative to t-1? Or can I interpret these coefficients also in relation to the change in outcome of the control group? I am quite confused what role the control group plays in such time-varying treatment effect regressions. In the standard DiD, it is clearer to me - the DiD coefficient gives the difference in outcome post vs. pre for the treatment group versus the control group. But with the dynamic treatment effects, the role of the control group when interpreting the dynamic effects becomes unclear.

              I appreciate any help!

              Comment


              • #8
                So do the post-event coefficients give the change in the outcome for the treatment group in e.g. the post-event year t+2 relative to t-1?
                In a word, yes. The post-event coefficients represent the changes in the treatment effect over time. The coefficient they call delta is the immediate effect of the onset of treatment. The other time-period coefficients are all effects relative to that.

                In this kind of model it is best not to think in terms of treatment and control "groups." It will sometimes, perhaps, often, be the case that all of the observed units will receive treatment at some point in time, so that there is no "control" group in the usual sense at all. There are treatment and control conditions and the various units are in one of those conditions at each time point, and some or all of the units cross over from the control to the treatment condition at a given time point and then remain there.

                Comment


                • #9
                  Dear Clyde Schechter

                  thank you. In my setting, I actually do have a case in which only one group receives treatment at all and all others never receive it. Those who receive it receive it at the same point in time. So, if I understand you correctly, in this setting I could still think in terms of treatment and control group/condition. I would interpret the coefficients on the event dummies as the difference in the outcome variable between treatment and control group at time t relative to t-1. So, if e.g. the coefficient is 0.1 in 2016 and the event was in 2015, I would say the difference in the oucome variable between TG and CG is in 2016 0.1 units higher than in the baseline period 2014. Would this be correct in this (special) setting?

                  Comment


                  • #10
                    Yes.

                    Comment

                    Working...
                    X