Announcement

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

  • Issues with xtset using non-standard time variable

    Hello,


    I am working with a panel dataset where the time variable is not in a standard format like years or months. Instead, it follows a "year-round-match" structure (in Sports economics, about tournament), for example:
    • 19940908 (meaning 1994, 9th round, 8th match)
    • 20000102 (meaning 2000, 1st round, 2nd match)
    I am trying to use xtset id time, but I am concerned about how Stata will handle this non-standard time variable. Will this format be problematic for panel data analysis, especially for time-dependent models?

    Should I extract the year separately or handle the "year-round-match" structure in a specific way before declaring the panel data? Any advice or best practices from those who have handled similar cases would be greatly appreciated. (also I want to add fixed effects for round)

    Thank you in advance for your help!

  • #2
    How do best handle this depends, in part, on what analyses you are going to do and the role that the "time" variable(s) will play in that. If you are going to do time-series type analyses or use lags, leads, or autoregressive structure, then the structure you have now is not suitable. The biggest problem is this. I don't know how many matches there are in a round, but for purposes of discussion, let's assume it's 20. Then the problem is that although, in reality, 19990501 is immediately after 19990420, these numbers are not consecutive. So Stata will see this is a rather long gap in the time series, when in fact there is no gap at all.

    If, on the other hand, you won't need the kind of machinery mentioned in the preceding paragraph, then the existing variable might be fine for your purposes. Also remember that if you don't need that kind of machinery, you also don't need to specify a time variable in your -xtset- command anyway.

    I think for more specific advice you need to say more about what you hope to do by way of further analysis of this data.

    Comment

    Working...
    X