Hi,Statalist. I want to reshape long the data of WDI to panel data.This is the example data.
Code:
* Example generated by -dataex-. To install: ssc install dataex
clear
input str52 CountryName str3 CountryCode str43 SeriesName str14 SeriesCode str17(YR1960 YR1961 YR1962 YR1963 YR1964 YR1965 YR1966)
"Afghanistan" "AFG" "GDP (current US$)"                           "NY.GDP.MKTP.CD" "537777811.1111112" "548888895.5555556" "546666677.7777778" "751111191.111111"  "800000044.4444444" "1006666637.777778" "1399999966.666667"
"Afghanistan" "AFG" "Gross fixed capital formation (current US$)" "NE.GDI.FTOT.CD" ".."                ".."                ".."                ".."                ".."                ".."                ".."               
"Afghanistan" "AFG" "Labor force, total"                          "SL.TLF.TOTL.IN" ".."                ".."                ".."                ".."                ".."                ".."                ".."               
"Afghanistan" "AFG" "GDP deflator (base year varies by country)"  "NY.GDP.DEFL.ZS" ".."                ".."                ".."                ".."                ".."                ".."                ".."               
"Albania"     "ALB" "GDP (current US$)"                           "NY.GDP.MKTP.CD" ".."                ".."                ".."                ".."                ".."                ".."                ".."               
"Albania"     "ALB" "Gross fixed capital formation (current US$)" "NE.GDI.FTOT.CD" ".."                ".."                ".."                ".."                ".."                ".."                ".."               
"Albania"     "ALB" "Labor force, total"                          "SL.TLF.TOTL.IN" ".."                ".."                ".."                ".."                ".."                ".."                ".."               
"Albania"     "ALB" "GDP deflator (base year varies by country)"  "NY.GDP.DEFL.ZS" ".."                ".."                ".."                ".."                ".."                ".."                ".."               
"Algeria"     "DZA" "GDP (current US$)"                           "NY.GDP.MKTP.CD" ".."                ".."                "2001468867.733441" "2703014867.328337" "2909351792.586591" "3136258896.923295" "3039834558.749063"
"Algeria"     "DZA" "Gross fixed capital formation (current US$)" "NE.GDI.FTOT.CD" ".."                ".."                ".."                ".."                ".."                ".."                ".."               
end
I want to reshape long the data to be panel data.
Thank you for you help in advance.