Announcement

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

  • Can I still control year dummy in xtpoisson/ppmlhdfe if one of my variables is year-based?

    Dear Statalist,

    Thank you for taking the time to read this post. My question pertains to whether or not to control for year dummies (i.year) in my unbalanced panel data. Any guidance would be greatly appreciated.

    I am working with unbalanced panel data and using FE Poisson/PPMLHDFE to explore my research question. My dataset has 110 cross-sectional units (N = 110) and spans 40 years (T = 40). My hypothesis posits that the U.S. changes its foreign policies during specific years. To account for this, I created a dummy variable, "ab_signal," representing these specific years and have interacted it with another identity variable, ally.

    Every unit receives a "1" for "ab_signal" during the years 1955-1961 and 1971-1978, while the entire data range is from 1950-1989. Given that "ab_signal" is intrinsically linked to year effects, I am wondering if I am still allowed/required to control for year effects in my model. My major concern is about the collinearity problem as you will see in the below figure.

    If I should not control the year effect, is this model still robust or reliable? I would appreciate any insights or advice on how to approach this question. Thank you again.

    Below is my current code:
    Code:
    ppmlhdfe milaid_21 i.ab_signal_3##i.ally X1it X2it X3it X4it X5it absorb(unit_id) vce(cluster unit id)
    Should I add year effect into the current model?
    Code:
    ppmlhdfe milaid_21 i.ab_signal_3##i.ally X1it X2it X3it X4it X5it absorb(unit_id year) vce(cluster unit id)
    After I control year-effect, ab_signal is omitted. As below:
    Click image for larger version

Name:	Untitled.png
Views:	1
Size:	67.6 KB
ID:	1729909


  • #2
    If what you are interested in is the effect of the interaction of ab_signal with ally, (which, based on your statement of your research goals seems to be the case) then
    Code:
    ppmlhdfe milaid_21 i.ab_signal_3#i.ally i.ally X1it X2it X3it X4it X5it absorb(unit_id year) vce(cluster unit id) // N.B. #, NOT ##
    will do that and avoids the colinearity problem.

    If, however, you need the "main" effect of ab_signal_3 itself, then this absolutely cannot be done in a model that includes year fixed-effects: don't even waste a femtosecond trying to figure a way to beat linear algebra. I can't comment on whether such a model without year effects would be sufficiently robust--that is a judgment call that would have to be made by somebody with content expertise in this area.

    But, I repeat, based on your stated aim, if I understood it correctly, there is no apparent reason to include a "main" effect of ab_signal_3 here.
    Last edited by Clyde Schechter; 11 Oct 2023, 20:58.

    Comment


    • #3
      Dear Clyde Schechter,

      Thank you so much for your insight; it's very helpful! The reason I need to include
      Code:
      i.ab_signal_3
      using
      Code:
      i.ally##i.ab_signal_3
      is that I want to examine the coefficient for scenarios where there is a "non-ally during those years," i.e., where (ally, ab_signal_3) = (0,1).

      Ultimately, I aim to investigate four different scenarios pertaining to US foreign policy. I hope this makes sense to you.

      Comment


      • #4
        I want to examine the coefficient for scenarios where there is a "non-ally during those years," i.e., where (ally, ab_signal_3) = (0,1).
        That does not require you to have ab_signal_3 as a stand-alone variable in the model. With the model I suggested in #2, the -margins- command can do things like -margins ally, dydx(ab_signal)-, which will give you the marginal effect of ab_signal for ally = 0 and for ally = 1, separately. Or if you really only want when ally = 0, margins, dydx(ab_signal) at(ally = 0)-.

        Comment


        • #5
          Dear Clyde Schechter ,

          Thank you so much for your advice! I tried your code, and the results were consistent across these two models. I had thought that PPMLHDFE couldn't handle the 'margins' command, but clearly, I was mistaken. I greatly appreciate your sharing this information with me. Thank you once again!

          Comment

          Working...
          X