This preview shows pages 1–3. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: Using SAS at Kenyon Kenyon College Economics Department, Spring 2005 I. INTRODUCTION TO SAS SAS is a powerful and versatile software package for statistical analysis of data. It is capable of handling large data sets and managing data. Programming can be done within SAS. SAS will read data from a file, print all or part of the data, perform simple or complex statistical analysis, prepare and print graphs of data and perform calculations. There are essentially two parts of any SAS program that we will use. The Data Step or DATA gives SAS directions about where to find an existing data file and what data to read on the file, creates new variables or transforms variables, data can be sorted, and new data sets can be created. The other main part of a SAS program is a Procedure Step or PROC. The short name PROC is followed by the name of the procedure that you want to use, such as PRINT or MEANS, and then the remaining commands tell SAS how to apply the procedure to your data set. You can repeat DATA and PROC steps many times within the SAS program. II. RUNNING SAS PROGRAMS A. Starting and Stopping SAS On the network, in Windows NT, the screen will show a Windows START button. Click that to get a pop-up menu, and it will list PROGRAMS. Move the mouse cursor over that and another menu will appear to the right, which lists SAS and then the current version (SAS 8.2). Click on THE SAS SYSTEM V8 and the SAS program will begin. The window will appear with SAS in the Title bar, then a Menu bar and a Button bar below that. The window is split and the windows that are shown are the Explorer window at the left, the LOG window at the top and the PROGRAM EDITOR Window at the bottom. The cursor is in the PROGRAM EDITOR window, the Program Editor title is highlighted, and you are ready to write or open a program in SAS. Programs can be written in the Program Editor window, the record of running the program will appear in the Log window and results will appear in the Output window. Buttons at the bottom of the screen will let you switch between OUTPUT, LOG and PROGRAM EDITOR. To stop SAS, double-click the box in the upper left or click FILE in the Menu bar, and EXIT from the pull-down menu, and that will return SAS to Windows. B. Help The SAS program contains written instructions and they are available on-line. At the very right on the Button bar is a button with a book and question mark. Click on the HELP button and the Help utility will appear with an index of topics. You can search for a particular word or click on the subject listed. Close the Help utility by clicking the box in the upper left of the Help window. C. Menus and Buttons The Menu bar contains menus for FILE, EDIT, VIEW, TOOLS, RUN, SOLUTIONS, WINDOW and HELP. Most are like other Windows programs. The Button Bar contains a box for entering text commands, and from left to right, buttons for OPEN, CLOSE, PRINT, CUT, COPY, PASTE and HELP. Use OPEN and CLOSE to work with an external file such as the file that contains your SAS program commands. Within the LOG external file such as the file that contains your SAS program commands....
View Full Document
This note was uploaded on 09/25/2011 for the course STP 452 taught by Professor Yen during the Fall '10 term at ASU.
- Fall '10