- * Example generated by -dataex-. To install: ssc install dataex
- clear
- input str7 code int year
- " 000004" 2013
- " 000004" 2015
- " 000004" 2016
- " 000005" 2016
- " 000006" 2015
- " 000007" 2016
- " 000008" 2013
- " 000008" 2015
- " 000009" 2014
- " 000012" 2014
- " 000012" 2016
- " 000014" 2014
- " 000016" 2013
- " 000016" 2016
- " 000017" 2014
- " 000019" 2015
- " 000020" 2015
- " 000021" 2015
- " 000021" 2016
- " 000023" 2013
- end
----------------------- copy starting from the next line -----------------------
- * Example generated by -dataex-. To install: ssc install dataex
- clear
- input str15 code int year byte industry
- "000002" 2016 3
- "000004" 2015 5
- "000005" 2016 2
- "000006" 2016 3
- "000007" 2016 3
- "000008" 2016 5
- "000009" 2015 4
- "000010" 2016 3
- "000011" 2016 3
- "000012" 2016 5
- "000014" 2016 3
- "000016" 2016 5
- "000017" 2016 5
- "000018" 2016 4
- "000019" 2016 5
- "000020" 2015 5
- "000021" 2015 5
- "000022" 2016 2
- "000023" 2015 5
- "000024" 2015 3
- end
我想把industry匹配到第一个数据上,然后只有code一样,那么该公司其他年份的industry也都一样