I want to change the data format from
x country year val
A CN 1980 .1
A CN 1981 .2
A US 1980 .3
A US 1981 .4
B CN 1980 .5
B CN 1981 .6
B US 1980 .7
B US 1981 .8
to the followng format
country year xA xB
CN 1980 .1 .5
CN 1981 .2 .6
US 1980 .3 .7
US 1981 .4 .8
Not sure how to use -reshape- to do it or any other Stata command? You suggestion will be highly appreciated!
Andrew
x country year val
A CN 1980 .1
A CN 1981 .2
A US 1980 .3
A US 1981 .4
B CN 1980 .5
B CN 1981 .6
B US 1980 .7
B US 1981 .8
to the followng format
country year xA xB
CN 1980 .1 .5
CN 1981 .2 .6
US 1980 .3 .7
US 1981 .4 .8
Not sure how to use -reshape- to do it or any other Stata command? You suggestion will be highly appreciated!
Andrew
Comment