5 Looking for Duplicates and "n" Observations per Subject
Introduction
Eliminating Duplicates by Using PROC SORT
Detecting Duplicates by Using DATA Step Approaches
Using PROC FREQ to Detect Duplicate ID’s
Selecting Patients with Duplicate Observations by Using a Macro List and SQL
Identifying Subjects with "n" Observations Each (DATA Step Approach)
Identifying Subjects with "n" Observations Each (Using PROC FREQ)
Introduction
Besides checking for invalid data values in a data set, it may be necessary to check for either duplicate ID’s or duplicate observations. Duplicate observations are easy to fix; just eliminate the duplicates (although you may want to find out how the duplicates got there). Duplicate ID’s with different data values present ...
Get Cody's Data Cleaning Techniques Using SAS, Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.