Announcement

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

  • Group identifier for individual panels: repeated time values within panel

    Hi all,

    I'm hoping to be able to get some guidance on a work-around for the repeated time values within panel error in Stata. In short, I'm working with a panel data set of 162 countries, for which I'm hoping to be able to run fixed effects on using both a time and panel id dimension. The time FE aspect is fine, as the sample is nicely balanced across 16 years. However, I've been hoping to construct a FE specification on regional indicators i.e. at the continent level. This has not so far been possible due to the repeated time values error. FE's at the country-level is too granular and dampens a lot of the variation in my data.

    I'm aware of a less elegant solution which would be just to run a regression on a set of dummy regional (continental) indicators i.e. Asia, North America etc. However, I was hoping to find a tidier method that would allow for the xtreg fe approach to be used, for the added benefit of continuity throughout my analysis but also the suppression of output coefficients for the FE variables.

    If anyone has any tips on getting Stata to work with a regional indicator type variable that comprises a number of the same time-variables (here year) across different individual panels, I would be greatly appreciative!

    Many thanks,

    Scott

  • #2
    You can just -xtset region- (with no time variable specified) and you will be fine for most purposes. Specifying a time variable with -xtset- is optional, and is only necessary if you plan to run analyses using autoregressive correlation structures, or use time-series operators like lags and leads. Otherwise, everything runs just fine.

    Let's also be clear, if you run -xtset country year- and then do something like -xtreg outcome predictors, fe-, that analysis includes only the country fixed effects. Time effects must be explicitly included in the model if you want them: -xtreg outcome predictors i.time, fe-.

    Comment


    • #3
      Hi Clyde,

      Thanks for the reply. That makes a lot of sense, and I'll incorporate your suggestion into my analysis.

      Thanks again,

      Scott

      Comment

      Working...
      X