I want to reshape my data from wide to long. I implement:
Code:
reshape long MortgageloansthUSD2010 MortgageloansthUSD2011 MortgageloansthUSD2012 MortgageloansthUSD2013 MortgageloansthUSD2014 MortgageloansthUSD2015 MortgageloansthUSD2016 MortgageloansthUSD2017, i(BankName) j(year)
but this returns an error that varsa# and b# could not be found. Here is a MWE for my data;
Code:
* Example generated by -dataex-. To install: ssc install dataex
clear
input str3 A str45 BankName double(MortgageloansthUSD2017 MortgageloansthUSD2016 MortgageloansthUSD2015 MortgageloansthUSD2014 MortgageloansthUSD2013 MortgageloansthUSD2012) byte(MortgageloansthUSD2011 MortgageloansthUSD2010)
"1."  "Bank of Botswana"                                             .                .                .                .                .                . . .
"2."  "First National Bank of Botswana Ltd"                          .                .                .                .                .                . . .
"3."  "ABC Holdings Limited-BancABC"                                 .                .                .                .                .                . . .
"4."  "Barclays Bank of Botswana Limited"                            .                .                .                .                .                . . .
"5."  "Standard Chartered Bank Botswana Ltd"                         .                .                .                .                .                . . .
"6."  "Stanbic Bank Botswana Limited"                                .                .                .                .                .                . . .
"7."  "Letshego Holding Limited"                                     .                .                .                .                .                . . .
"8."  "African Banking Corp of Botswana Ltd"                         .                .                .                .                .                . . .
"9."  "Bank Gaborone Limited"                                        .                .                . 73095.1800710261 34878.9616196975                . . .
"10." "Botswana Building Society"                     329977.240228072 299613.889747657 283554.947920002 296896.851364613 290070.461801015                . . .
"11." "First Capital Bank"                                           .                .                .                .                .                . . .
"12." "Botswana Savings Bank"                          78967.653999038 75348.9914702401 52268.3491211385                .                . 22036.1025966704 . .
"13." "Bank of Baroda (Botswana) Limited"                            . 8252.18597841263 8231.59042349458 8164.67244613171 9090.06063134968                . . .
"14." "National Development Bank"                                    .                .                .                .                .                . . .
"15." "Money Quest Investments (Proprietary) Limited"                .                .                .                .                .                . . .
"16." "Bank SBI Botswana Ltd"                                        .                .                .                .                .                . . .
"17." "Bank Of India (Botswana) Limited"                             .                .                .                .                .                . . .
"18." "Norsad Finance Limited"                                       .                .                .                .                .                . . .
end
------------------ copy up to and including the previous line ------------------
Is the i variable the problem? How do I implement the reshape?