The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Data » Dataset use in Stata » Merging households with children information
Merging households with children information [message #4058] Tue, 24 March 2015 16:24 Go to next message
Masa is currently offline  Masa
Messages: 1
Registered: March 2015
Location: United States
Member
Dear all,

I am working with all the DHS available for Latin America and Caribbean Countries. I want to merge the households with the children information. I am trying to get the teenage pregnancy and motherhood indicator and other indicators with different specifications.

I started with Peru 2012. My code is the following:

*Children
use "DHS\PEBR6IFL", clear
sort v001 v002 b16
egen id = concat(v001 v002 b16)
sort id
saveold "DHS\data_child", clear

*Households
use "DHS\PEPR6IFL.DTA", clear
sort hv001 hv002 hvidx
egen id = concat(hv001 hv002 hvidx)
merge m:m id using "DHS\data_child"


I would have expected that all the children match in their households, but I got ~12000 observations that are only in the using data (children database).

Checking the variable b16 (line of the children in household), I realized that the ~12000 observations not matched correspond to members that were not listed in the household.

I didn't delete any observation, instead I generated an id with the cluster and household number and matched those ~12000 in their households. Is it right?

On the other hand, I wanted to do the same with the database of Peru 2000, but all the values in b16 (line of the child in the household) are missing values. How could I generate the id in this case?

Thank you in advance for your help.

Best regards,
Masa









Re: Merging households with children information [message #4159 is a reply to message #4058] Fri, 10 April 2015 08:38 Go to previous message
Bridgette-DHS is currently offline  Bridgette-DHS
Messages: 3016
Registered: February 2013
Senior Member
Someone at DHS was working on your March 24 posting (message #4058), but was out of the office for a few days. Do you still have the same question?

If so, can you say what ages of children you wish to include, and what kinds of variables in the BR and PR variables are of main interest?

Thank you
Previous Topic: Creating a panel dataset
Next Topic: How to set up sample weight for analysis
Goto Forum:
  


Current Time: Thu Mar 28 05:09:09 Coordinated Universal Time 2024