Support #1521
openHow to merge variables from newborn file when my main unit are children?
100%
Description
Good afternoon!
I was wondering if you could help me. I am working with Stata and currently have a dataset where children are the main unit of observation combined with their parents' info - pidp, education and so on. All waves are merged, and sorted by child pidp and wave in a long format.
I would like to know the birth weight of the children, which is in newborn files. I created a file with all newborn waves merged together. However, some mothers are mentioned multiple times and therefore it is not allowing me to merge by mother pidp. Is there an easy way to do it?
Kind regards,
Michaela Kyclova
Updated by Understanding Society User Support Team almost 4 years ago
- Status changed from New to Feedback
- % Done changed from 0 to 50
- Private changed from Yes to No
You should try m:1 merge
In the child file all 0-15 year olds in any household are present. As parents may have more than one child in the household, when you try to merge the child file with indresp, there will be many children match to those individuals. So, a m:1 option needs to be mentioned.
See the syntax file, "Matching co-resident parents' information" here: https://www.understandingsociety.ac.uk/documentation/mainstage/syntax
Hope this helps. If you have further queries please let us know.
Best wishes,
Understanding Society User Support Team
Updated by Understanding Society User Support Team about 3 years ago
- Status changed from Feedback to Resolved
- % Done changed from 50 to 100