Dear All, How can I reshape the following data into a standard long format panel data?
Code:
// https://bbs.pinggu.org/thread-10907696-1-1.html
* Example generated by -dataex-. To install: ssc install dataex
clear
input float stkcd str89 violation_year
4 "2010,2011,2012,2013"              
9 "2016"                              
10 "2003,2004,2005,2006,2007,2008,2009"
10 "2003,2005,2007,2009,2010,2011"    
10 "2015,2016"                        
end
Note that, for some firms (say, `stkcd'=10), there are some duplicates in the variable `violation_year'. Thanks.