The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Countries » Ethiopia » prevalence of anemia and associated factors (mismatch b/n DHS report and dataset)
prevalence of anemia and associated factors [message #18374] Thu, 21 November 2019 01:48 Go to next message
zelalem is currently offline  zelalem
Messages: 7
Registered: November 2019
Member
Dear all
I am going to analyse prevalence of anemia and associated factors in children aged 6-59 months, using Ethiopian DHS 2016, but I have faced a mismatch b/n the report and data set which I am going to use. i.e ETKR70FL stata data set. I have weighted it and I try to treat missung values.
Re: prevalence of anemia and associated factors [message #18376 is a reply to message #18374] Thu, 21 November 2019 05:28 Go to previous messageGo to next message
Mlue
Messages: 92
Registered: February 2017
Location: North West
Senior Member
Hello zelalem,

Try this one (use the PR file [ETPR70FL]):

clear all
set matsize 800
set maxvar 10000
set mem 1g
cd "C:\UsersUser88\Desktop\ETHIOPIA DHS 2016\ETPR70DT"
use "ETPR70FL", clear
set more off

** <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><> **

** WEIGHT VARIABLE
gen weight = hv005/1000000
gen wt=weight

** <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><> **

** SURVEY SET
gen psu =    hv021
//gen strata = v022
gen strata = hv023
svyset psu [pw = weight], strata(strata)

** <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><> **

cap drop anaemiac
recode hc56 (0/69=3 "Severe anaemia") (70/99=2 "Moderate anaemia") ///
(100/109=1 "Mild anaemia") (110/250=0 "Not anaemiac") (999=.), g(anaemiac) 

cap drop any_anaemia
gen any_anaemia = inrange(anaemiac,1,3)
label define any_anaemia 0"Has no anaemia" 1"Has anaemia"
label var any_anaemia "Prevalence of anaemia in children"
label val any_anaemia any_anaemia

** <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><> **

keep if hc1 >= 6 & hc1 <= 59 & hv103==1

** <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><> **
keep if anaemiac !=.

** <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><> **

** CHECK **
svy: tab any_anaemia, count format(%9.0f)
svy: tab anaemiac, count format(%9.0f)

svy: tab hv270 any_anaemia, percent format(%9.1f) row
svy: tab hv025 any_anaemia, percent format(%9.1f) row
svy: tab hv024 any_anaemia, percent format(%9.1f) row

svy: tab hv270 anaemiac, percent format(%9.1f) row
svy: tab hv025 anaemiac, percent format(%9.1f) row
svy: tab hv024 anaemiac, percent format(%9.1f) row

** <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><> **

/*
svy: tab hv270 anaemiac, count format(%9.0f)
svy: tab hv025 anaemiac, count format(%9.0f)
svy: tab hv024 anaemiac, count format(%9.0f)
*/

** <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><> **

ssc install hplot, replace //needs internet connection
ssc install catplot, replace //needs internet connection

catplot anaemiac [aw=weight], by(hv270, compact note("") col(1)) ///
        bar(1, blcolor(gs8) bfcolor(brown*.4)) blabel(bar, format(%9.1f) ///
        pos(base)) percent(hv270) subtitle(, pos(9) ring(1) bcolor(none) nobexpand place(e)) ///
        ytitle(Prevalence of anaemia in children) var1opts(gap(*0.1) axis(noline)) ///
        var2opts(gap(*.2)) ysize(5) yla(none) ysc(noline) ///
        plotregion(lcolor(none))

*graph export "Prevalence of anaemia in children by HH wealth.emf", replace	
graph export "Prevalence of anaemia in children by HH wealth.pdf", replace	

*****************

catplot anaemiac hv270 [aw=weight], percent(hv270) stack asyvars ///
		bar(1, bcolor(ltblue)) bar(2, bcolor(pink*.2)) bar(3, bcolor(brown*.4)) ///
		bar(4, bcolor(bluishgray)) bar(5, bcolor(gs10)) bar(6, bcolor(red*.4)) ///
		bar(7, bcolor(sand)) blabel(bar, format(%9.1f) pos(center)) ///
		blabel(bar, format(%9.1f) pos(center) size(tiny)orientation(vertical) color(black)) ///
		ytitle(%) title(Prevalence of anaemia in children by HH wealth) subtitle(Ethiopia DHS 2016)

graph export "Prevalence of anaemia in children by HH wealth2.pdf", replace	

catplot any_anaemia hv270 [aw=weight], percent(hv270) stack asyvars ///
		bar(1, bcolor(gold)) bar(2, bcolor(ltblue)) bar(3, bcolor(gs0)) ///
		blabel(bar, format(%9.1f) pos(center)) bar(4, bcolor(g)) ytitle(%) ///
		title(Prevalence of any anaemia in children) subtitle(Ethiopia DHS 2016)

graph export "Prevalence of any anaemia in children by HH wealth.pdf", replace	

catplot any_anaemia hv024 [aw=weight], percent(hv024) stack asyvars ///
		bar(1, bcolor(gold)) bar(2, bcolor(ltblue)) bar(3, bcolor(gs0)) ///
		blabel(bar, format(%9.1f) pos(center)) bar(4, bcolor(g)) ytitle(%) ///
		title(Prevalence of any anaemia in children) subtitle(Ethiopia DHS 2016)

graph export "Prevalence of any anaemia in children by region.pdf", replace	

exit

Re: prevalence of anemia and associated factors in Under five years children [message #19308 is a reply to message #18374] Wed, 27 May 2020 08:42 Go to previous message
kedirm022@gmail.com is currently offline  kedirm022@gmail.com
Messages: 1
Registered: May 2020
Member
I want to apply bayesian Geoadditive on Spatial pattern and associated factors in anemia in Under five years children,Am very challenged to get the Variable name V025,V024 And like that is that it's for mother or children
Previous Topic: Height and Weight Scores (WHO Child Growth Standards) data
Next Topic: Women's specific Data; TVET & employment variables
Goto Forum:
  


Current Time: Fri Nov 8 19:02:56 Coordinated Universal Time 2024