I'm working with BP data - where in they have measured SBP and DBP.
1. I have SBP and DBP measured twice as - SBP1 and SBP2
2. I have the data for SBP3 if - the difference between SBP1 and SBP2 is more than 10
3. I would like to calculate mean SBP using SBP1 and SBP2 if there is no data for SBP3
4. I would like to calculate mean SBP using SBP3 along with SBP2 or SBP1 - based which values (SBP1 or SBP2) are nearest to SBP3.
Can someone suggest me a code for this?
if SBP3 is missing then SBP = mean (SBP1, SBP2); else if the diff of SBP1 and SBP2 > 10 then use SBP3; SBP = Mean (SBP1 and SBP3) if abs(SBP3-SBP1) < (SBP2 and SBP3); SBP = Mean (SBP2 and SBP3) if abs(SBP2-SBP3) < (SBP1 and SBP3); run;
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.