Created
March 29, 2018 08:31
-
-
Save umran/64ccb30a8f3c9fedcb142c505e4b8389 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gen sex_of_first_born = . | |
foreach i in b4_16 b4_15 b4_14 b4_13 b4_12 b4_11 b4_10 b4_09 b4_08 b4_07 b4_06 b4_05 b4_04 b4_03 b4_02 b4_01 { | |
if(`i' ==.) { | |
continue | |
} | |
replace sex_of_first_born = `i' | |
} | |
* verify the newly generated variable | |
browse sex_of_first_born b4_16 b4_15 b4_14 b4_13 b4_12 b4_11 b4_10 b4_09 b4_08 b4_07 b4_06 b4_05 b4_04 b4_03 b4_02 b4_01 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment