Home » Topics » Biomarkers » Matching the sample size
Matching the sample size [message #14355] |
Tue, 27 March 2018 06:44 ![Go to next message Go to next message](/theme/default/images/down.png) |
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 message Go to previous message](/theme/default/images/up.png) ![Go to next message Go to next message](/theme/default/images/down.png) |
Trevor-DHS
Messages: 802 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 #15414 is a reply to message #14402] |
Sat, 14 July 2018 20:14 ![Go to previous message Go to previous message](/theme/default/images/up.png) ![Go to next message Go to next message](/theme/default/images/down.png) |
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 Go to previous message](/theme/default/images/up.png) |
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
|
|
|
Goto Forum:
Current Time: Thu Sep 12 09:39:24 Coordinated Universal Time 2024
|