Announcement

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

  • Help with xset command in panel data

    Hi, I am trying to set the data I have as panel data. I have defined the time variable, the individuals variable, dependent variable and independent variable's, and I think everything is good so far because summarize and describe commands are working well. Then, to set the data I have as panel data I have applied four commands but I will just show the first and the second because the second is wrong as STATA tells me:

    sort $Player_indiv $Season_time

    xtset $Player_indiv $Season_time

    ....

    Player_indiv and Season_time are the individuals variable and the time variable, respectively. STATA tells me "repeated time values within panel" in red. Then, when clicking on that, it pops up "invalid values for time variable. For instance, you specified mytime as a time variable, and mytime contains noninteger values." My time variable was in 2015, 2016, 2017, 2018, or 2019 and it is float type I have checked. Nevertheless, I transformed it into 1, 2, 3, 4 and 5 , but still it pops up the same error. My individuals variable is long type and it is the name's of the players (I do not know if that's the problem but anyways I thought it was useful information).

    Thank you.
Working...
X