EPLS Lab Software Orientation SAS
Orientation Overview Background Getting Started SAS Windows
Background Statistical Analysis Software High-level computer programming language Data management (large data sets) Descriptive Statistics (describing data) Inferential Statistics (analyzing data)
Background continued SAS has 3 view windows Editor (Programming) window Log window Output window
Background continued Three major components Data Input Datalines, text files, import files Manipulation PROC statements Output Tables, plots
Getting Started All SAS statements end in a ; Use Comment statements Start with * End with ; Entering Data Preparing data for use
Getting Started: Data Input DATA TEST1; INPUT SUBJECT 1-2 GENDER $4 EXAM1 6-8 EXAM HWGRADE $14; */EXAM1 & EXAM2 HAD TO ACCOMODATE THREE DIGITS FOR THE POSSIBILITY OF A SCORE OF 100*/; DATALINES; 10 M A 07 M A 04 F B 20 M B 14 F C ; PROC MEANS DATA = TEST1; RUN;
EDITOREDITOR
Getting Started: Data Input */Where is the data*/; FILENAME SASPWRPT 'G:\EPLS Lab Orientation\PracticeSAS.txt'; */Where do you want the data?*/; LIBNAME NEW 'G:\EPLS Lab Orientation'; DATA FIRST; INFILE SASPWRPT; INPUT SUBJECT 1-2 GENDER $ 4 EXAM1 6-8 EXAM HWGRADE $ 14; RUN; DATA TEST3; SET FIRST; PROC MEANS DATA = TEST3; RUN;
Getting Started: Data Input May be easiest Import data is under the FILE Menu PROC IMPORT OUT= WORK.TEST3 DATAFILE= "G:\SAS Powerpoint Data.xls" DBMS=EXCEL2000 REPLACE; SHEET="'Practice SAS$'"; GETNAMES=YES; RUN;
Getting Started: Manipulation PROC Statements Central Tendency, Shape, and Variation of single variables Looking for relationships between variables Testing Relationships & Hypotheses
Getting Started: Manipulation Common PROC statements: PROC FREQ ; PROC MEANS ; PROC REG ; PROC LOG ;
Getting Started: Manipulation SAS Help and Documentation Learning to Use SAS SAS Sample Programs Base SAS Select from the list Can be copied and pasted into SAS Run by clicking the “Runner” icon Programs have extensive documentation
Getting Started: Log window Useful for troubleshooting Program is in black Processes in blue Errors in Red
LOG LOG
Getting Started: Output Window Prints results on the screen Output can be copied & pasted into Word Assists in troubleshooting
OUTPUTOUTPUT
Resources for More Information: Applied Statistics and the SAS Programming Language, Ronald P. Cody, Prentice-Hall Publisher. Fourth edition + Logistic Regression using the SAS system: Theory & Application, Paul D. Allison, SAS Institute, Inc. SAS Programming for Researchers and Social Scientists, Paul E. Spector, Sage Publications. Second edition +. A Handbook of Statistical Analysis using SAS, Geoff Der and Brian S. Everitt. Chapman & Hall/CRC Press. Second edition +. Back to EPLS Lab Orientation Back to EPLS Lab Orientation