Hello, I am trying to figure out how to delete duplicate observations in my data set based on another variable. I have multiple 'studyID's' per participant but I only want to keep the most recent one based on the 'caredate'. Here is my code but my results are still sowing multiple obs per ID if the 'caredate' as different. Please advise. proc sort data= PPD; by CAREDATE; Run; proc sort data= PPD Dupout=PPD_Dupobs Nodupkey; by STUDYID; Run; PROC PRINT DATA=PPD (Obs=100); Thank you for your help!
... View more