|
|
ix | |
Introduction |
|
xvii | |
Acknowledgments |
|
xix | |
|
Checking Values of Character Variables |
|
|
|
|
1 | (1) |
|
Using Proc Freq to List Values |
|
|
1 | (1) |
|
Description of the File Patients.txt |
|
|
2 | (4) |
|
Using a Data Step to Check for Invalid Values |
|
|
6 | (5) |
|
Using Proc Print with a Where Statement to List Invalid Values |
|
|
11 | (2) |
|
Using Formats to Check for Invalid Values |
|
|
13 | (4) |
|
Using Informats to Check for Invalid Values |
|
|
17 | (4) |
|
Checking Values of Numeric Variables |
|
|
|
|
21 | (1) |
|
Using Proc Means, Proc Tabulate, and Proc Univariate to Look for Outliers |
|
|
22 | (10) |
|
Using Proc Print with a Where Statement to List Invalid Data Values |
|
|
32 | (1) |
|
Using a Data Step to Check for Invalid Values |
|
|
33 | (1) |
|
Creating a Macro for Range Checking |
|
|
34 | (3) |
|
Using Formats to Check for Invalid Values |
|
|
37 | (3) |
|
Using Informats to Check for Invalid Values |
|
|
40 | (3) |
|
Using Proc Univariate to Look for Highest and Lowest Values by Percentage |
|
|
43 | (5) |
|
Using Proc Rank to Look for Highest and Lowest Values by Percentage |
|
|
48 | (3) |
|
Extending Proc Rank to Look for Highest and Lowest ``n'' Values |
|
|
51 | (4) |
|
Finding Another Way to Determine Highest and Lowest Values |
|
|
55 | (3) |
|
Checking a Range Using an Algorithm Based on Standard Deviation |
|
|
58 | (4) |
|
Macros Based on the Two Methods of Outlier Detection |
|
|
62 | (2) |
|
Demonstrating the Difference between the Two Methods |
|
|
64 | (1) |
|
Checking a Range Based on the Interquartile Range |
|
|
65 | (3) |
|
Checking Ranges for Several Variables |
|
|
68 | (5) |
|
Checking for Missing Values |
|
|
|
|
73 | (1) |
|
|
73 | (3) |
|
Using Proc Means and Proc Freq to Count Missing Values |
|
|
76 | (2) |
|
Using Data Step Approaches to Identify and Count Missing Values |
|
|
78 | (4) |
|
Using Proc Tabulate to Count Missing and Nonmissing Values for Numeric Variables |
|
|
82 | (1) |
|
Using Proc Tabulate to Count Missing and Nonmissing Values for Character Variables |
|
|
83 | (1) |
|
Creating a General Purpose Macro to Count Missing and Nonmissing Values for Both Numeric and Character Variables |
|
|
84 | (4) |
|
Searching for a Specific Numeric Value |
|
|
88 | (5) |
|
|
|
|
93 | (1) |
|
Checking Ranges for Dates (Using a Data Step) |
|
|
94 | (1) |
|
Checking Ranges for Dates (Using Proc Print) |
|
|
95 | (1) |
|
Checking for Invalid Dates |
|
|
95 | (4) |
|
Working with Dates in Nonstandard Form |
|
|
99 | (2) |
|
Creating a SAS Date When the Day of the Month Is Missing |
|
|
101 | (2) |
|
Suspending Error Checking for Known Invalid Dates |
|
|
103 | (2) |
|
Looking for Duplicates and ``n'' Observations per Subject |
|
|
|
|
105 | (1) |
|
Eliminating Duplicates by Using Proc Sort |
|
|
105 | (5) |
|
Detecting Duplicates by Using Data Step Approaches |
|
|
110 | (3) |
|
Using Proc Freq to Detect Duplicate ID's |
|
|
113 | (2) |
|
Selecting Patients with Duplicate Observations by Using a Macro List and SQL |
|
|
115 | (2) |
|
Identifying Subjects with ``n'' Observations Each (Data Step Approach) |
|
|
117 | (2) |
|
Identifying Subjects with ``n'' Observations Each (Using Proc Freq) |
|
|
119 | (2) |
|
Working with Multiple Files |
|
|
|
|
121 | (1) |
|
Checking for an ID in Each of Two Files |
|
|
121 | (3) |
|
Checking for an ID in Each of ``n'' Files |
|
|
124 | (2) |
|
A Simple Macro to Check ID's in Multiple Files |
|
|
126 | (3) |
|
A More Complicated Multi-File Macro for ID Checking |
|
|
129 | (2) |
|
More Complicated Multi-File Rules |
|
|
131 | (3) |
|
Checking That the Dates Are in the Proper Order |
|
|
134 | |