Dear Statalist,
I'm having difficulties with reshaping my paneldata. I have five different service variables(service1, service2, service3, service4 and service5). I have data on these variables for 1999-2014 for all 50 U.S. states.
The way that I have now arranged them is(in short):
But I would like to reshape it in a way so that it becomes like this:
I can not seem to figure out how to do this.
Is there anyone who could help me out?
Kind regards,
Tom
I'm having difficulties with reshaping my paneldata. I have five different service variables(service1, service2, service3, service4 and service5). I have data on these variables for 1999-2014 for all 50 U.S. states.
The way that I have now arranged them is(in short):
Code:
State Year service1 service2 service3 service4 service5 1 1999 0,160 0,013 0,041 0,074 0,288 1 2000 0,161 0,014 0,041 0,076 0,292 1 2001 0,161 0,015 0,041 0,079 0,296 1 2002 0,158 0,014 0,041 0,077 0,291 1 2003 0,155 0,013 0,041 0,079 0,288 1 2004 0,154 0,012 0,040 0,079 0,285 1 2005 0,152 0,012 0,039 0,082 0,285 1 2006 0,151 0,011 0,038 0,083 0,284 1 2007 0,150 0,011 0,038 0,084 0,283 1 2008 0,152 0,011 0,039 0,086 0,288 1 2009 0,150 0,010 0,039 0,084 0,284 1 2010 0,146 0,010 0,038 0,083 0,276 1 2011 0,145 0,009 0,037 0,085 0,276 1 2012 0,146 0,009 0,036 0,086 0,277 1 2013 0,145 0,009 0,037 0,086 0,276 1 2014 0,145 0,009 0,037 0,086 0,277 2 1999 0,155 0,017 0,030 0,065 0,267 2 2000 0,155 0,020 0,030 0,065 0,270 2 2001 0,151 0,019 0,029 0,062 0,261 2 2002 0,151 0,018 0,028 0,060 0,257 2 2003 0,151 0,017 0,029 0,061 0,257 2 2004 0,147 0,017 0,029 0,059 0,252 2 2005 0,148 0,016 0,030 0,058 0,252 2 2006 0,147 0,016 0,029 0,058 0,251
Code:
State Year Service 1 1999 1 1 1999 2 1 1999 3 1 1999 4 1 1999 5 1 2000 1 1 2000 2 1 2000 3 1 2000 4 1 2000 5 Etc.
Is there anyone who could help me out?
Kind regards,
Tom
Comment