I would like to identify the parent sex of each person within the same household in stata, but not sure how to do:
original dataset:
SUID ADDID PNUM PNPT sex
1 11 101 . 1
1 11 102 . 2
1 11 103 101 1
1 11 104 101 1
expected output:
SUID ADDID PNUM PNPT sex parent_sex
1 11 101 . 1 .
1 11 102 . 2 .
1 11 103 101 1 1
1 11 104 101 1 1
Thank you for your time to look into this question!
original dataset:
SUID ADDID PNUM PNPT sex
1 11 101 . 1
1 11 102 . 2
1 11 103 101 1
1 11 104 101 1
expected output:
SUID ADDID PNUM PNPT sex parent_sex
1 11 101 . 1 .
1 11 102 . 2 .
1 11 103 101 1 1
1 11 104 101 1 1
Thank you for your time to look into this question!
Comment