190 likes | 208 Views
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)
E N D
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 EXAM2 10-12 HWGRADE $14; */EXAM1 & EXAM2 HAD TO ACCOMODATE THREE DIGITS FOR THE POSSIBILITY OF A SCORE OF 100*/; DATALINES; 10 M 080 084 A 07 M 085 089 A 04 F 090 086 B 20 M 082 085 B 14 F 088 084 C ; PROCMEANS DATA = TEST1; RUN;
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 EXAM2 10-12 HWGRADE $ 14; RUN; DATA TEST3; SET FIRST; PROCMEANS DATA = TEST3; RUN;
Getting Started: Data Input • May be easiest • Import data is under the FILE Menu PROCIMPORT 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
Getting Started: • Output Window • Prints results on the screen • Output can be copied & pasted into Word • Assists in troubleshooting
Resources for More Information: • Applied Statistics and the SAS Programming Language, 1997. Ronald P. Cody, Prentice-Hall Publisher. Fourth edition + • Logistic Regression using the SAS system: Theory & Application, 1999. Paul D. Allison, SAS Institute, Inc. • SAS Programming for Researchers and Social Scientists, 2001. Paul E. Spector, Sage Publications. Second edition +. • A Handbook of Statistical Analysis using SAS, 2002. Geoff Der and Brian S. Everitt. Chapman & Hall/CRC Press. Second edition +. www.crcpress.com. Back to EPLS Lab Orientation