Dear all,
I am struggling with a maybe simple operation.
I have some household data, and I would like to create some dyads variables that link each parent to each children within that household.
My information are:
- a_hidp = id of household
- pno = id of position within the family
- pidp = id of person (cross-wave, always the same)
- a_sex = sex of respondent
- dv_age = age of respondent
- a_hgbiom = pno of biological mother (it corresponds to the pno of mother if within the household)
- a_hgbiof = pno of biological father (it corresponds to the pno of father if within the household)
Here the example:
Do you know a viable way to do this? I provided the simplest example (only two people in a household, mother and daughter), but of course there are other issues.
Any suggestion will be very appreciated.
Thanks a lot, best, G.
I am struggling with a maybe simple operation.
I have some household data, and I would like to create some dyads variables that link each parent to each children within that household.
My information are:
- a_hidp = id of household
- pno = id of position within the family
- pidp = id of person (cross-wave, always the same)
- a_sex = sex of respondent
- dv_age = age of respondent
- a_hgbiom = pno of biological mother (it corresponds to the pno of mother if within the household)
- a_hgbiof = pno of biological father (it corresponds to the pno of father if within the household)
Here the example:
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input long a_hidp byte a_pno long pidp byte a_sex int a_dvage byte(a_hgbiom a_hgbiof) 68006123 1 68006127 2 39 0 0 68006123 3 68006135 2 17 1 0 end label values a_hidp a_hidp label values a_pno a_pno label values a_sex a_sex label def a_sex 2 "female", modify label values a_dvage a_dvage label values a_hgbiom a_hgbiom label values a_hgbiof a_hgbiof
Any suggestion will be very appreciated.
Thanks a lot, best, G.
Comment