Home » Topics » Biomarkers » Matching the sample size
Re: Matching the sample size [message #15437 is a reply to message #15414] |
Wed, 18 July 2018 16:48 |
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: Sat Jan 11 05:44:52 Coordinated Universal Time 2025
|