The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Data » Merging data files » merging children's file and wealth index
merging children's file and wealth index [message #6822] Mon, 20 July 2015 13:00 Go to next message
avr25 is currently offline  avr25
Messages: 3
Registered: April 2015
Hi! Does anyone have code in stata to merge the children's file(KR) to the wealth file.
I am aware that caseid = whhid + v003
I just don't know how to subtract the last character in caseid to match it to whhid? what command or syntax would be most appropriate?
Re: merging children's file and wealth index [message #6837 is a reply to message #6822] Mon, 20 July 2015 16:26 Go to previous message
Messages: 291
Registered: March 2013
Senior Member

You can use the "substring" command and simply keep all of the characters except the last one. Syntax can be found here if you are using Stata:

Previous Topic: Computing the stunting prevalence among U5 children according to the BMI of their mothers
Next Topic: Weighting after Merging
Goto Forum:

Current Time: Fri Apr 3 07:35:43 Eastern Daylight Time 2020