Hi,
I am currently have the data in the following shape.
I want to convert the data into the shape below (id & fyear can uniquely identify an obs)
I was trying to use
reshape wide cik, i(id fyear) j(cik) => doesn't work
or
reshape wide cik, i(id) j(fyear) => id and fyear cannot uniquely identify an obs => failed
How can I convert it?
Thank you!
I am currently have the data in the following shape.
id | fyear | cik |
1 | 2003 | 37996 |
1 | 2003 | 924613 |
1 | 2004 | 924613 |
1 | 2004 | 1306965 |
1 | 2005 | 37996 |
1 | 2005 | 1306965 |
2 | 2003 | 9856112 |
2 | 2003 | 14896 |
2 | 2004 | 14896 |
id | fyear | cik1 | cik2 | cik3 |
1 | 2003 | 37996 | 924613 | |
1 | 2004 | 924613 | 1306965 | |
1 | 2005 | 37996 | 1306965 | |
2 | 2003 | 9856112 | 14896 | |
2 | 2004 | 14896 | ||
reshape wide cik, i(id fyear) j(cik) => doesn't work
or
reshape wide cik, i(id) j(fyear) => id and fyear cannot uniquely identify an obs => failed
How can I convert it?
Thank you!
Comment