To find out the non missing values of any particular variable at any particular position with conditional statement like it should be greater than or less than
SUB VISIT SBP DBP WEIGHT
001 1 124 134 180
002 2 170
003 3 178
004 4 345 128 150
005 5 137 167 180
006 1 136 156 178
007 2 145 152 187
008 3 187
1. Get only latest non-missing values from on or before 3 visit into 3 different data sets for DBP, SBP and Weight variables
2. Merge all three, SBP, DBP, WEIGHT
I appreciate if you guide me.
Thanks.
Your question lacks sufficient details but I will show you what I think you want. Also, the values of SUB in your example don't look right and I changed them.
Your question lacks sufficient details but I will show you what I think you want. Also, the values of SUB in your example don't look right and I changed them.
John,
If I understood right. OP want this:
001 1 124 134 180
001 2 . . 170
001 3 . 90 178
001 4 345 128 150
001 5 137 167 180
002 1 136 156 178
002 2 145 152 187
002 3 . . 187
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.