Acknowledgments | p. vii |
Introducing SAS Software | p. viii |
About This Book | p. ix |
What's New | p. xii |
Getting Started Using SAS Software | |
The SAS Language | p. 2 |
SAS Data Sets | p. 4 |
The Two Parts of a SAS Program | p. 6 |
The DATA Step's Built-in Loop | p. 8 |
Choosing a Mode for Submitting SAS Programs | p. 10 |
Windows and Commands in the SAS Windowing Environment | p. 12 |
Submitting a Program in the SAS Windowing Environment | p. 14 |
Reading the SAS Log | p. 16 |
Viewing and Printing the SAS Output | p. 18 |
Using SAS System Options | p. 20 |
Getting Your Data into the SAS System | |
Methods for Getting Your Data into the SAS System | p. 24 |
Telling SAS Where to Find Your Raw Data | p. 26 |
Reading Raw Data Separated by Spaces | p. 28 |
Reading Raw Data Arranged in Columns | p. 30 |
Reading Raw Data Not in Standard Format | p. 32 |
Selected Informats | p. 34 |
Mixing Input Styles | p. 36 |
Listing the Contents of a SAS Data Set | p. 38 |
Temporary versus Permanent SAS Data Sets | p. 40 |
Using LIBNAME Statements with Permanent SAS Data Sets | p. 42 |
Entering Data with the Viewtable Window | p. 44 |
Reading Multiple Lines of Raw Data per Observation | p. 46 |
Reading Multiple Observations per Line of Raw Data | p. 48 |
Reading Part of a Raw Data File | p. 50 |
Controlling Input with Options in the INFILE Statement | p. 52 |
Reading Delimited Files with the DATA Step | p. 54 |
Reading Delimited Files with the IMPORT Procedure | p. 56 |
Reading PC Database Files with DDE or the IMPORT Procedure | p. 58 |
Writing Delimited Files with the EXPORT Procedure | p. 60 |
Writing Raw Data Files with the DATA Step | p. 62 |
Working with Your Data | |
Creating and Redefining Variables | p. 66 |
Using SAS Functions | p. 68 |
Selected SAS Functions | p. 70 |
Using IF-THEN Statements | p. 72 |
Grouping Observations with IF-THEN/ELSE Statements | p. 74 |
Subsetting Your Data | p. 76 |
Working with SAS Dates | p. 78 |
Selected Date Informats, Functions, and Formats | p. 80 |
Using the RETAIN and Sum Statements | p. 82 |
Simplifying Programs with Arrays | p. 84 |
Using Shortcuts for Lists of Variable Names | p. 86 |
Sorting, Printing, and Summarizing Your Data | |
Using SAS Procedures | p. 90 |
Subsetting in Procedures with the WHERE Statement | p. 92 |
Sorting Your Data with PROC SORT | p. 94 |
Printing Your Data with PROC PRINT | p. 96 |
Changing the Appearance of Printed Values with Formats | p. 98 |
Selected Standard Formats | p. 100 |
Creating Your Own Formats Using PROC FORMAT | p. 102 |
Writing Simple Custom Reports | p. 104 |
Summarizing Your Data Using PROC MEANS | p. 106 |
Writing Summary Statistics to a SAS Data Set | p. 108 |
Counting Your Data with PROC FREQ | p. 110 |
Producing Tabular Reports with PROC TABULATE | p. 112 |
Adding Statistics to Tabular Reports | p. 114 |
Visualizing Your Data with PROC PLOT | p. 116 |
Formatting Procedure Output for Display on the Internet | p. 118 |
Creating SAS Data Sets from Procedure Output | p. 120 |
Modifying and Combining SAS Data Sets | |
Modifying a Data Set Using the SET Statement | p. 124 |
Stacking Data Sets Using the SET Statement | p. 126 |
Interleaving Data Sets Using the SET Statement | p. 128 |
Combining Data Sets Using a One-to-One Match Merge | p. 130 |
Combining Data Sets Using a One-to-Many Match Merge | p. 132 |
Merging Summary Statistics with the Original Data | p. 134 |
Combining a Grand Total with the Original Data | p. 136 |
Updating a Master Data Set with Transactions | p. 138 |
Using SAS Data Set Options | p. 140 |
Tracking and Selecting Observations with the IN= Option | p. 142 |
Writing Multiple Data Sets Using the OUTPUT Statement | p. 144 |
Making Several Observations from One Using the OUTPUT Statement | p. 146 |
Changing Observations to Variables Using PROC TRANSPOSE | p. 148 |
Using SAS Automatic Variables | p. 150 |
Writing Flexible Code with the SAS Macro Facility | |
Macro Concepts | p. 154 |
Substituting Text with Macro Variables | p. 156 |
Creating Modular Code with Macros | p. 158 |
Adding Parameters to Macros | p. 160 |
Writing Macros with Conditional Logic | p. 162 |
Writing Data-Driven Programs with CALL SYMPUT | p. 164 |
Debugging Macro Errors | p. 166 |
Using Basic Statistical Procedures | |
Examining the Distribution of Data with PROC UNIVARIATE | p. 170 |
Producing Statistics with PROC MEANS | p. 172 |
Testing Categorical Data with PROC FREQ | p. 174 |
Examining Correlations with PROC CORR | p. 176 |
Using PROC REG for Simple Regression Analysis | p. 178 |
Reading the Output of PROC REG | p. 180 |
Using PROC ANOVA for One-Way Analysis of Variance | p. 182 |
Reading the Output of PROC ANOVA | p. 184 |
Introducing the Analyst Application | p. 186 |
Debugging Your SAS Programs | |
Writing SAS Programs That Work | p. 190 |
Fixing Programs That Don't Work | p. 192 |
Searching for the Missing Semicolon | p. 194 |
Note: INPUT Statement Reached Past the End of the Line | p. 196 |
Note: Lost Card | p. 198 |
Note: Invalid Data | p. 200 |
Note: Missing Values Were Generated | p. 202 |
Note: Numeric Values Have Been Converted to Character (or Vice Versa) | p. 204 |
DATA Step Produces Wrong Results but No Error Message | p. 206 |
The DATA Step Debugger | p. 208 |
Error: Invalid Option, Error: The Option Is Not Recognized, or Error: Statement Is Not Valid | p. 210 |
Note: Variable Is Uninitialized or Error: Variable Not Found | p. 212 |
SAS Truncates a Character Variable | p. 214 |
SAS Stops in the Middle of a Job | p. 216 |
SAS Runs Out of Memory or Disk Space | p. 218 |
Appendices | |
Where to Go from Here | p. 222 |
Getting Help from SAS Institute Technical Support | p. 224 |
An Overview of SAS Products | p. 226 |
Coming to SAS from SPSS | p. 228 |
Coming to SAS from a Programming Language | p. 234 |
Coming to SAS from SQL | p. 238 |
Index | p. 245 |
Table of Contents provided by Ingram. All Rights Reserved. |