THE GEORGE WASHINGTON UNIVERSITY

Department of Statistics

Fundamentals of SAS Programming for Data Management

Stat 4197 – Fall 2014

SYLLABUS

Instructor: Dr. Joshua Landon

Office: Rome Hall, Room 652

E-mail:

Office hours: 11:00 a.m. – 12:00 p.m. Mondays, and by appointment

Lecture: Thursday 12:45-3:15pm, Rome Hall, Room 205.

Course Description: This course is designed to introduce students to the fundamentals of the SAS system for data management, statistical analysis and report writing. Students will learn how to use SAS as a programming language for data modification, file handling, matrix manipulation and macro writing. The first part of the course is devoted data step programming and provides an overview of the language, its capabilities and weaknesses. The second part will concentrate on the Interactive Matrix Language. The third part of the course focuses on the components of the macro facility. Topics to be covered include:

A. Fundamentals of SAS

·  SAS DATA and PROC steps

·  How a DATA step works

·  Errors and the log

·  Structure of a data set

·  Creating a data set using the DATA step

·  Reading a data set using the SET statement

·  Reading free–format data

·  Reading data with format

·  Reading multiple data lines per observation

·  Creating multiple observations per data line

·  Using conditional input

·  Temporary and permanent data sets

·  Merging and updating data sets

·  Accessing observations randomly

·  Concatenating and interleaving data sets

·  Variable definition, selection and modification

·  Observation addition, selection and deletion

·  SAS operators

·  Formats and Labels

·  Sequential execution (Do-End groups and order of priority)

·  Conditional execution (If-Then-Else and Subsetting If)

·  Iterative processing (While, Do, Until, and mixtures)

·  One, two and multidimensional arrays

·  Sorting and Searching SAS data sets

·  Numeric and character functions

·  Converting data values from numeric to character and vice versa

·  Import and Export procedures

B. IML programming

·  Operators, expressions and functions

·  Control statements

·  Indexing

·  Storage, accuracy, and efficiency

·  IML modules and parameter passing

C. Macro programming

·  Applications of SAS macros

·  Compilation and execution of macros

·  Creation of macro variables

·  Program flow

·  Macro quoting function

·  SYMPUT and SYMGET function

·  Indirect referencing

·  Conditional execution

·  Macro parameters and macro debugging

·  Local and global macro variables

·  Nested Macros

·  Iterative execution within a macro

Textbooks: 1. The Little SAS Book, by Delwiche and Slaughter, SAS Institute.

2. Learning SAS by Example: A Programmer’s Guide, by Cody.

3. Step-By-Step Programming with Base SAS Software (Available on Blackboard)

4. SAS IML Sotfware: Usage and Reference (Available on Blackboard)

Grading: Your final grade will be determined by the following weighted average of assignments and exam scores: 25% Midterm Exam, 25% Final Exam, 50% Programming Projects.