Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Reshaping Panel data

    I have a panel data set with the following data:

    input long country int CountryCode long IndicatorName str21(IndicatorCode y2012Q3 y2012Q4 y2013Q1 y2013Q2 y2013Q3)
    145 111 402 "BMSTRS_BP6_USD" "" "" "" "" ""
    145 111 1091 "BFOLNACB_BP6_USD" "" "" "" "" ""
    145 111 418 "BSTVBS_BP6_USD" "1617000000" "1401000000" "1251000000" "1593000000" "1744000000"
    145 111 1315 "BFPLEOF_BP6_USD" "" "" "" "" ""
    145 111 294 "BMSOIN_BP6_USD" "" "" "" "" ""
    145 111 546 "BXIPIP_BP6_USD" "65029000000" "66383000000" "67288000000" "69392000000" "70083000000"
    145 111 787 "BEFOODO_BP6_USD" "" "" "" "" ""
    145 111 1277 "BFPAEONF_BP6_USD" "4502000000" "-396000000" "9183000000" "19851000000" "-3763000000"
    145 111 855 "BEFPDONFAA_BP6_USD" "" "" "" "" ""
    145 111 461 "BXSTROPC_BP6_USD" "" "" "" "" ""
    145 111 1336 "BFRA_BP6_USD" "" "" "" "" ""
    145 111 358 "BSTRA_BP6_USD" "" "" "" "" ""
    145 111 978 "BFDAEO_BP6_USD" "10854000000" "8126000000" "3451000000" "5829000000" "10372000000"
    145 111 1319 "BFP_BP6_USD" "-90949000000" "-206662000000" "1238000000" "177264000000" "-185087000000"
    145 111 1289 "BFPLDG_S_BP6_USD" "48954000000" "-17397000000" "58581000000" "-44868000000" "-30336000000"
    145 111 1233 "BFOTLO_L_BP6_USD" "" "" "" "" ""
    145 111 726 "BEFOODGSA_BP6_USD" "" "" "" "" ""
    145 111 462 "BMSTROPC_BP6_USD" "" "" "" "" ""
    145 111 1257 "BFPADO_L_BP6_USD" "55284000000" "88270000000" "57930000000" "-1658000000" "19700000000"
    145 111 1484 "ILOT_BP6_USD" "141459000000" "140504000000" "143773000000" "148791000000" "150824000000"
    145 111 696 "BEFOODDCAA_BP6_USD" "" "" "" "" ""
    145 111 577 "BIP_BP6_USD" "" "" "" "" ""
    145 111 297 "BSOIND_BP6_USD" "" "" "" "" ""
    145 111 463 "BXIPCE_BP6_USD" "" "" "" "" ""
    145 111 261 "BXSORL_BP6_USD" "" "" "" "" ""
    145 111 23 "IADE_BP6_USD" "4813387000000" "4983895000000" "5242987000000" "5167442000000" "5706527000000"
    144 112 505 "BXIPIDIF_BP6_USD" "" "" "" "" ""
    144 112 240 "BKA_DB_BP6_USD" "" "" "" "" ""
    144 112 380 "BXSTROTO_BP6_USD" "0" "0" "0" "0" "0"
    144 112 351 "BMSOTCMT_BP6_USD" "1537646534.00838" "1714874527.36224" "1934019360.61207" "1698034763.93954" "1956016962.47141"
    144 112 1625 "BXISXF_BP6_USD" "6098435739.71053" "6122514139.74153" "8058414002.55028" "7711075516.2431" "7388190953.41105"
    144 112 308 "BXSM_BP6_USD" "241788201.133898" "274189734.966421" "1328088615.42031" "875909335.244832" "899674732.93689"
    144 112 1097 "BFOLNAG_S_BP6_USD" "" "" "" "" ""
    144 112 525 "BXIPIDIM_BP6_USD" "" "" "" "" ""
    144 112 617 "BXISOPT_BP6_USD" "" "" "" "" ""
    144 112 1443 "ILOPDC_S_BP6_USD" "0" "0" "0" "0" "0"
    144 112 172 "IAPD_BP6_USD" "2141021742300" "2128428492000" "2138686313600" "2147229624400" "2157334913900"
    144 112 1058 "BFOCD_BP6_USD" "-56415666616.2027" "-72936054412.8309" "-711310005.225111" "107544762854.578" "49795445304.7242"
    144 112 1166 "BFORPLDC_L_BP6_USD" "0" "0" "0" "0" "0"
    144 112 150 "IAOD_BP6_USD" "6189385381200" "5850217236000" "5846621884400" "5938057050800" "5780163675200"
    144 112 1320 "BFRAMGGB_BP6_USD" "" "" "" "" ""
    144 112 62 "IAOLNCB_S_BP6_USD" "0" "0" "0" "0" "0"
    144 112 1143 "BFORACB_L_BP6_USD" "0" "0" "0" "0" "0"
    144 112 1212 "BFOTAONF_L_BP6_USD" "0" "0" "0" "0" "0"
    144 112 1388 "ILOCDONF_L_BP6_USD" "0" "0" "0" "0" "0"
    144 112 89 "IAOLNO_L_BP6_USD" "41228762400" "33761310000" "42904138400" "43022365400" "50132450800"
    144 112 1632 "I_BP6_USD" "-531476051400" "-590915238000" "-259482934600" "-255821277600" "-419677554200"
    144 112 80 "IAOPCOF_BP6_USD" "0" "0" "0" "0" "0"
    144 112 1011 "BF_BP6_USD" "" "" "" "" ""
    144 112 1104 "BFOLNAONF_L_BP6_USD" "-42668506.0824525" "-72905941.0893374" "-41841765.0132418" "-50710540.4615429" "-29472103.3203464"
    144 112 1177 "BFORPLONF_S_BP6_USD" "0" "0" "0" "0" "0"
    144 112 1183 "BFORPLO_BP6_USD" "" "" "" "" ""
    144 112 1318 "BFPL_BP6_USD" "-114492244339.541" "14381489335.7532" "44271686774.0108" "-11786358949.698" "-24849636589.05"
    144 112 1375 "ILOCDCB_S_BP6_USD" "2920856400" "2174484000" "2118592200" "2618539000" "3001227400"
    144 112 224 "BKTOOTX_BP6_USD" "" "" "" "" ""
    144 112 352 "BSOTCMT_BP6_USD" "690597672.519694" "933513028.296082" "663269460.209908" "734534495.170227" "753865379.667808"
    144 112 538 "BIPIOI_BP6_USD" "-5897735729.61899" "-4547111847.50672" "-5069052346.60422" "-5166328394.90022" "-3628171035.06791"
    144 112 1019 "BFOCDAG_L_BP6_USD" "0" "0" "0" "0" "0"
    144 112 1532 "BACK_BP6_USD" "-29920104654.0397" "-25173153528.738" "-25480085198.0638" "-18266551347.4655" "-38726343762.9352"
    144 112 1159 "BFORAOF_BP6_USD" "" "" "" "" ""
    144 112 1307 "BFPLEEO_BP6_USD" "-6240664093.3187" "-6352326345.34923" "5005514851.58412" "13484393713.6375" "17950062085.4236"
    144 112 183 "IAPEOF_BP6_USD" "1367556624000" "1379656446000" "1434959848400" "1428375397400" "1517884487600"
    144 112 369 "BMSTR_BP6_USD" "" "" "" "" ""
    144 112 402 "BMSTRS_BP6_USD" "" "" "" "" ""
    144 112 213 "BKTO_DB_BP6_USD" "0" "0" "0" "0" "15511633.3264981"
    144 112 291 "BMSOINAI_BP6_USD" "0" "0" "46490850.0147131" "61467321.7715672" "72904676.6345411"
    144 112 1402 "ILOLNDC_S_BP6_USD" "" "" "" "" ""
    144 112 552 "BIPIPI_L_BP6_USD" "-6635742853.34141" "-6257231639.58053" "-4159381381.31634" "-4523994882.38734" "-5176232041.05242"
    144 112 425 "BXSTV_BP6_USD" "" "" "" "" ""
    144 112 125 "IAOTDC_L_BP6_USD" "0" "0" "0" "0" "0"
    144 112 56 "IAOCDOF_BP6_USD" "" "" "" "" ""
    144 112 318 "BXSOOB_BP6_USD" "" "" "" "" ""
    144 112 1057 "BFOCDL_BP6_USD" "13119775462.8341" "-76722408614.188" "-46047637244.5729" "-122081784453.554" "-202746354557.326"
    144 112 398 "BXSTRPC_BP6_USD" "" "" "" "" ""
    144 112 1400 "ILOLNCB_BP6_USD" "" "" "" "" ""
    144 112 701 "BEFOODDCPP_BP6_USD" "" "" "" "" ""
    144 112 464 "BMIPCE_BP6_USD" "499379552.668703" "540454911.118784" "539293860.170672" "548595846.811237" "533600186.431535"
    144 112 346 "BXSOTCMM_BP6_USD" "" "" "" "" ""
    144 112 1278 "BFPAEOF_BP6_USD" "" "" "" "" ""
    144 112 1241 "BFOTLO_BP6_USD" "" "" "" "" ""
    144 112 263 "BSORL_BP6_USD" "" "" "" "" ""
    144 112 618 "BMISOPT_BP6_USD" "" "" "" "" ""
    144 112 42 "IAOCDDC_S_BP6_USD" "3079691729100" "2936315574000" "2863046747800" "2821051123800" "2683585116200"
    144 112 1205 "BFOTAG_L_BP6_USD" "" "" "" "" ""
    144 112 1506 "ILPDONF_S_BP6_USD" "" "" "" "" ""
    144 112 97 "IAOLNO_BP6_USD" "42088504500" "34599228000" "43767604600" "43839411000" "50990175100"
    144 112 104 "IAORDC_BP6_USD" "" "" "" "" ""
    144 112 150 "IAOD_BP6_USD" "" "" "" "" ""
    144 112 560 "BMIPIPED_BP6_USD" "" "" "" "" ""
    144 112 1203 "BFOTADC_S_BP6_USD" "0" "0" "0" "0" "0"
    144 112 502 "BXIPIDER_BP6_USD" "" "" "" "" ""
    144 112 99 "IAORCB_L_BP6_USD" "0" "0" "0" "0" "0"
    144 112 309 "BMSM_BP6_USD" "20544095.5211808" "30113323.493422" "534644775.169201" "221282358.377642" "252839623.221919"
    144 112 323 "BSOOBPM_BP6_USD" "5087034114.05239" "5512323111.05904" "5357295616.69544" "5588916232.07974" "5815311334.10414"
    144 112 374 "BXSTROT_BP6_USD" "459871676.666433" "434265823.010401" "430815210.136342" "487128525.03967" "474655979.790842"
    144 112 280 "BXSOFIFISM_BP6_USD" "2972572590.41086" "2856010996.58665" "3300850351.04463" "3282354982.60169" "3224868568.57896"
    144 112 402 "BMSTRS_BP6_USD" "2068632387.4789" "1855931674.25248" "1628729445.51545" "1782552331.37545" "1794695975.87583"
    144 112 579 "BMIPO_BP6_USD" "" "" "" "" ""
    144 112 989 "BFDLDD_BP6_USD" "1321143373.51594" "-4318884553.66184" "-36172980701.4478" "77903683613.2842" "-18984688028.301"
    144 112 314 "BMSMR_BP6_USD" "0" "0" "0" "0" "0"
    end
    label values country country
    label def country 144 "United Kingdom", modify
    label def country 145 "United States", modify
    label values IndicatorName indn
    label def indn 23 "Assets, Direct Investment, Equity and Investment Fund Shares, US Dollars", modify
    label def indn 42 "Assets, Other Investment, Currency and Deposits, Deposit-taking Corporations, Except Central Bank, Short-term, US Dollars", modify
    label def indn 56 "Assets, Other Investment, Currency and Deposits, Other Sectors, Other Financial Corporations, US Dollars", modify
    label def indn 62 "Assets, Other Investment, Loans, Central Bank, Other Short-term, US Dollars", modify
    label def indn 80 "Assets, Other Investment, Loans, Insurance, Pension, and Standardized Guarantee Schemes, Other Sectors, Other Financial Corporations, US Dollars", modify
    label def indn 89 "Assets, Other Investment, Loans, Other Sectors, Long-term, US Dollars", modify
    label def indn 97 "Assets, Other Investment, Loans, Other Sectors, US Dollars", modify
    label def indn 99 "Assets, Other Investment, Other Accounts Receivable, Central Bank, Long-term, US Dollars", modify
    label def indn 104 "Assets, Other Investment, Other Accounts Receivable, Deposit-taking Corporations, Except Central Bank, US Dollars", modify
    label def indn 125 "Assets, Other Investment, Trade Credit and Advances, Deposit-taking Corporations, Except Central Bank, Long-term, US Dollars", modify
    label def indn 150 "Assets, Other Investment: Net Acquisition of Financial Assets, Debt Instruments, US Dollars", modify
    label def indn 172 "Assets, Portfolio Investment, Debt Securities, US Dollars", modify
    label def indn 183 "Assets, Portfolio Investment, Equity and Investment Fund Shares, Other Sectors, Other Financial Corporations, US Dollars", modify
    label def indn 213 "Capital Account, Capital Transfers, Financial Corporations, Nonfinancial Corporations, Households, and NPISHs, Debit, US Dollars", modify
    label def indn 224 "Capital Account, Capital Transfers, Financial Corporations, Nonfinancial Corporations, Households, and NPISHs, Other Capital Transfers, Of which: Capital Taxes (Debit), US Dollars", modify
    label def indn 240 "Capital Account, Gross Acquisitions (DR) / Disposals (CR) of Nonproduced Nonfinancial Assets, Debit, US Dollars", modify
    label def indn 261 "Current Account, Goods and Services, Services, Charges for the Use of Intellectual Property nie, Credit, US Dollars", modify
    label def indn 263 "Current Account, Goods and Services, Services, Charges for the Use of Intellectual Property nie, Net, US Dollars", modify
    label def indn 280 "Current Account, Goods and Services, Services, Financial Services, Financial Intermediation Services Indirectly Measured (FISIM), Credit, US Dollars", modify
    label def indn 291 "Current Account, Goods and Services, Services, Insurance and Pension Services, Auxiliary Insurance Services, Debit, US Dollars", modify
    label def indn 294 "Current Account, Goods and Services, Services, Insurance and Pension Services, Debit, US Dollars", modify
    label def indn 297 "Current Account, Goods and Services, Services, Insurance and Pension Services, Direct Insurance, Net, US Dollars", modify
    label def indn 308 "Current Account, Goods and Services, Services, Manufacturing Services on Physical Inputs Owned by Others, Credit, US Dollars", modify
    label def indn 309 "Current Account, Goods and Services, Services, Manufacturing Services on Physical Inputs Owned by Others, Debit, US Dollars", modify
    label def indn 314 "Current Account, Goods and Services, Services, Manufacturing Services on Physical Inputs Owned by Others, Goods for Processing in Reporting Economy, Debit, US Dollars", modify
    label def indn 318 "Current Account, Goods and Services, Services, Other Business Services, Credit, US Dollars", modify
    label def indn 323 "Current Account, Goods and Services, Services, Other Business Services, Professional and Management Consulting Services, Net, US Dollars", modify
    label def indn 346 "Current Account, Goods and Services, Services, Telecommunications, Computer, and Information Services, Information Services, Credit, US Dollars", modify
    label def indn 351 "Current Account, Goods and Services, Services, Telecommunications, Computer, and Information Services, Telecommunications Services, Debit, US Dollars", modify
    label def indn 352 "Current Account, Goods and Services, Services, Telecommunications, Computer, and Information Services, Telecommunications Services, Net, US Dollars", modify
    label def indn 358 "Current Account, Goods and Services, Services, Transport, Air Transport, Net, US Dollars", modify
    label def indn 369 "Current Account, Goods and Services, Services, Transport, Debit, US Dollars", modify
    label def indn 374 "Current Account, Goods and Services, Services, Transport, Other Mode of Transport, Credit, US Dollars", modify
    label def indn 380 "Current Account, Goods and Services, Services, Transport, Other Mode of Transport, Other, Credit, US Dollars", modify
    label def indn 398 "Current Account, Goods and Services, Services, Transport, Postal and Courier Services, Credit, US Dollars", modify
    label def indn 402 "Current Account, Goods and Services, Services, Transport, Sea Transport, Debit, US Dollars", modify
    label def indn 418 "Current Account, Goods and Services, Services, Travel, Business, Acquisition of Goods and Services by Border, Seasonal, and Other S-T Workers, Net, US Dollars", modify
    label def indn 425 "Current Account, Goods and Services, Services, Travel, Credit, US Dollars", modify
    label def indn 461 "Current Account, Goods and Services, Services: Transport Other (Including postal and courier), Credit, US Dollars", modify
    label def indn 462 "Current Account, Goods and Services, Services: Transport Other (Including postal and courier), Debit, US Dollars", modify
    label def indn 463 "Current Account, Primary Income, Compensation of Employees, Credit, US Dollars", modify
    label def indn 464 "Current Account, Primary Income, Compensation of Employees, Debit, US Dollars", modify
    label def indn 502 "Current Account, Primary Income, Investment Income, Direct Investment, Income on Equity and Investment Fund Shares, Reinvested Earnings, Credit, US Dollars", modify
    label def indn 505 "Current Account, Primary Income, Investment Income, Direct Investment, Interest, Between Fellow Enterprises, Credit, US Dollars", modify
    label def indn 525 "Current Account, Primary Income, Investment Income, Direct Investment, Interest, Memorandum: Interest Before FISIM, Credit, US Dollars", modify
    label def indn 538 "Current Account, Primary Income, Investment Income, Other Investment, Interest, Net, US Dollars", modify
    label def indn 546 "Current Account, Primary Income, Investment Income, Portfolio Investment, Credit, US Dollars", modify
    label def indn 552 "Current Account, Primary Income, Investment Income, Portfolio Investment, Interest, Long Term, Net, US Dollars", modify
    label def indn 560 "Current Account, Primary Income, Investment Income, Portfolio Investment, Investment Income on Equity and Investment Fund Shares, Dividends on Equity Excluding Investment Fund Shares, Debit, US Dollars", modify
    label def indn 577 "Current Account, Primary Income, Net, US Dollars", modify
    label def indn 579 "Current Account, Primary Income, Other Primary Income, Debit, US Dollars", modify
    label def indn 617 "Current Account, Secondary Income, Financial Corporations, Nonfinancial Corporations, Households, and NPISHs, Personal Transfers (Current Transfers Between Resident and Nonresident Households), Credit, US Dollars", modify
    label def indn 618 "Current Account, Secondary Income, Financial Corporations, Nonfinancial Corporations, Households, and NPISHs, Personal Transfers (Current Transfers Between Resident and Nonresident Households), Debit, US Dollars", modify
    label def indn 696 "Exceptional Financing, Other Investment - Liabilities, Other Debt Instruments, Deposit-taking Corporations, Except Central Bank, Accumulation of Arrears, US Dollars", modify
    label def indn 701 "Exceptional Financing, Other Investment - Liabilities, Other Debt Instruments, Deposit-taking Corporations, Except Central Bank, Prepayment, US Dollars", modify
    label def indn 726 "Exceptional Financing, Other Investment - Liabilities, Other Debt Instruments, General Government, Rescheduling of Arrears, US Dollars", modify
    label def indn 787 "Exceptional Financing, Other Investment - Liabilities, Other Debt Instruments, Other Sectors, US Dollars", modify
    label def indn 855 "Exceptional Financing, Portfolio Investment - Liabilities, Debt Securities, Nonfinancial Corporations, Households, NPISHs, Accumulation of Arrears, US Dollars", modify
    label def indn 978 "Financial Account, Net Lending (+) / Net Borrowing (-) (Balance from Financial Account), Direct Investment, Net Acquisition of Financial Assets, Equity and Investment Fund Shares, Equity Other Than Reinvestment of Earnings, US Dollars
    > ", modify
    label def indn 989 "Financial Account, Net Lending (+) / Net Borrowing (-) (Balance from Financial Account), Direct Investment, Net Incurrence of Liabilities, Debt Instruments, Direct Investor in Direct Investment Enterprises, US Dollars", modify
    label def indn 1011 "Financial Account, Net Lending (+) / Net Borrowing (-) (Balance from Financial Account), US Dollars", modify
    label def indn 1019 "Financial Account, Other Investment, Currency and Deposits, Net Acquisition of Financial Assets, General Government, Long-term, US Dollars", modify
    label def indn 1057 "Financial Account, Other Investment, Currency and Deposits, Net Incurrence of Liabilities, US Dollars", modify
    label def indn 1058 "Financial Account, Other Investment, Currency and Deposits, US Dollars", modify
    label def indn 1091 "Financial Account, Other Investment, Loans, Net Acquisition of Financial Assets, Central Bank, US Dollars", modify
    label def indn 1097 "Financial Account, Other Investment, Loans, Net Acquisition of Financial Assets, General Government, Other Short-term, US Dollars", modify
    label def indn 1104 "Financial Account, Other Investment, Loans, Net Acquisition of Financial Assets, Other Sectors, Nonfinancial Corporations, Households, and NPISHs, Long-term, US Dollars", modify
    label def indn 1143 "Financial Account, Other Investment, Other Accounts Receivable/payable, Net Acquisition of Financial Assets, Central Banks, Long-term, US Dollars", modify
    label def indn 1159 "Financial Account, Other Investment, Other Accounts Receivable/payable, Net Acquisition of Financial Assets, Other Sectors, Other Financial Corporations, US Dollars", modify
    label def indn 1166 "Financial Account, Other Investment, Other Accounts Receivable/payable, Net Incurrence of Liabilities, Deposit-taking Corporations, Except Central Bank, Long-term, US Dollars", modify
    label def indn 1177 "Financial Account, Other Investment, Other Accounts Receivable/payable, Net Incurrence of Liabilities, Other Sectors, Nonfinancial Corporations, Households, NPISHs, Short-term, US Dollars", modify
    label def indn 1183 "Financial Account, Other Investment, Other Accounts Receivable/payable, Net Incurrence of Liabilities, Other Sectors, US Dollars", modify
    label def indn 1203 "Financial Account, Other Investment, Trade Credit and Advances, Net Acquisition of Financial Assets, Deposit-taking Corporations, Except Central Bank, Short-term, US Dollars", modify
    label def indn 1205 "Financial Account, Other Investment, Trade Credit and Advances, Net Acquisition of Financial Assets, General Government, Long-term, US Dollars", modify
    label def indn 1212 "Financial Account, Other Investment, Trade Credit and Advances, Net Acquisition of Financial Assets, Other Sectors, Nonfinancial Corporations, Households, NPISHs, Long-term, US Dollars", modify
    label def indn 1233 "Financial Account, Other Investment, Trade Credit and Advances, Net Incurrence of Liabilities, Other Sectors, Long-term, US Dollars", modify
    label def indn 1241 "Financial Account, Other Investment, Trade Credit and Advances, Net Incurrence of Liabilities, Other Sectors, US Dollars", modify
    label def indn 1257 "Financial Account, Portfolio Investment, Net Acquisition of Financial Assets, Debt Securities, Other Sectors, Long-term, US Dollars", modify
    label def indn 1277 "Financial Account, Portfolio Investment, Net Acquisition of Financial Assets, Equity and Investment Fund Shares, Other Sectors, Nonfinancial Corporations, Households, and NPISHs, US Dollars", modify
    label def indn 1278 "Financial Account, Portfolio Investment, Net Acquisition of Financial Assets, Equity and Investment Fund Shares, Other Sectors, Other Financial Corporations, US Dollars", modify
    label def indn 1289 "Financial Account, Portfolio Investment, Net Incurrence of Liabilities, Debt Securities, General Government, Short-term, US Dollars", modify
    label def indn 1307 "Financial Account, Portfolio Investment, Net Incurrence of Liabilities, Equity and Investment Fund Shares, Equity Securities Other Than Investment Fund Shares, US Dollars", modify
    label def indn 1315 "Financial Account, Portfolio Investment, Net Incurrence of Liabilities, Equity and Investment Fund Shares, Other Sectors, Other Financial Corporations, US Dollars", modify
    label def indn 1318 "Financial Account, Portfolio Investment, Net Incurrence of Liabilities, US Dollars", modify
    label def indn 1319 "Financial Account, Portfolio Investment, US Dollars", modify
    label def indn 1320 "Financial Account, Reserve Assets, Monetary Gold, Gold Bullion, US Dollars", modify
    label def indn 1336 "Financial Account, Reserve Assets, US Dollars", modify
    label def indn 1375 "Liabilities, Other Investment, Currency and Deposits, Central Bank, Short-term, US Dollars", modify
    label def indn 1388 "Liabilities, Other Investment, Currency and Deposits, Other Sectors, Nonfinancial Corporations, Households, and NPISHs, Long-term, US Dollars", modify
    label def indn 1400 "Liabilities, Other Investment, Loans, Central Bank, US Dollars", modify
    label def indn 1402 "Liabilities, Other Investment, Loans, Deposit-taking Corporations, Except the Central Bank, Short-term, US Dollars", modify
    label def indn 1443 "Liabilities, Other Investment, Other Accounts Payable - Other, Deposit-taking Corporations, Except Central Bank, Short-term, US Dollars", modify
    label def indn 1484 "Liabilities, Other Investment, Trade Credit and Advances, US Dollars", modify
    label def indn 1506 "Liabilities, Portfolio Investment, Debt Securities, Other Sectors, Nonfinancial Corporations, Households, and NPISHs, Short-term, US Dollars", modify
    label def indn 1532 "Net Lending (+) / Net Borrowing (-) (Balance from Current and Capital Account), US Dollars", modify
    label def indn 1625 "Supplementary Items, Secondary Income, Credit (Excluding Exceptional Financing), US Dollars", modify
    label def indn 1632 "Total, US Dollars", modify



    I have been using the following command but it doesn't work. I just get a warning that variable year contains all missing values.

    reshape long y, i(
    CountryCode
    ) j(year)


    Note: not all the data set is in this post. I have all
    IFS
    data set from IMF, which contains a lot of missing data for some countries before 1970.

  • #2
    This would be closer to what you need

    Code:
    reshape long y, i(CountryCode IndicatorName) j(Date) string
    but you have duplicates on CountryCode IndicatorName which foil that.

    Comment


    • #3
      Still doesn't work. I get this warning: variable id does not uniquely identify the observations. I think there is a problem with the data set.

      Comment


      • #4
        Assuming you expect Forum members to take a close look at the data, I remind you to use CODE delimiters or - dataex - for that matter, as recomended in the FAQ.
        Best regards,

        Marcos

        Comment


        • #5
          Arbnor:
          as an aside to previous helpful hints, you may want to consider -isid- as a tool to investigate what's the matter with your ids.
          Kind regards,
          Carlo
          (Stata 19.0)

          Comment


          • #6
            As I told you in #2, you have duplicates on two [NB] identifier variables. I can have no idea what you should do to fix that.

            Code:
            duplicates list CountryCode IndicatorName

            Comment

            Working...
            X