I would like to check for missing values and weird numbers and add a flag to those observations (create 2 new variables with a value set to 1 if the condition is true: flag for missing systolic, flag for missing diastolic) my dataset is bp i tried one code as data g;
do until (last.subject_id);
set bp;
by subject_id;
if first.subject_id then do;
check = bp_systolic; flag = 0;
run; but it doesn't work
... View more