xtset id year
出现错误:repeated time values within panel
duplicates list
结果:Duplicates in terms of all variables
(0 observations are duplicates)
意思是结果这个命令可能展示不出重复的样本,但还是要继续尝试以下命令:
duplicates drop id year,force
结果:Duplicates in terms of id year
(1 observation deleted)
此时可以设置面板数据了!