How to merge variables from newborn file when my main unit are children?
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?
Updated by Understanding Society User Support Team over 2 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.
Understanding Society User Support Team