请看以下数据
code listyr1 listyr2 .... listyr_n
1 1990 1991 .... 2013
2 1991 1992 .... 2014
3 1995 1996 .... 2018
4 1998 1999 .... 2021
如何转换成如下的目标数据:
code year
1 1990
1 1991
1 1992
1 1993
省略
1 2013
2 1991
2 1992
2 1993
2 1994
省略
2 2014
我使用reshape long listyr, i(code) j(year)结果显示variable id does not uniquely identify the observations
Your data are currently wide. You are performing a reshape long. You specified i(code) and
j(year). In the current wide form, variable code should uniquely identify the observations.
Remember this picture.
到底怎么用才可以呢(注:code有2046个)


雷达卡





京公网安备 11010802022788号







