Converting timeseries to Panel Data
Posted: Mon May 16, 2011 5:41 am
I run a pilot project which will eventually lead to a large scale of data management in the next phrase of the project. I need to convert standard reports from a database to panel data.
The reports are retrieved from the database in the following format. In the real case I will have more than 20 variables (e.g. I/GL) and 6 years of data for more than 500 banks.
"Bank Name" "I/GL 2009" "I/GL 2008" "I/GL 2007"
1. Federal National 6,30 1,60 0,80
2. HSBC Holdings Plc 3,30 2,70 1,80
3. Barclays Bank Plc 5,20 3,40 2,50
4. Barclays Plc 5,20 3,40 2,80
My preferred format (Panel Data) would be:
"Bank Name" "Year" "I/GL"
1. Federal National 2007 0,8
1. Federal National 2008 1,60
1. Federal National 2009 6,3
2. HSBC Holdings Plc 2007 1,8
2. HSBC Holdings Plc 2008 2,7
2. HSBC Holdings Plc 2009 3,3
3. Barclays Bank Plc 2007 2,50
3. Barclays Bank Plc 2008 3,4
3. Barclays Bank Plc 2009 5,2
4. Barclays Plc 2007 2,8
4. Barclays Plc 2008 3,4
4. Barclays Plc 2009 5,2
Can any one help me to do this conversion?
Many thanks in advance,
Amir
The reports are retrieved from the database in the following format. In the real case I will have more than 20 variables (e.g. I/GL) and 6 years of data for more than 500 banks.
"Bank Name" "I/GL 2009" "I/GL 2008" "I/GL 2007"
1. Federal National 6,30 1,60 0,80
2. HSBC Holdings Plc 3,30 2,70 1,80
3. Barclays Bank Plc 5,20 3,40 2,50
4. Barclays Plc 5,20 3,40 2,80
My preferred format (Panel Data) would be:
"Bank Name" "Year" "I/GL"
1. Federal National 2007 0,8
1. Federal National 2008 1,60
1. Federal National 2009 6,3
2. HSBC Holdings Plc 2007 1,8
2. HSBC Holdings Plc 2008 2,7
2. HSBC Holdings Plc 2009 3,3
3. Barclays Bank Plc 2007 2,50
3. Barclays Bank Plc 2008 3,4
3. Barclays Bank Plc 2009 5,2
4. Barclays Plc 2007 2,8
4. Barclays Plc 2008 3,4
4. Barclays Plc 2009 5,2
Can any one help me to do this conversion?
Many thanks in advance,
Amir