The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Topics » Nutrition and Anthropometry » Rwanda DHS 2014-15 ;Child Nutrition- Table 11.6
Rwanda DHS 2014-15 ;Child Nutrition- Table 11.6 [message #12042] Wed, 22 March 2017 11:33 Go to next message
crlnhalcyn is currently offline  crlnhalcyn
Messages: 3
Registered: March 2017
Member
Hi,

am trying to replicate Table 11.6 in the Rwanda DHS 14-15 using the KR file, but the distribution of children age 6-23 does not match up. Here is the code I have as of now:


*date of interview
desc v008

*date of birth
desc b3

*gen age
gen age = v008-b3
tab age

*sort
sort v000 v001 v002 v003 bidx

*Keep if :
*child is living with nother (b9=0)
*child is last-born (bidx=1)
*child is alive (b5=1)
*age range to 6-23 and keep only if child is alive

keep if b9==0
keep if bidx==1
keep if b5==1 & age<24
drop if age<6

*to match the distribution in table 11.6 (underestimated in every category except 9-11)
*recode age into groups

recode age (0/1=1 "0-1")(2/3=2 "2-3")(4/5=3 "4-5")(6/8=4 "6-8")(9/11=5 "9-11") ///
(12/17=6 "12-17")(18/23=7 "18-23")(24/59=.), gen(child_age)
tab child_age

*tab for multiple births

tab child_age b0

I have checked with various versions of code, but the distribution I am able to get does not match up to the one shown in Table 11.6. I would be most grateful for help!
Re: Rwanda DHS 2014-15 ;Child Nutrition- Table 11.6 [message #12058 is a reply to message #12042] Fri, 24 March 2017 08:56 Go to previous messageGo to next message
Liz-DHS
Messages: 1516
Registered: February 2013
Senior Member
Dear User, A response from technical expert Mr. Han Raggers:
Quote:

I think the trouble stems from the fact that since dhs7 we use B19 for age instead of V008-B3. It is more precise. I suggest the user tries that first and see if it works. If not we can start to dig some more. I assume all observations below were run on weighted data.
Re: Rwanda DHS 2014-15 ;Child Nutrition- Table 11.6 [message #12060 is a reply to message #12058] Fri, 24 March 2017 09:44 Go to previous messageGo to next message
crlnhalcyn is currently offline  crlnhalcyn
Messages: 3
Registered: March 2017
Member
Many thanks for your reply. Since I am using the KR file, I searched for b19 in the file, but no such variable was found. I checked section W21 (for the birth variables) in the DHS-VI recode manual since that was the recode structure in the survey summery. The last B variable listed is B16. I am not sure what I am doing incorrectly- I would be grateful is you could clarify?

Also, yes I did use weights. The entire svyset procedure I used is:

generate weight = v005/1000000
egen strata = group(v024 v025), label
tab strata
svyset [pweight=weight], psu(v021) strata(strata)

with the weight used as specified above


Many thanks again in advance for your help!

Re: Rwanda DHS 2014-15 ;Child Nutrition- Table 11.6 [message #12076 is a reply to message #12042] Mon, 27 March 2017 03:37 Go to previous messageGo to next message
HanR is currently offline  HanR
Messages: 19
Registered: March 2013
Location: Netherlands
Member
Hi,

You are right it is a DHS 6 type recode structure and B19 will not exist. Looking at your code below I noticed that the keep if bidx==1
may need some refinement. We are looking for the youngest child living with the mother. "keep if bidx==1" looks at the last born. This child may have died, making b9 not applicable. If that is the case you will want to look at the second (or even third sometimes) child and see if she/he fits your conditions below.

Good luck and keep us posted.
Re: Rwanda DHS 2014-15 ;Child Nutrition- Table 11.6 [message #12083 is a reply to message #12076] Mon, 27 March 2017 15:36 Go to previous messageGo to next message
crlnhalcyn is currently offline  crlnhalcyn
Messages: 3
Registered: March 2017
Member
Many thanks for your reply, that really helped! I can now replicate the distribution using the code below.
I just wanted to check if the age variable (v008-b3) I am using is correct?

The code I have now is:
*** Find the youngest child living with mother and keep if age 6-23 months ******
**check age in months
gen age = v008-b3
*sort
sort caseid bidx
*Keep if :
keep if age<24 & b5==1
*Regroup age
recode age (0/1=1 "0-1")(2/3=2 "2-3")(4/5=3 "4-5")(6/8=4 "6-8")(9/11=5 "9-11") ///
(12/17=6 "12-17")(18/23=7 "18-23")(24/59=.), gen(child_age)
*child is living with mother (b9=0)
keep if b9==0
*Check if the child is the youngest
drop if _n > 0 & caseid == caseid[_n-1]
*drop if child is less than 6
drop if age<6
*to match the distribution in table 11.6
svy: tab child_age,count

Many thanks again!

[Updated on: Mon, 27 March 2017 15:37]

Report message to a moderator

Re: Rwanda DHS 2014-15 ;Child Nutrition- Table 11.6 [message #12085 is a reply to message #12083] Tue, 28 March 2017 02:51 Go to previous message
HanR is currently offline  HanR
Messages: 19
Registered: March 2013
Location: Netherlands
Member
Yes, you can calculate age in months for children that way. This is true for all pre-dhs7 recode types. In dhs7 a new variable B19 is introduced which gives directly the age in months of the children (including months since birth for dead children).
Previous Topic: cameroon 1998 v002
Next Topic: how to download a data set
Goto Forum:
  


Current Time: Thu Mar 28 09:38:21 Coordinated Universal Time 2024