07-18-2013 03:24 AM
I try to drop duplicate observations by some variables. Please help me with both data procedure and sql procedure.
My dataset has variables
y x1 x2 x3 x4
I want to delete duplicates by y, x1 and x2. If y, x1 and x2 are the same in two observations, the two observations are treated duplicated and I want to only keep one. I tried nodupkey in proc sort procedure, but it will not work because x3 and x4 are different in the two observations. How to use proc sql and/or proc sort to drop duplicates?
Need further help from the community? Please ask a new question.