- Acknowledgments
- Introducing SAS Software
- About This Book
- What’s New
Chapter 1 Getting Started Using SAS Software
- 1.1 The SAS Language
- 1.2 SAS Data Sets
- 1.3 The Two Parts of a SAS Program
- 1.4 The DATA Step’s Built-in Loop
- 1.5 Choosing a Mode for Submitting SAS Programs
- 1.6 Windows and Commands in the SAS Windowing Environment
- 1.7 Submitting a Program in the SAS Windowing Environment
- 1.8 Reading the SAS Log
- 1.9 Viewing and Printing the SAS Output
- 1.10 Using SAS System Options
Chapter 2 Getting Your Data into the SAS System
- 2.1 Methods for Getting Your Data into the SAS System
- 2.2 Telling SAS Where to Find Your Raw Data
- 2.3 Reading Raw Data Separated by Spaces
- 2.4 Reading Raw Data Arranged in Columns
- 2.5 Reading Raw Data Not in Standard Format
- 2.6 Selected Informats
- 2.7 Mixing Input Styles
- 2.8 Listing the Contents of a SAS Data Set
- 2.9 Temporary versus Permanent SAS Data Sets
- 2.10 Using LIBNAME Statements with Permanent SAS Data Sets
- 2.11 Entering Data with the Viewtable Window
- 2.12 Reading Multiple Lines of Raw Data per Observation
- 2.13 Reading Multiple Observations per Line of Raw Data
- 2.14 Reading Part of a Raw Data File
- 2.15 Controlling Input with Options in the INFILE Statement
- 2.16 Reading Delimited Files with the DATA Step
- 2.17 Reading Delimited Files with the IMPORT Procedure
- 2.18 Reading PC Database Files with DDE or the IMPORT Procedure
- 2.19 Writing Delimited Files with the EXPORT Procedure
- 2.20 Writing Raw Data Files with the DATA Step
Chapter 3 Working with Your Data
- 3.1 Creating and Redefining Variables
- 3.2 Using SAS Functions
- 3.3 Selected SAS Functions
- 3.4 Using IF-THEN Statements
- 3.5 Grouping Observations with IF-THEN/ELSE Statements
- 3.6 Subsetting Your Data
- 3.7 Working with SAS Dates
- 3.8 Selected Date Informats, Functions, and Formats
- 3.9 Using the RETAIN and Sum Statements
- 3.10 Simplifying Programs with Arrays
- 3.11 Using Shortcuts for Lists of Variable Names
Chapter 4 Sorting, Printing, and Summarizing Your Data
- 4.1 Using SAS Procedures
- 4.2 Subsetting in Procedures with the WHERE Statement
- 4.3 Sorting Your Data with PROC SORT
- 4.4 Printing Your Data with PROC PRINT
- 4.5 Changing the Appearance of Printed Values with Formats
- 4.6 Selected Standard Formats
- 4.7 Creating Your Own Formats Using PROC FORMAT
- 4.8 Writing Simple Custom Reports
- 4.9 Summarizing Your Data Using PROC MEANS
- 4.10 Writing Summary Statistics to a SAS Data Set
- 4.11 Counting Your Data with PROC FREQ
- 4.12 Producing Tabular Reports with PROC TABULATE
- 4.13 Adding Statistics to Tabular Reports
- 4.14 Visualizing Your Data with PROC PLOT
- 4.15 Formatting Procedure Output for Display on the Internet
- 4.16 Creating SAS Data Sets from Procedure Output
Chapter 5 Modifying and Combining SAS Data Sets
- 5.1 Modifying a Data Set Using the SET Statement
- 5.2 Stacking Data Sets Using the SET Statement
- 5.3 Interleaving Data Sets Using the SET Statement
- 5.4 Combining Data Sets Using a One-to-One Match Merge
- 5.5 Combining Data Sets Using a One-to-Many Match Merge
- 5.6 Merging Summary Statistics with the Original Data
- 5.7 Combining a Grand Total with the Original Data
- 5.8 Updating a Master Data Set with Transactions
- 5.9 Using SAS Data Set Options
- 5.10 Tracking and Selecting Observations with the IN= Option
- 5.11 Writing Multiple Data Sets Using the OUTPUT Statement
- 5.12 Making Several Observations from One Using the OUTPUT Statement
- 5.13 Changing Observations to Variables Using PROC TRANSPOSE
- 5.14 Using SAS Automatic Variables
Chapter 6 Writing Flexible Code with the SAS Macro Facility
- 6.1 Macro Concepts
- 6.2 Substituting Text with Macro Variables
- 6.3 Creating Modular Code with Macros
- 6.4 Adding Parameters to Macros
- 6.5 Writing Macros with Conditional Logic
- 6.6 Writing Data-Driven Programs with CALL SYMPUT
- 6.7 Debugging Macro Errors
Chapter 7 Using Basic Statistical Procedures
- 7.1 Examining the Distribution of Data with PROC UNIVARIATE
- 7.2 Producing Statistics with PROC MEANS
- 7.3 Testing Categorical Data with PROC FREQ
- 7.4 Examining Correlations with PROC CORR
- 7.5 Using PROC REG for Simple Regression Analysis
- 7.6 Reading the Output of PROC REG
- 7.7 Using PROC ANOVA for One-Way Analysis of Variance
- 7.8 Reading the Output of PROC ANOVA
- 7.9 Introducing the Analyst Application
Chapter 8 Debugging Your SAS Programs
- 8.1 Writing SAS Programs That Work
- 8.2 Fixing Programs That Don’t Work
- 8.3 Searching for the Missing Semicolon
- 8.4 Note: INPUT Statement Reached Past the End of the Line
- 8.5 Note: Lost Card
- 8.6 Note: Invalid Data
- 8.7 Note: Missing Values Were Generated
- 8.8 Note: Numeric Values Have Been Converted to Character (or Vice Versa)
- 8.9 DATA Step Produces Wrong Results but No Error Message
- 8.10 The DATA Step Debugger
- 8.11 Error: Invalid Option, Error: The Option Is Not Recognized, or Error: Statement Is Not Valid
- 8.12 Note: Variable Is Uninitialized or Error: Variable Not Found
- 8.13 SAS Truncates a Character Variable
- 8.14 SAS Stops in the Middle of a Job
- 8.15 SAS Runs Out of Memory or Disk Space
Appendices
- A Where to Go from Here
- B Getting Help from SAS Institute Technical Support
- C An Overview of SAS Products
- D Coming to SAS from SPSS
- E Coming to SAS from a Programming Language
- F Coming to SAS from SQL
Copyright (c) 2000 SAS Institute Inc.
Cary, NC, USA. All rights reserved.
Date last modified: Thu Jun 15, 2000 20:39 UT