replicating children 6-23 month [message #14957] |
Mon, 21 May 2018 09:16 |
Riri
Messages: 1 Registered: May 2018 Location: Ethiopia
|
Member |
|
|
Dear
I am using the Ethiopian 2016 DHS and I couldnt match the table 11.8 "among youngest children age 6-23 months living with the mother". The total number in the table includes 2960 children while I am getting 3075 after applying the following command in stata.
use "C:\Users\UserPc\Desktop\thesis\stata 2016\diet diet.dta" , clear
gen age = v008-b3
* select on the living children 6-23 month
keep if age<24 &age>5 & b5==1
* regroup age
recode age(0/5=.)(6/8=1 "6-8")(9/11=2 "9-11")(12/17=3 "12-17")(18/23=4 "18-23")(24/59=.), gen(child_age)
tab child_age
tab child_age[iw=v005/1000000]
* Keep only those living with their mother
keep if b9==0
* for checking if the child is the youngest
drop if _n > 0 & caseid == caseid[_n-1]
tab child_age
tab child_age[iw=v005/1000000]
Can you please explain to me how I can get the exact number and percentage as the table in the report.
Thank you
|
|
|