Announcement

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

  • Doubts about state- or individual-level FE

    Hello everyone,

    I am working with panel data for the years 2009 - 2019. My treatment is at the state-level (exposure to mass shootings), and my outcome (mental health) is at the individual-level.

    I am implementing a TWFE regression, however, I am a little unsure whether I should use FE at the state or at the individual level. For me it makes more sense to control for state FE, as there may be unobservables affecting both the likelihood of suffering a mass shooting, and also the mental health of individuals. Controling for individual FE is, for sure, more related with my outcome variable, but I do not think this can be related to the probability of being exposed to a mass shooting.

    I know this may be a very basic question, but I am somehow stuck with this. Thanks in advance for any advice!

    Best regards,
    Guillermo.

  • #2
    My take: Treatment is at state, so FE state/year. I suppose, if a true panel, you could run individual FE as a comparison, but I think state is the right FE. Cluster on state.

    Comment


    • #3
      Guillermo:
      welcome to this forum.
      As an aside to George's helpful advice, you may want to take a look at the community-contributed module -reghdfe-.
      Last edited by Carlo Lazzaro; 25 Aug 2026, 04:14.
      Kind regards,
      Carlo
      (Stata 19.0)

      Comment


      • #4
        George Ford and Carlo Lazzaro thank you very much for your answers!

        For the moment, I can only run the regular commands, as I have a problem with Stata and it is not allowing me to download any package.

        I have coded the regression as follows:

        xtset state_id // I have not included the wave indicator here, because stata shows "repeated time values within panel - r(451)"
        xtreg mental_ht treated i.wave, fe vce(cluster state_id) // does the i.wave here solves the problem of xtset?

        Would this be the right coding having in mind the temporary limitation I have with the software?

        Many thanks in advance!

        Comment


        • #5
          Guillermo:
          1) the -xtset- warning message is telling you that some of your observations have multiple entry on the same date. This is negligible, unless you are going to use the -time-series- related commands.
          2) -i.wave- add time fixed effect to you panel data specification. This is the way to go with the -fe- estimator, as it focuses on within-panel variation over time.
          3) the community-contributed module -reghdfe- allows multi-clustered standard errors.
          Kind regards,
          Carlo
          (Stata 19.0)

          Comment


          • #6
            if xtset is bugging on you, you have a data problem. look for duplicates or bad variables, or maybe the person id is the wrong one (a household id would give you dups).

            Comment

            Working...
            X