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 WEIGH          10001  1  129  110  59    10001  2  140  106  57    10001  3          55    10001  4  164  100  54    10001  5      92  56    10002  1  156  103  82    10002  2          80    10002  3          81    10002  4  128  92  79    10002  5  134      81    10003  1  161  78  90    10003  2          88    10003  3      85  87    10003  4  139      89    10003  5  120  77  91    10004  1  134  105  87    10004  2          85    10004  3  160  98  86    10004  4  139  88  89    10004  5      77  90    10005  1  147  102  98    10005  2      95  96    10005  3      100  99    10005  4  150  97  100    10005  5  143  85  98    10006  1  139      94    10006  2  128      90    10006  3  135  85  93    10006  4          95    10006  5      79  91         1. Get only latest non-missing values from on or before 3 visit into 3 different data sets for DBP, SBP and Weight variables. I am not able to put questions in wright words.  2. Merge all three, SBP, DBP, WEIGHT  I appreciate if you guide me how to write the code. I am expecting this answer, which is marked in red color.      Thanks.   
						
					
					... View more