Acknowledgments |
|
vii | (1) |
Introducing SAS Software |
|
viii | |
|
Chapter 1 Who, What, and How |
|
|
2 | (8) |
|
1.1 What This Book Covers and Who Needs It |
|
|
2 | (2) |
|
|
4 | (2) |
|
1.3 Layout of Sample Programs |
|
|
6 | (4) |
|
Chapter 2 Getting Started Using SAS Software |
|
|
10 | (22) |
|
|
10 | (2) |
|
|
12 | (2) |
|
2.3 The Two Parts of a SAS Program |
|
|
14 | (2) |
|
2.4 The DATA Step's Built-in Loop |
|
|
16 | (2) |
|
2.5 Executing a SAS Program |
|
|
18 | (2) |
|
2.6 Reading the SAS Log and Output |
|
|
20 | (2) |
|
2.7 Using Display Manager Commands and Windows |
|
|
22 | (2) |
|
2.8 Editing Programs in Display Manager |
|
|
24 | (2) |
|
2.9 Executing Programs in Display Manager |
|
|
26 | (2) |
|
2.10 Using SAS System Options |
|
|
28 | (4) |
|
Chapter 3 Getting Your Data into the SAS System |
|
|
32 | (34) |
|
3.1 Telling SAS Where to Find Your Raw Data |
|
|
32 | (2) |
|
3.2 Reading Raw Data Separated by Spaces |
|
|
34 | (2) |
|
3.3 Reading Raw Data Arranged in Columns |
|
|
36 | (2) |
|
3.4 Reading Raw Data Not in Standard Format |
|
|
38 | (2) |
|
|
40 | (2) |
|
|
42 | (2) |
|
3.7 Reading Multiple Lines of Raw Data per Observation |
|
|
44 | (2) |
|
3.8 Reading Multiple Observations per Line of Raw Data |
|
|
46 | (2) |
|
3.9 Reading Part of a Raw Data File |
|
|
48 | (2) |
|
3.10 Using Options on the INFILE Statement |
|
|
50 | (2) |
|
3.11 Listing the Contents of a SAS Data Set |
|
|
52 | (2) |
|
3.12 Temporary versus Permanent SAS Data Sets |
|
|
54 | (2) |
|
3.13 Using LIBNAME Statements with Permanent SAS Data Sets |
|
|
56 | (2) |
|
3.14 Importing Data from Other Sources |
|
|
58 | (2) |
|
3.15 Transporting SAS Data Sets between Computers |
|
|
60 | (2) |
|
3.16 Writing Raw Data Files |
|
|
62 | (4) |
|
Chapter 4 Working with Your Data |
|
|
66 | (24) |
|
4.1 Creating and Redefining Variables |
|
|
66 | (2) |
|
|
68 | (2) |
|
4.3 Selected SAS Functions |
|
|
70 | (2) |
|
4.4 Using IF-THEN Statements |
|
|
72 | (2) |
|
4.5 Grouping Observations with IF-THEN/ELSE Statements |
|
|
74 | (2) |
|
|
76 | (2) |
|
4.7 Working with SAS Dates |
|
|
78 | (2) |
|
4.8 Selected Date Informats, Functions, and Formats |
|
|
80 | (2) |
|
4.9 Using the RETAIN and Sum Statements |
|
|
82 | (2) |
|
4.10 Simplifying Programs with Arrays |
|
|
84 | (2) |
|
4.11 Using Shortcuts for Lists of Variable Names |
|
|
86 | (4) |
|
Chapter 5 Sorting, Printing, and Summarizing Your Data |
|
|
90 | (26) |
|
|
90 | (2) |
|
5.2 Subsetting in Procedures with the WHERE Statement |
|
|
92 | (2) |
|
5.3 Sorting Your Data with PROC SORT |
|
|
94 | (2) |
|
5.4 Printing Your Data with PROC PRINT |
|
|
96 | (2) |
|
5.5 Changing the Appearance of Printed Values with Formats |
|
|
98 | (2) |
|
5.6 Selected Standard Formats |
|
|
100 | (2) |
|
5.7 Creating Your Own Formats Using PROC Format |
|
|
102 | (2) |
|
5.8 Writing Simple Custom Reports |
|
|
104 | (2) |
|
5.9 Summarizing Your Data Using PROC MEANS |
|
|
106 | (2) |
|
5.10 Writing Summary Statistics to a SAS Data Set |
|
|
108 | (2) |
|
5.11 Using PROC FREQ to Examine Your Data |
|
|
110 | (2) |
|
5.12 Using PROC PLOT to Visualize Your Data |
|
|
112 | (4) |
|
Chapter 6 Modifying and Combining SAS Data Sets |
|
|
116 | (30) |
|
6.1 Modifying a Data Set Using the SET Statement |
|
|
116 | (2) |
|
6.2 Stacking Data Sets Using the SET Statement |
|
|
118 | (2) |
|
6.3 Interleaving Data Sets Using the SET Statement |
|
|
120 | (2) |
|
6.4 Combining Data Sets Using a One-to-One Match Merge |
|
|
122 | (2) |
|
6.5 Combining Data Sets Using a One-to-Many Match Merge |
|
|
124 | (2) |
|
6.6 Merging Summary Statistics with the Original Data |
|
|
126 | (2) |
|
6.7 Combining a Grand Total with the Original Data |
|
|
128 | (2) |
|
6.8 Updating a Master Data Set with Transactions |
|
|
130 | (2) |
|
6.9 Using SAS Data Set Options |
|
|
132 | (2) |
|
6.10 Tracking and Selecting Observations with the IN=Option |
|
|
134 | (2) |
|
6.11 Writing Multiple Data Sets Using the OUTPUT Statement |
|
|
136 | (2) |
|
6.12 Using the OUTPUT Statement to Make Several Observations from One |
|
|
138 | (2) |
|
6.13 Changing Observations to Variables Using PROC TRANSPOSE |
|
|
140 | (2) |
|
6.14 Using SAS Automatic Variables |
|
|
142 | (4) |
|
Chapter 7 Using Basic Statistical Procedures |
|
|
146 | (14) |
|
7.1 Examining the Distribution of Data with PROC UNIVARIATE |
|
|
146 | (2) |
|
7.2 Examining Correlations with PROC CORR |
|
|
148 | (2) |
|
7.3 Using PROC REG for Simple Regression Analysis |
|
|
150 | (2) |
|
7.4 Reading the Output of PROC REG |
|
|
152 | (2) |
|
7.5 Using PROC ANOVA for One-Way Analysis of Variance |
|
|
154 | (2) |
|
7.6 Reading the Output of PROC ANOVA |
|
|
156 | (4) |
|
Chapter 8 Debugging Your SAS Programs |
|
|
160 | (30) |
|
8.1 Writing SAS Programs that Work |
|
|
160 | (2) |
|
8.2 Fixing Programs that Don't Work |
|
|
162 | (2) |
|
8.3 Searching for the Missing Semicolon |
|
|
164 | (2) |
|
8.4 Note: INPUT Statement Reached Past the End of the Line |
|
|
166 | (2) |
|
|
168 | (2) |
|
|
170 | (2) |
|
8.7 Note: Missing Values Were Generated |
|
|
172 | (2) |
|
8.8 Note: Numeric Values Have Been Converted to Character (or Vice Versa) |
|
|
174 | (2) |
|
8.9 DATA Step Produces Wrong Results but No Error Message |
|
|
176 | (2) |
|
8.10 Error: Invalid Option, Error: The Option is Not Recognized, or Error: Statement Is Not Valid |
|
|
178 | (2) |
|
8.11 Note: Variable Is Uninitialized or Error: Variable Not Found |
|
|
180 | (2) |
|
8.12 SAS Truncates a Character Variable |
|
|
182 | (2) |
|
8.13 SAS Stops in the Middle of a Job |
|
|
184 | (2) |
|
8.14 SAS Runs Out of Memory or Disk Space |
|
|
186 | (4) |
Appendices |
|
190 | (21) |
A Where to Go from Here |
|
190 | (2) |
B An Overview of SAS Products |
|
192 | (2) |
C Coming to SAS from SPSS |
|
194 | (6) |
D Coming to SAS from a Programming Language |
|
200 | (4) |
E Coming to SAS from SQL |
|
204 | (7) |
Index |
|
211 | |