ASSIGNMENTS

Preassignment

Your first task is to read the academic dishonesty statement, and then send me an e-mail stating that you have read and understand it. There should be no misunderstanding about what is appropriate and inappropriate. I am serious when I say you must work alone and do your own work. This is necessary if you are to learn programming. Past experience has shown very clearly that when people work in groups, some people learn and others just copy. You can't learn to ride a bicycle by watching someone else, and you can't learn to program by seeing what someone else has done and then just following their lead. Learning comes only from the process of figuring out how to do the program.

Assignments

There are six assignments, organized by week, which are due by noon Friday of each week, as shown in the syllabus. Some weeks there will be one program to write, and some weeks there will be more. When there are multiple programs assigned, you must combine them into a single SAS run. Below are instructions for submitting them, and advice about how to keep all the elements straight. Click below on the assignment you wish to see.

Assignment 1

Assignment 2

Assignment 3

Assignment 4

Assignment 5

Assignment 6

How To Submit Assignments

Each assignment should be submitted to me in a single e-mail, containing the SAS log and output. Each SAS run contains three parts: Program, log and output. The program contains your SAS statements. With the WINDOWS version, it goes into the program editor window where you can write programs and submit them. When a program runs, all statements are displayed in the log, along with error messages and information about the run. This information is vital to determining if your program executed correctly. You can find out if the correct file was read, and if it contained the correct number of subjects and variables. NEVER ASSUME ABSENCE OF ERROR MESSAGES MEANS A PROGRAM RAN CORRECTLY. The output is the results of the program, either specific things you told SAS to print or the results of statistical procedures or PROCs. I need to see both the log and output.

Required Procedure For Submitting An Assignment

To submit an assignment, you MUST follow this procedure.

When you send your program to me, you must include the log first and then the output in one e-mail message, and not as separate e-mails. This must be in ASCII or text format, and not a word processor format. When you save the log and output from SAS, it should be saved in the correct file format. If you send parts of your assignment to me separately, I will return them. You can either combine them in advance, or insert both into a single e-mail. If there are multiple programs for an assignment, put them all into a single SAS run, and then include the log that results, followed by the single output. Be sure they are in the order listed for that assignment. DO NOT send me a separate e-mail for each part of the assignment.

Unless you have to redo one or more assignments, you should send me only six e-mails containing assignments by the end of class.

Also, if you use the WINDOWS version of SAS, be sure you clear the log and output windows before doing your final run to be submitted. These windows do not reset after each run, so if you don't clear them I will receive results of every run you made during the session.

Finally, be sure that your linesize is not so wide that the lines wrap when you send me your assignment, making it impossible to read. Check the instructions for setting the proper linesize.

The instructions might seem picky, but by June I'm going to be buried in e-mails, so this is necessary so I can respond quickly to your questions. If I have to sort through multiple, poorly organized e-mail assignments, my response time will likely go from hours to days.

Organizing Your Sas Files

On PCs and UNIX machines, names for files have two parts separated by a period. The original PC limitation under the old DOS operating system was 8.3, meaning up to 8 characters for the first part of the name and up to 3 for the second, which is called the extension. WIN95 and UNIX allow more characters for both parts. Some conventions have begun to be adopted for extensions, that allow us to keep track of file types. For example, WORD documents are identified with a .DOC extension. In running SAS there are four file types that you will have to use: data, log, output, and program. Below is a brief description and recommended extension for each. I urge you to use these standard extensions. Trust me, later it will make your life easier as you try to remember which file is which.

File Type

Extension

F key to take you to window*

Description

Data

.dat

 

Contains data to be input into your SAS run

SAS log

.log

F6

Contains the contents of a SAS log for your run. You must save a log and give it a name with PC versions.

Output

.lst

F7

The output of your SAS program. You must save your output file and give it a name with PC versions.

Program

.sas

F5 (F4 will recall your program)

Your SAS program statements. Never forget to save your program!

*For SAS version 8.x it is best to use the mouse to click on the bottom screen tabs to move from window to window. The F keys will call up the old version of the Program Window rather than the new enhanced version, which you should use.

 Note: Your log, output, and program are not saved automatically. They are kept throughout your active SAS session, but once you quit the program, they are erased. Be sure to save them. With the Windows version that most of you will likely use, click on the window that you wish (or use the F keys to toggle around--top row of keys on your keyboard), click on File menu (upper left of screen), and then on Save As and you can save your file. Pay close attention to the subdirectory with SAS 6.x as it doesn't manage this very well.

Postassignment

I would appreciate any feedback you would like to give me about this class. You can send it to me in an e-mail, or to maintain anonymity, you can put a note in my mailbox. Let me know if there are things that worked that I should continue to do, or things that might not have worked well that I should change. Specific suggestions are the most helpful.

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