Project

General

Profile

Support #1005

Parents-children dyads

Added by Giorgio Piccitto almost 6 years ago. Updated almost 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
#1

Updated by Giorgio Piccitto almost 6 years ago

Sorry, I attach the two tables (the first what we have, the second what we want) because they came up not well-aligned.

Thanks again, best, G.

#2

Updated by Stephanie Auty almost 6 years ago

  • Status changed from New to In Progress
  • Assignee set to Stephanie Auty
  • % Done changed from 0 to 10
  • Private changed from Yes to No

Many thanks for your enquiry. The Understanding Society team is looking into it and we will get back to you as soon as we can.

Best wishes,
Stephanie Auty - Understanding Society User Support Officer

#3

Updated by Stephanie Auty almost 6 years ago

  • Status changed from In Progress to Feedback
  • Assignee changed from Stephanie Auty to Giorgio Piccitto
  • % Done changed from 10 to 70

Dear Giorgio,

To solve this problem, you can split the file into male and female respondents. Then use the male file to merge children to fathers (in a 1:m or m:1 merge, depending on which is the 'using' file) and use the female file to merge children to mothers. You can then append these files to create the file you want to use.

There is some syntax available at the bottom of this page under syntax/code, a file named linking_parents_information by Alita Nandi, which may help: https://discover.ukdataservice.ac.uk/catalogue/?sn=6614&type=Data%20catalogue#close

Best wishes,
Stephanie Auty - Understanding Society User Support Officer

#4

Updated by Stephanie Auty almost 6 years ago

  • Status changed from Feedback to Resolved
  • % Done changed from 70 to 100

Also available in: Atom PDF