The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Topics » General » Hypertension (Computing hypertension )
Hypertension [message #17617] Fri, 26 April 2019 20:48
pramesh is currently offline  pramesh
Messages: 41
Registered: November 2015
Location: australia
Member
Dear DHS forum,

I am using South Africa recent DHS and trying to match the total sample for hypertension among male and female. But number does not match with the report.

Can anyone suggest me to resolve this problem?

The following is the program a used:

clear
set more off
**cd "F:\Files2010\Non_communicable_diseases\SouthAfrica\"**
use ZAPR71FL.DTA


count // total of 699686 observations
*preserve
*keep if v213==1 // to restrict for pregnant women 15-49 years of age
count // 32,428 pregnant women at the time of survey
gen sys=.
gen dia=.


replace sys = (sh321a + sh328a)/2 if inrange(sh321a,20,299) & inrange(sh332a,20,299) & inrange(sh321a,20,299) & inrange(sh332a,20,299)


replace dia = (sh321b + sh328b)/2 if inrange(sh321b,20,299) & inrange(sh332b,20,299) & inrange(sh321b,20,299) & inrange(sh332b,20,299)

***rename ***

rename sys sbp
rename dia dbp

drop if sbp==.|dbp==. //drop 1609 cases who refused, technical problems and or missing


count // total sample size



//Outcome(1)Pre-hypertension
gen pht=0 if sbp!=.|dbp!=.
replace pht=1 if (sbp>=120 & sbp<=139) | (dbp>=80 & dbp<90)
label var pht "Pre-hypertension"
tab pht
// Outcome(2)Hypertension
gen ht=0 if sbp!=.| dbp!=.
replace ht=1 if (sbp>=140 | dbp>=90) & (sbp!=. |dbp!=.)
label var ht "Hypertension"
tab ht

// Outcome(3)normal

gen normal=0 if sbp!=.| dbp!=.
replace ht=1 if (sbp<120 | dbp<80) & (sbp!=. |dbp!=.)
label var normal "Hypertension"
tab normal

su sbp dbp, d

gen pht1=. if sbp!=.|dbp!=.
replace pht1=0 if (sbp <120 & sbp~=.) | (dbp <80 & dbp~=.)
replace pht1=1 if (sbp>=120 & sbp<=139) | (dbp>=80 & dbp<90)
replace pht1=2 if (sbp>=140 & sbp<=159) | (dbp>=90 & dbp<100)
replace pht1=3 if (sbp>=160 & sbp<=179) | (dbp>=100 & dbp<110)
replace pht1=4 if (sbp>=180 & sbp~=.) | (dbp>=110 & dbp~=.)
label define pht1 0 "Normal" 1 "pre hp" 2 "Stage1 hp" 3 "Stage2 hp" 4 "Stage3 hp"
label value pht1 pht1
label var pht1 "Hp cat"
tab pht1
gen rweight=hv005/1000000
svyset hv021 [pweight=rweight], strata(hv023) vce(linearized) singleunit(missing)

svy:tab pht1, count




Thank you so much.
 
Read Message
Previous Topic: Altitude with GPS data
Next Topic: Interviewer characteristics data
Goto Forum:
  


Current Time: Wed Nov 13 20:24:30 Coordinated Universal Time 2024