The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Topics » Biomarkers » Matching the sample size
Matching the sample size [message #14355] Tue, 27 March 2018 06:44 Go to next message
Santosh is currently offline  Santosh
Messages: 8
Registered: January 2018
Location: Tokyo, Japan
Member
Dear DHS experts,

I wrote about the problem in matching sample size for the prevalence of hypertension in India. I am using DHS data 2016 and trying to match the prevalence of hypertension with the final report of NFHS-4 2015-16 table 12.3.1 and 12.3.2.
I have attached the do file

Please help to solve the issue. I wrote about it 5 weeks back and didn't get any reply. One of our colleague suggested the solution, but still that didn't worked.

I hope for your reply. Your promptness will be highly appreciated.

Regards,
Santosh
Re: Matching the sample size [message #14402 is a reply to message #14355] Tue, 03 April 2018 17:52 Go to previous messageGo to next message
Trevor-DHS is currently offline  Trevor-DHS
Messages: 671
Registered: January 2013
Senior Member
I tried looking at your do file, but it is missing some steps. sbp and dbp do not exist.

However, I think the bigger issue is which file you are working with. The tables in the report are run based on interviewed women and men using the IR and MR files. The blood pressure readings are merged from the PR files into the IR and MR files for each eligible woman and man.

Then once you have merged the blood pressure readings into the IR and MR files, the blood pressure readings are combined to form the final result blood pressure measures for analysis, as follows:
gen sbp = .
gen dbp = .
* if the first measure is given
replace sys = SB16S if inrange(SB16S,20,299) & inrange(SB16D,20,299)
replace dia = SB16D if inrange(SB16S,20,299) & inrange(SB16D,20,299)
* if the second measure is given take it
replace sys = SB23S if inrange(SB23S,20,299) & inrange(SB23D,20,299)
replace dia = SB23D if inrange(SB23S,20,299) & inrange(SB23D,20,299)
* if the third measure is given take the last
replace sys = SB27S if inrange(SB27S,20,299) & inrange(SB27D,20,299)
replace dia = SB27D if inrange(SB27S,20,299) & inrange(SB27D,20,299)
* if all measures are given, then average the last two
replace sys = (SB23S + SB27S)/2 if inrange(SB27S,20,299) & inrange(SB27D,20,299) & inrange(SB23S,20,299) & inrange(SB23D,20,299)
replace dia = (SB27D + SB27D)/2 if inrange(SB27S,20,299) & inrange(SB27D,20,299) & inrange(SB23S,20,299) & inrange(SB23D,20,299)

I hope this helps.

[Updated on: Tue, 03 April 2018 17:52]

Report message to a moderator

Re: Matching the sample size [message #14405 is a reply to message #14402] Tue, 03 April 2018 22:54 Go to previous messageGo to next message
Santosh is currently offline  Santosh
Messages: 8
Registered: January 2018
Location: Tokyo, Japan
Member
Dear MR. Trevor,

Thank you for your reply. I am sorry for not mentioning the file name. I am using PR file from DHS India 2016 to estimate the prevalence of hypertension with reference to the NFHS-4 2015-16 report table 12.3.1 and 12.3.2.

I have used following codes for systolic (sbp) and diastolic (dbp) measurement:

* Systolic BP

gen s1=shb16s
replace s1=. if s1>299

gen s2=shb23s
replace s2=. if s2>990

gen s3=shb27s
replace s3=. if s3>990

gen d1=shb16d
replace d1=. if d1>297

gen d2=shb23d
replace d2=. if d2>299

gen d3=shb27d
replace d3=. if d3>299


//systolic reading
egen sbp= rowmean(s2 s3)
replace sbp=. if sbp>990 // Drop unknown BP
drop if sbp==.
drop if sbp<70| sbp>=300

// diastollic reading
egen dbp= rowmean(d2 d3)
replace dbp=. if dbp>299 // Drop unknown BP
drop if dbp==.
drop if dbp<=40|dbp>=170
Re: Matching the sample size [message #14406 is a reply to message #14402] Tue, 03 April 2018 23:45 Go to previous messageGo to next message
Santosh is currently offline  Santosh
Messages: 8
Registered: January 2018
Location: Tokyo, Japan
Member
Dear Mr. Trevor,

Thank you for your help. I am able the match the prevalence with the report using the code you provided.

Thank you for your support and guidance.

Regards,
Santosh
Re: Matching the sample size [message #15412 is a reply to message #14406] Fri, 13 July 2018 22:07 Go to previous messageGo to next message
Sami is currently offline  Sami
Messages: 27
Registered: May 2016
Location: Nepal
Member
Dear Santosh,

I tried to work on your do file to match the report but some reason i am struggling. Can ypu please share your codes you applied to match the table?

Many thanks

Sammy
Re: Matching the sample size [message #15414 is a reply to message #14402] Sat, 14 July 2018 20:14 Go to previous messageGo to next message
Sami is currently offline  Sami
Messages: 27
Registered: May 2016
Location: Nepal
Member
Dear Trevor,

I was trying to match the India NFHS-4 2015-16 report table 12.3.1 using data file IAIR74FL.dta. However, first, i am unable to match the women sample size as shown in the report (682,651. Second, my hypertension percentage does not match to the report as (11%). I used the following code as you suggested.

use IAIR74FL, clear

gen rweight=v005/1000000
svyset v021 [pweight=rweight], strata(v023) vce(linearized) singleunit(missing)

gen sbp = .
gen dbp = .

**if all measures are given, then average the last two
replace sbp = (sb23s + sb27s)/2 if inrange(sb27s,20,299) & inrange(sb27d,20,299) & inrange(sb23s,20,299) & inrange(sb23d,20,299)
replace dbp = (sb27d + sb27d)/2 if inrange(sb27s,20,299) & inrange(sb27d,20,299) & inrange(sb23s,20,299) & inrange(sb23d,20,299)


*****drop unknown BP***
//systolic reading
drop if sbp==.

// diastollic reading
drop if dbp==.

***prehypertension**

****hypertension****
gen ht=0 if sbp!=.| dbp!=.
replace ht=1 if (sbp>=140 |dbp>=90)& (sbp!=.|dbp!=.)

svy:tab hyper, count format(%9.0f)

Can you please help me how to resolve this problem?

Many thanks

Sammy


Re: Matching the sample size [message #15437 is a reply to message #15414] Wed, 18 July 2018 16:48 Go to previous message
Santosh is currently offline  Santosh
Messages: 8
Registered: January 2018
Location: Tokyo, Japan
Member
Dear Sammy,

I am sorry for late reply. Following are the codes I used.

// Systollic and Diastollic BP
gen sys = .
gen dia = .
* if the first measure is given
replace sys = shb16s if inrange(shb16s,20,299) & inrange(shb16d,20,299)
replace dia = shb16d if inrange(shb16s,20,299) & inrange(shb16d,20,299)
* if the second measure is given take it
replace sys = shb23s if inrange(shb23s,20,299) & inrange(shb23d,20,299)
replace dia = shb23d if inrange(shb23s,20,299) & inrange(shb23d,20,299)
* if the third measure is given take the last
replace sys = shb27s if inrange(shb27s,20,299) & inrange(shb27d,20,299)
replace dia = shb27d if inrange(shb27s,20,299) & inrange(shb27d,20,299)
* if all measures are given, then average the last two
replace sys = (shb23s + shb27s)/2 if inrange(shb27s,20,299) & inrange(shb27d,20,299) & inrange(shb23s,20,299) & inrange(shb23d,20,299)
replace dia = (shb23d + shb27d)/2 if inrange(shb27s,20,299) & inrange(shb27d,20,299) & inrange(shb23s,20,299) & inrange(shb23d,20,299)

Regards,
Sam
Previous Topic: Data in CSV/XLSX Format
Next Topic: Biomarker data sets
Goto Forum:
  


Current Time: Sat Dec 7 15:23:54 Eastern Standard Time 2019