Are you trying to count how many people first developed GOUT by each EXAMS value? data want ; do until (last.SAMPLE); set work.FRAMINGHAM_CLEANDATA_1 by SAMPLE EXAMS ; if GOUT_INCI='1' and missing(first_gout) then first_gout=EXAMS; end; keep SAMPLE FIRST_GOUT ; run; proc freq ; tables first_gout; run;
... View more