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:
- Go to my website located at http://ladkins.bus.okstate.edu and follow the link to our class information.
- In the "Links to Other Stuff," point number 6, you will find links to the following files: table3_1.txt and sas_1.sas. Download these files either to a diskette or to your personal drive space.
- 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 SAS_1.sas 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.
- If successful, save your program (File>save), print the output (Activate the output window then File>print).
- 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.
- 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).
- Exit SAS (File>Exit).
infile 'c:/website/gohttp/class/4213/table3_1.txt' firstobs=2 ;
input y x;