The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Data » Dataset use in Stata » Merging Height and Weight Data with KR files
Merging Height and Weight Data with KR files [message #1307] Fri, 07 February 2014 05:42 Go to next message
nina is currently offline  nina
Messages: 2
Registered: February 2014
Member
Hello,

I would like to do an analysis which estimates the effect of child vaccination on anthropometric outcomes while using all DHS Standard surveys which are available.
Therefore I use the KR files and the height and weight data (HW files) based on the new WHO growth reference.
I tried to merge the Height and Weight files with the KR files for all DHS countries and years where those HW-files were available.

I have some problems merging those growth data which are collected at household level. I did it as it is described: first I merged the HW files with the PR files (using hhid and hvidx from the PR files and HWHHID HWLINE from the HW files) and then I merged those newly created PR files with the KR files (using V001, V002, B16 from the KR files and HV001, HV002 and HWLINE from the newly created PR files).

My problems are

1. While merging the Egypt 2000 HW and PR files Stata doesn't match the data. It says : matched=0
I checked the identifier variables in both datasets and found observations which are available in both files according to the identifier variables. Why doesn't Stata merge those observations?

2. When I try to merge the newly created PR files with the KR files, Stata says that v001 v002 and b16 doesn't uniquely identify the observation the KR files. Therefore I created a household id variable in the KR files (taking the first 12 characters from caseid) and used this as an identifier too. But there are still observations in the KR files which can't be uniquely identified. This is mostly based on the fact that many children in the KR files have the same line number (b16) within a household. How could I solve this problem so that I can identify those children uniquely and merge the KR files with the PR files?

3. For many datasets where I was able to merge the KR files and HW files (at household level) the z-scores are only available for a small proportion of the children in the KR files in comparison to the z-scores based on the old reference from the KR files.
Therefore I calculated the z-scores (based on the new WHO reference) out of the KR files using the igrowup ado file from the WHO homepage (I used for gender the variable b4, age in months variable hw1, weight variable hw2, height variable hw3, measure variable hw15, oedema and sampling weight as not available). If I compare those calculated z-scores with the z-scores of the same observations in the HW and KR files (also based on the new WHO reference), the calculated weight-for-height variable matches with those in the HW files but the other two z-scores (weight-for-age and height-for-age) differ.
How did you calculate the z-scores in the KR and HW files. Is there a do file available?

Many thanks in advance!

Re: Merging Height and Weight Data with KR files [message #1438 is a reply to message #1307] Wed, 26 February 2014 09:05 Go to previous messageGo to next message
Bridgette-DHS is currently offline  Bridgette-DHS
Messages: 3199
Registered: February 2013
Senior Member
We are working on a response to your posting. Thanks!
Re: Merging Height and Weight Data with KR files [message #1445 is a reply to message #1307] Wed, 26 February 2014 10:38 Go to previous messageGo to next message
Bridgette-DHS is currently offline  Bridgette-DHS
Messages: 3199
Registered: February 2013
Senior Member
Attached is a syntax provided by DHS Specialist, Tom Pullum, for a similar posting. He belives the problem with Egypt 2000 is probably that the string version of caseid is incompatible with the numeric version of v001 and v002 and b16. The attachment might give you some ideas on what to do, and if you still have questions, please let us know.
Re: Merging Height and Weight Data with KR files [message #15758 is a reply to message #1445] Tue, 11 September 2018 04:26 Go to previous message
andreaseiermann is currently offline  andreaseiermann
Messages: 3
Registered: September 2018
Location: Heidelberg, Germany
Member
This is an old post and your problem has probably been solved. But I ran into a similar problem and thought I'd share my solution in case someone in the future ends up on this thread (as I did) - for the record: I was working with Bangladesh 2004 data for this.
v001 v002 and b16 do not uniquely identify records in the KR file as long as children who are dead are in the KR file (b16 will be missing for them which doesn't seem to identify a record as different from non-missing). After removing all dead children (which I don't need for my analysis anyways - maybe recoding them to a random high value would work as well), I still had one problematic case, which was a child with b16==0 (which signifies children who are not listed in the household) for a woman with two children who were not in the household. After dropping these two children as well, v001 002 and b16 were unique identifiers and my merge worked.

[Updated on: Tue, 11 September 2018 04:52]

Report message to a moderator

Previous Topic: Latent Class Analysis
Next Topic: Adjusting sample weight for multilevel analysis- SPA dataset
Goto Forum:
  


Current Time: Sun Dec 1 06:07:28 Coordinated Universal Time 2024