Hello StataList experts,
I'm trying to re-shape the dataset in Sheet2 (attached), which is basically the energy mix in the import bill, as I'm trying to estimate the oil price elasticity using rolling window regression.
First, stata couldn't read the date variable, so it gave him an letter.
then, Stata complains that "variable key contains missing values
r(498);"
the code:////////
reshape wide E F G H I J K L M N O P Q R S T U V W X Y Z AA AB AC AD AE AF AG AH AI AJ AK AL AM AN AO AP AQ AR AS AT AU AV AW AX AY AZ BA BB BC BD BE BF BG BH BI BJ BK BL BM BM BN BO BP BQ BR BS BT BU BV BW BX BY BZ CA CB CC CD CE CF CG CH CI CJ CK CL CM CN CO CP CQ CR CS CT CU CV CW CX CY CZ DA DB DC DD DE DF DG DH DI DJ DK DL DM DN DO DP, i(key item variable) j(key)
///////////
Any idea how to do it?
I'm trying to re-shape the dataset in Sheet2 (attached), which is basically the energy mix in the import bill, as I'm trying to estimate the oil price elasticity using rolling window regression.
First, stata couldn't read the date variable, so it gave him an letter.
then, Stata complains that "variable key contains missing values
r(498);"
the code:////////
reshape wide E F G H I J K L M N O P Q R S T U V W X Y Z AA AB AC AD AE AF AG AH AI AJ AK AL AM AN AO AP AQ AR AS AT AU AV AW AX AY AZ BA BB BC BD BE BF BG BH BI BJ BK BL BM BM BN BO BP BQ BR BS BT BU BV BW BX BY BZ CA CB CC CD CE CF CG CH CI CJ CK CL CM CN CO CP CQ CR CS CT CU CV CW CX CY CZ DA DB DC DD DE DF DG DH DI DJ DK DL DM DN DO DP, i(key item variable) j(key)
///////////
Any idea how to do it?
Comment