Hi,
I am trying to merge together 2 variables using the replace function. I have data for year of birth for all the countries in my dataset but for Ethiopia, it is listed as a separate variable.
So far I have tried doing:
etc
But is there an easier way to do this as the years go upto 2003 so this could take a while
Thank you
I am trying to merge together 2 variables using the replace function. I have data for year of birth for all the countries in my dataset but for Ethiopia, it is listed as a separate variable.
So far I have tried doing:
Code:
replace birthyear = 1947 if birthyear_et == 1947 replace birthyear = 1948 if birthyear_et == 1948 replace birthyear = 1949 if birthyear_et == 1949
But is there an easier way to do this as the years go upto 2003 so this could take a while
Thank you
Comment