Computer Assignment 1

Download a program and a data set. Use SAS to estimate sample means of the data set and regress income on food expenditure and a constant. If youíve never used SAS before, hereís how to proceed:

  1. Go to my website located at and follow the link to our class information.
  2. In the "Links to Other Stuff," point number 6, you will find links to the following files: table3_1.txt and Download these files either to a diskette or to your personal drive space.
  3. In the Statistics folder on your PC (Iím assuming that you are in the CBA lab, if elsewhere the location of SAS may vary), open the SAS system. Once the program opens, you will see two windows: Output and Program Editor. Program editor will be the active window (title bar will be blue, not grey). From the pull-down menu at the top of the program, use the (File>Open) to load the program you downloaded into the editor. To run the program, use (Local>Submit) from the pull-down menu or click on the running man icon located just below the top level of the pull-down menus. Go to the output screen to see if your program executed properly. It should consist of the output from Proc Means and Proc Autoreg.
  4. If successful, save your program (File>save), print the output (Activate the output window then File>print).
  5. If unsuccessful, open the LOG window (Window>Log) and read the error messages SAS produces for clues as to why it did not run properly. Chances are, it did not find the object of the INFILE statement and did not read any data in the DATA step. Recall the text of your program (Locals>Recal text) into the program editor and change the program to indicate the proper location of your data file. Save the program again (File>save) and submit it for processing (the running man). Repeat until you are satisfied the program runs properly.
  6. Switch to the output window and clear its contents (File>new). Switch back to the program editor, recall your program, submit it one last time, and then switch to the output window. Send the output to the printer (File>Print).
  7. Exit SAS (File>Exit).



data one;

infile 'c:/website/gohttp/class/4213/table3_1.txt' firstobs=2 ;

input y x;

proc means;

proc autoreg;

model y=x;