Summer, 2001

Dr. Paul Spector



This course is an introduction to computer programming with the SAS language. It focuses almost entirely on the programming features of SAS rather than the statistical procedures. The major objective of the course is to teach the student how to write SAS programs to accomplish tasks commonly done in psychology, such as scoring tests. A student who successfully completes the course should be able to write SAS programs fairly well. To complete the course, each student must submit an electronic copy of each programming assignment to the instructor.

The class will be run entirely on the internet. There will be no meetings. Students are free to work when and where they wish. Below is a class schedule. Except in unusual circumstances, each student must submit assignments by 5PM on the Thursday of the week noted in the schedule. Assignments can be turned in early. Late submissions should be discussed, via e-mail, with the instructor, preferably in advance. The final completion time for all assignments is 5PM on the last Thursday of summer session A, June 21, 2001.

Submitting assignments

All assignments should be submitted to the instructor via e-mail. Detailed instructions can be found by clicking here. Both the SAS log and the output must be combined in a single file and sent in ASCII or text format in the body of an e-mail. This can be done easily by uploading to your UNIX server, e.g., LUNA, and then inserting it into an e-mail that is sent with PINE. SAS produces separate log and output files. Both can be inserted one after another into an e-mail. After I review your program and verify it has been done satisfactorily, I will record it. You are free to use any e-mail software or system you wish, as long as you send me both files combined. Students are responsible for learning how to upload files. Academic Computing's help desk, 974-1222 and their website (see links on my site) are good sources of assistance.

Hardware and Software Needed

To complete the course, access to e-mail, the internet, and SAS are required. Such access is available in the open use computer labs on campus for free. USF students can purchase a one year license for SAS for $40 from Academic Computing. This can be used on a personal computer off campus with the agreement that is will not be used for commercial purposes, e.g., bring it to work and allow it’s use for the employer’s benefit. College of Arts and Sciences students should contact the CAS computer help desk people at 974-2418. Other USFers can find their contact person at academic computing's SAS license page. Keep in mind that this is not a purchase, but a one year lease that must be renewed each summer. The advantages of this arrangement are that the price is very reasonable and that you get all software updates (e.g., two versions of 8.x came out last year). I strongly encourage you to renew your agreement if you continue to use the software. I understand A CD with the software can be purchased as well for a nominal fee from the CAS helpdesk. USF students with a campus e-mail account have open access to the internet, both on campus and through dial-up.

Version of SAS

I strongly recommend you use one of the SAS 8.x versions. As of this writing SAS is up to version 8.10. I have 8.01 myself. There are only minor differences among these versions. Some of you may have a 6.x version, which will work fine for doing the assignments. However, the interface for 8 has tremendous improvements that make it worthwhile. It is MUCH easier to use. Furthermore, there are some nice new features in the language itself. On another note, if you have a 6.x version from USF, chances are you haven't updated the license (i.e., paid the fee this year). This would be a good time to do so and get the benefit of the new version. The new edition of the book provides a comparison of the two versions.


The required text for the course is:

Spector, P. E. (2001). SAS Programming for Researchers and Social Scientists, 2nd ed.. Thousand Oaks, CA: Sage.

If you have the first edition, you can manage. The new edition adds updated information for version 8 of SAS, an overview of the SAS Windows interface, more information on PROCs, some new appendices, and some other features that might be helpful, but are not essential.

Most of the assignments build on examples provided in the text. It is available from the USF bookstore, or directly from the publisher, Sage.

On-line office hours

I usually check my e-mail at least twice per day, Monday through Friday, and occasionally on the weekend. In addition I will have online office hours, during which I will always be logged on to answer questions. Although I will likely respond to your e-mail quickly during this time (there are exceptions, e.g., AOL often has a lag), please allow time for me to read and answer, and keep in mind it is possible that there could be several e-mails ahead of you. I will answer as soon as I can.

Online office hours: Tuesday and Thursday 10-11 AM., beginning Tuesday, May 15 and ending Thursday, June 21.

Contacting other students

So that you can communicate with others in the class, I will send a message to all those enrolled on the first day of class, and I will not hide the e-mails. If you save this message, you can use it to easily reply to everyone in class. From prior experience, I suspect you won't do this very much, but just in case...


There are no exams in this class. Grading is simple. You do all assignments on time and I give you an A. Late assignments and half-hearted efforts will be grounds for a lower grade.


Assignments due 5pm on






1, 2

Write report



3, 4

Manipulate data in a file 




 Compare subsample to entire sample




 Conduct a computer simulation



7, 8

 Screen for data errors and fix them


Pulling it all together

9, 10

 Score a psychological scale

Words of Encouragement for Struggling Programmers

Computer programming is an acquired skill that takes effort and time to master. To become good at it, you must practice. There is no other way to learn. You can't become a programmer by reading books and memorizing commands. The only way is by taking time to write programs. By experimenting and trying various approaches, you develop expertise. It is no different from learning to play a musical instrument. The assignments for the course are just the first step. To really become proficient, you must do more.

Programming can be frustrating, especially at first, as you keep making error after error, and it sometimes seems that you will never get your program right. However, keep in mind that the errors are your teachers. They tell you that your understanding was incorrect, and to try a different approach. In solving the problem, often through trial and error, you build an understanding of how the language works. Try to think of your assignments as puzzles to be solved, and keep in mind that it takes time to solve them. This is a semester course compressed into 6 weeks, so plan to devote a significant portion of your time to SAS. All the time that you would typically devote to a class over a semester is an expected minimum.

Copyright Paul E. Spector, All rights reserved, Last modified April 6, 2001.