Re: Calculating Undernutrition Indicators for Under-5 Children in Older surveys [message #30385 is a reply to message #28647] |
Tue, 19 November 2024 10:31 |
Adetunji
Messages: 7 Registered: August 2023
|
Member |
|
|
I am using the Nigeria DHS for 1990 and 2003. I have successfully merged the anthropometric data in the HW file in the 2003 to the KR file using the code below. However, I have issue replicating the same for the 1990 datasets.
There is no b16 (child's line number) in the 1990 KR file and there is no hwhhid in the 1990 HW file.
Kindly let me know how to navigate this. My code is shared below:
use "${kr2003}", clear
gen hwhhid = substr(caseid,1,12)
clonevar hwline = b16
sort hwhhid hwline
merge m:1 hwhhid hwline using "${hw2003}"
keep if _merge==3
//Rename the anthropometric variables to make it comparable to the earlier surveys
rename hc70 hw70
rename hc71 hw71
rename hc72 hw72
rename hc73 hw73
//Save the merged dataset
save "${temp}/kr_hw_2003", replace
use "${kr1990}", clear
gen hwhhid = substr(caseid,1,12)
clonevar hwline = v003
sort hwhhid hwline
merge m:1 hwhhid hwline using "${hw1990}"
keep if _merge==3
//Rename the anthropometric variables to make it comparable to the earlier surveys
rename hc70 hw70
rename hc71 hw71
rename hc72 hw72
rename hc73 hw73
//Save the merged dataset
save "${temp}/kr_hw_1990", replace
|
|
|