Hi,

I have election data for a country. I am trying to set a panel but as each place has multiple candidates, I have repeated time values. I can not set my panel on candidate level as they do not always repeat. I want to conduct my analysis at county level. A sample of structure of the data is placed below:
Year State County Constituency Candidate Winner
1990 MP County 1 PC1 1 1
1990 MP County 1 PC1 2 0
1990 MP County 1 PC1 3 0
1990 MP County 1 PC2 4 1
1990 MP County 1 PC2 5 0
1990 MP County 2 PC3 6 1
1990 MP County 2 PC3 7 0
1990 MP County 2 PC3 8 0
1990 MP County 2 PC4 9 1
1990 MP County 2 PC4 10 0
1990 MP County 2 PC4 11 0
1990 UP County 1 PC5 12 1
1990 UP County 1 PC5 13 0
1990 UP County 1 PC5 14 0
1990 UP County 1 PC6 15 1
1990 UP County 1 PC6 16 0
1990 UP County 1 PC6 16 0
1990 UP County 2 PC7 17 1
1990 UP County 2 PC7 18 0
1990 UP County 2 PC7 19 0
1990 UP County 2 PC8 20 1
1990 UP County 2 PC8 21 0
1995 MP County 1 PC1 1 1
1995 MP County 1 PC1 2 0
1995 MP County 1 PC1 22 0
1995 MP County 1 PC2 4 1
1995 MP County 1 PC2 23 0
1995 MP County 2 PC3 24 1
1995 MP County 2 PC3 25 0
1995 MP County 2 PC3 26 0
1995 MP County 2 PC4 9 1
1995 MP County 2 PC4 10 0
1995 MP County 2 PC4 11 0
1995 UP County 1 PC5 30 1
1995 UP County 1 PC5 31 0
1995 UP County 1 PC5 14 0
1995 UP County 1 PC6 15 1
1995 UP County 1 PC6 32 0
1995 UP County 1 PC6 32 0
1995 UP County 2 PC7 17 1
1995 UP County 2 PC7 33 0
1995 UP County 2 PC7 19 0
1995 UP County 2 PC8 34 1
1995 UP County 2 PC8 21 0

I have tried
xtset year state-county where state-county is a group I created. I do not think year-state-county would be correct either. Can someone suggest a way out to conduct this analysis?

I also need to know if the winner in 1995 was the same as the winner in 1990. Unless I set my panel, I do not think I can find that.

Any help/guidance would be appreciated.

Thank you