I have a stata dataset looking something like this:
codistat year age gend nat pop_tot
where age goes from 0 to 100, gender is m and f.I would like to change the datset and have by codistat and year, pop_tot_0_m pop_tot_0_f pop_tot_1_m pop_tot_0_f etc..
nat is not really relevant as of now.
Any idea how to do it (I already tried reshape wide but it tells me the data is already wide)
codistat year age gend nat pop_tot
where age goes from 0 to 100, gender is m and f.I would like to change the datset and have by codistat and year, pop_tot_0_m pop_tot_0_f pop_tot_1_m pop_tot_0_f etc..
nat is not really relevant as of now.
Any idea how to do it (I already tried reshape wide but it tells me the data is already wide)
Comment