Hi: I have a data set in the following format:
C GDP Y15
x1 gdp1 20
x1 gdp2 30
x1 gdp3 40
x2 gdp1 25
x2 gdp2 35
x2 gdp3 45
x3 gdp1 15
x3 gdp2 25
x3 gdp3 35
Trying to get it in the form below (variable names can of course be different):
C gdp1_y15 gdp2_y15 gdp3_y15
x1 20 30 40
x2 25 35 45
x3 15 25 35
Tried the following command: reshape wide Y15, i(C) j(GDP) string -- but it doesn't work. Not having success with other variations either. Any ideas?
Apologies in advance for any amateurish mistakes.
Zaki Eusufzai
Dept. of Economics
Loyola Marymount University
C GDP Y15
x1 gdp1 20
x1 gdp2 30
x1 gdp3 40
x2 gdp1 25
x2 gdp2 35
x2 gdp3 45
x3 gdp1 15
x3 gdp2 25
x3 gdp3 35
Trying to get it in the form below (variable names can of course be different):
C gdp1_y15 gdp2_y15 gdp3_y15
x1 20 30 40
x2 25 35 45
x3 15 25 35
Tried the following command: reshape wide Y15, i(C) j(GDP) string -- but it doesn't work. Not having success with other variations either. Any ideas?
Apologies in advance for any amateurish mistakes.
Zaki Eusufzai
Dept. of Economics
Loyola Marymount University
Comment