Merging youth to family information
Dear All, could someone please assist me. I have created a file with responses from the youth questionnaire.
I have been trying without success to merge this information to some family characteristics(i.e. information on the parents education, income, maternal age at first birth etc). I could for example merge the youth questionnaire to egoalt but not to indresp files. I am using stata.
Thank you for your time beforehand.
#1 Updated by Alita Nandi about 5 years ago
Follow these steps:
1. Merge youth questionnaire file, w_youth, to w_indall using pidp. The variables that you need from w_indall are the mother and father PIDPs: w_mnspid and w_fnspid
2. Drop observations in w_indall but not in w_youth and save it, say as temp_youth
3. Open temp_youth, rename pidp to something else say, youth_pidp
4. Rename mother pidp, w_mnspid, to pidp
5. Merge that file with w_indresp using pidp and keep whatever mother variables you need (note this will be a many to one merge for households with youth siblings)
6. Rename pidp back to w_mnspid
7. Save it as mother file, w_mother
8. Repeat steps 3-8 for father: w_father
9. Now merge these two files, w_mother and w_father, to temp_youth file using w_mnspid and w_fnspid
Please remember to check the output at each step.
On behalf of the team.