The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Countries » Kenya » KDHS 2022: Table 11.12 Micronutrient supplementation and deworming among children
KDHS 2022: Table 11.12 Micronutrient supplementation and deworming among children [message #28232] Mon, 04 December 2023 10:56 Go to previous message
sokiya is currently offline  sokiya
Messages: 76
Registered: May 2017
Location: Nairobi
Senior Member
Hi,
I am trying to replicate in the column "Percentage given vitamin A supplements in last 6 months" in Table 11.12 using the code below taken from DHS GitHub repository

use "$KEKR8AFL.dta", clear
**** child's age ****
gen age = v008 - b3


//Received Vit. A supplements
recode h33m (98=.), gen(h33m2)
recode h33d (98=15), gen(h33d2)
recode h33y (9998=.), gen(h33y2)
*gen nt_ch_micro_vas= h34==1 | (int((v008a - (mdy(h33m2,h33d2,h33y2) + 21916) )/30.4375) < 6) 
gen nt_ch_micro_vas= h34==1 | (int((mdy(v006,v016,v007) - mdy(h33m2,h33d2,h33y2) )/30.4375) < 6)
replace nt_ch_micro_vas=. if !inrange(age,6,59) | b5==0
label values nt_ch_micro_vas yesno 
label var nt_ch_micro_vas "Children age 6-59 mos given Vit. A supplements"

with no success. Any help will be greatly appreciated.
 
Read Message
Read Message
Read Message
Previous Topic: Average number of school years
Next Topic: Merging Aggregate Group Data with V613 Responses
Goto Forum:
  


Current Time: Mon Aug 5 11:15:46 Coordinated Universal Time 2024