Statistics 100

Introduction to the SAS System for Data Analysis



Course Slides (pdf format)

Proc Tabulate Examples and Output

Proc Report Examples and Output

Simulation Programs: Using Macros Using the Data Step

Data from class 7/29/2010  pres.txt  salary.txt

Programs from class 7/29/2010  pres.sas pres-a.sas sal.sas ret.sas (retain statement)

Program from class 8/02/2010 to read Forbe's Best College Buys

Program from class 8/03/2010 to read top TV shows from tvguide.com

Macro example from class 8/11/2010 data set

Reading the Forbes Top 400

Friday the 13th Program

Program - Mortgage Data - Income Data for the example from the last day of class

Syllabus

 Basics: Overview of SAS Products and Resources
 The Data Step
 Basic Programming
 SAS Functions
 More Complex Programming
 Working with Multiple Data Sets
 Formats and Informats
 SAS Output Delivery System
 SAS Date and Time Values
 SAS System Options
 Output Data Sets
 SAS Macro Language and Alternatives
 Transporting Data Sets
 Proc transpose
 Proc contents
 The Display Manager

Remotely Accessing the SCF Computers
SCF Hostnames for Remote Connection
Dealing with invalid data in files transferred from Windows

Assignments

There are two assignments for this course; the first is due August 6, and the second is due August 20 (one week after the last class). For the first assignment, you should find a data set, read it into SAS, and simply print it out or perform data summaries using proc means or proc summary. If you can't think of a data set to use, check out swivel.com, or see the sample exercises referenced below. You can use any of the exercises as a model for what I expect. The second assignment is similar to the first, but should involve one or more procedures (which we may or may not have mentioned in class), and ideally would actually address a question or problem you're interested in. Feel free to use any data that you can find. If you simply don't have any data, and can't find any that is of interest, you can again use one of the sample data sets (not the one you used in the first assignment), and use one or more procedures on that. Feel free to ask me for more details, either in the lab or through email.

Submitting the project

Your project should contain the log and output (.lst) files for your program; if you feel that the data is unusual, you can also provide the input data, but it's usually not necessary. Project submissions should be emailed to me, spector@stat.berkeley.edu in a single email, either with a single pdf or word document containing all the parts, or an archive (zip, rar, tar, etc.) containing the various parts of the project (log, output and optionally data) with your s100 account number in the subject line. DO NOT send your report as part of the body of the message, and do not send me multiple emails. If the email option is difficult or inconvenient, simply print out your reports and either give them to me, slide them under the door of my office (Room 495 Evans Hall) if I'm not around, or bring them to the Statistics office (Room 367 Evans Hall) and ask for them to be put in my mailbox.

Links to WWW Resources

Tips for Better SAS Programming

Simple Modification of ODS Styles

Setting the Printer in UNIX SAS

Brief Introduction to some SAS procdures

Introduction to Bar Charts and Scattergrams using SAS

Sample programs from SAS Institute

SAS/GRAPH 101

Two articles from Forbes Magazine about Jim Goodnight, president of SAS Institute:

1996  2007


Sample Datasets and Exercises
Phil Spector (link to my home page)
spector@stat.berkeley.edu