Visit the Sociology Department Web Page

SOCY/699C --Introduction to SAS Programming


Alan Neustadtl
Department of Sociology
University of Maryland
College Park, Maryland 20742
Office:
Phone:
FAX:
Email:
www:
Art/Sociology #3135
301-314-6892
301-405-6411
aneustadtl@socy.umd.edu www.bsos.umd.edu/socy/alan

Class meets on Tuesday Afternoons from 3:30pm until 5:00pm in the LeFrak, Lab #4.

Click on any of the topics below to go to that section of the document. To view the whole document from start to finish, simply page down through the syllabus. 

Purpose

This is a ‘short’ class in using SAS for statistical programming.  It is short because with just six or seven class meetings you cannot hope to master but a small fraction of the data management and statistical capabilities of SAS.  In learning SAS, keep in mind that there are thousands of full-time SAS programmers working at universities, at Fortune 500 type businesses, in government, at research centers, and just about any other place where data are managed and analyzed.  In short, knowing how to use SAS is a useful skill for the job market.  Additionally, if you decide to use your life as a quantitative researcher, SAS is an excellent statistical programming language to know. 

In this class, you will learn some SAS programming under Windoze 95.  However, almost all of the SAS language is transportable between different operating systems like unix, OS/2, NT, and others.  SAS is a ‘true’ programming language.  Why SAS?  Why not some other programming language like SPSS?  Simply, SAS is more powerful and used by more programmers.  However, there is a trade-off.  The power provided by the SAS language is inversely related to complexity.  So for example, while some find SPSS easier to use, it is less powerful.  Unfortunately, we will not begin to tap the power and elegance of SAS in this course.  We will merely point you down the road on your journey of discovery!  While you cannot hope to learn ‘everything’ in any class in SAS programming, you can be introduced to quite a few of the more powerful functions in SAS. 

 

Required Text

SAS Institute, Select Text, Selected SAS Documentation for SOCY699C: Statistical Programming in SAS (Fall 2000).

Recommended Texts

Delwiche, Lora D. and Susan J. Slaughter.  199X.  The Little SAS Book: A Primer.  Cary, NC: SAS Institute. 

Cody, Ronald P. and Jeffrey K. Smith.  1991.  Applied Statistics and the SAS Programming Language. New York: North-Holland. 

SAS Institute Inc. 1990 . SAS Language: Reference Version 6, First Edition.  Cary, NC: SAS Institute.

SAS Institute Inc.  1990.  SAS Procedures Guide: Version 6, Third Edition.  Cary, NC: SAS Institute. 

 

Outline of Topics

Week 1 

·  Introduction to Windoze 

·  logging on to your account 

·  the desktop 

·  Introduction to SAS 

·  How SAS works 

·  The data step 

· Raw data 

· The input statement 

· In stream 

· External data (libname statement) 

· SAS system files 

·  The proc step 

· Proc contents 

· Proc print 

·  Introduction to the Data used in this Course 

 

Week 2 

·  Recoding variables 

·  If/then/else 

·  Select 

·  Proc format 

·  Logical expressions 

·  Array processing 

 

Week 3

·  Reshaping Data 

·  Subsetting observations 

·  Delete 

·  Output 

·  Subsetting variables 

·  Drop 

·  keep 

·  Combining data sets 

·  Set statement 

 

Week 4 

·  Grouping data 

·  Logical expressions (see also Week 2) 

·  Formatted grouping 

·  first.xxx and last.xxx variables 

 

·  Sorting Data 

·  proc sort 

·  by statement

 

Week 5 

·  Merging SAS data sets 

·  Merging multiple data sets 

·  Merging a data set with itself 

·  Using proc means to create aggregate data for merging 

 

Week 6 

·  Statistical procs 

·  proc freq 

·  proc means 

·  proc univariate 

·  proc tabulate 

·  proc t-test 

·  proc standard 

·  proc rank 

 

Week 7

·  Miscellaneous 

·  Writing and reading export files 

·  proc cport/cimport 

·  the SAS export engine and proc copy 

 

·  Other basic catching up 

 

Course Evaluation

This class is designed to teach you technical skills, skills that can be transferred to jobs or your personal research.  It is important that you complete the course with a ‘toolkit’ of SAS programming code that you can use in the future.  To help you with this we will have a series of programming exercises for you to complete over the course of the semester.  You can redo the exercises so that by the end of the course, you will have a diskette full of SAS programs that are fully commented and run well!

 If all your programs run well and conform to programming standards discusses in class, you will earn an “A” for the class.

 

Miscellaneous

Students with Documented Disabilities

If you have need for reasonable academic accommodation by virtue of a documented disability, please contact me as soon as possible to discuss your needs.  Students with documented needs for such accommodation are required to meet the same performance standards for this class as all students.  Accommodations may be made in terms of how such achievement is demonstrated.  Without documentation, students may not receive accommodation for a disability.

Students Requiring Religious Accommodation

If you need academic accommodation by virtue of your religion (e.g. missing a class, rescheduling an assignment), please see me as soon as possible to discuss your needs.

 

Reading Assignments

Readings will be assigned each week in class from the required text.  However, you are encouraged to use the text as a resource to solve your programming problems.  In other words, based on the work in the class, find the appropriate material in the text for more information.


Visit the University Home Page