Rwanda DHS 2014-15 ;Child Nutrition- Table 11.6 [message #12042] |
Wed, 22 March 2017 11:33 |
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 |
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 #12083 is a reply to message #12076] |
Mon, 27 March 2017 15:36 |
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 |
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).
|
|
|