Project

General

Profile

Actions

Support #1005

open

Parents-children dyads

Added by Giorgio Piccitto over 6 years ago. Updated over 6 years ago.

Status:
Resolved
Priority:
Normal
Category:
-
Start date:
07/20/2018
% Done:

100%


Description

Dear all,
I would like to know your advise about the following issue:

I need to create dyads for each parents-children relationsship (thus, in one row information of father and children 1, in another mother and children 1, in another father and children 2, and so on and so forth).

Basically, from

a_hidp a_pno pidp a_sex a_dvage a_hgbiom a_hgbiof
1 1 68652807 female 48 0 0
1 2 68652811 male 46 0 0
1 3 68652815 female 17 1 2
1 4 68652819 male 20 1 2

to

a_hidp a_pno a_hgbiom a_sex a_dvage Mother_sex Mother_age Father_sex Father _age
1 3 1 female 17 female 48 . .
1 3 2 female 17 . . male 46
1 4 1 male 20 female 48 . .
1 4 2 male 20 . . male 46

I tried to adapt the procedure descripted in the example 7 (how to match the information of partners), but it did not work because Stata says "variables a_hidp a_pno do not uniquely identify observations in the master data"

I suspect that this is due to the fact that there is not a 1-to-1 correspondance between a_pno and a_hgbiom (a father\mother can have several children, differently from the relationsip 1 partner-to-1 partner).

Do you have any clue about how to do this task?

Thanks a lot in advance for your support.
Best, G.


Files

1.jpg (29.7 KB) 1.jpg Giorgio Piccitto, 07/20/2018 12:03 PM
2.jpg (35.2 KB) 2.jpg Giorgio Piccitto, 07/20/2018 12:03 PM
Actions

Also available in: Atom PDF