Hi all,
This should be an easy task for someone who is familiar with Stata but unfortunately not for me.
I have panel data (say, log CO2 emissions) for 60 countries covering more than 40 years. A brief part of the data is something like below. I am trying to use the reshape command to convert the data to a long format. The problem I am having is that the country names do not begin with the same stubname. What syntax should I use to reshape the data to long format?
I really appreciate any help.
This should be an easy task for someone who is familiar with Stata but unfortunately not for me.
I have panel data (say, log CO2 emissions) for 60 countries covering more than 40 years. A brief part of the data is something like below. I am trying to use the reshape command to convert the data to a long format. The problem I am having is that the country names do not begin with the same stubname. What syntax should I use to reshape the data to long format?
I really appreciate any help.
Year | Australia | Austria | Belgium | Canada | Germany | ... |
2000 | 0.55 | 0.35 | 0.45 | 0.47 | . | . |
2001 | 0.56 | 0.36 | 0.44 | 0.50 | . | . |
2002 | 0.56 | 0.33 | 0.48 | 0.53 | . | . |
2003 | 0.59 | 0.38 | 0.52 | 0.55 | . | . |
2004 | 0.60 | 0.39 | 0.53 | 0.59 | . | . |
2005 | 0.61 | 0.38 | 0.56 | 0.62 | . | . |
2006 | 0.65 | 0.37 | 0.58 | 0.63 | . | . |
2007 | 0.68 | 0.40 | 0.59 | 0.68 | . | . |
2008 | 0.69 | 0.41 | 0.60 | 0.69 | . | . |
Comment