Download presentation
Presentation is loading. Please wait.
Published byIsaac Osborne Modified over 9 years ago
1
Laboratory 1. Introduction to SAS u Statistical Analysis System u Package for –data entry –data manipulation –data storage –data analysis –reporting
2
SAS Screen u Handout u Three opening windows –Program (PGM) window ……Input –Log window …… Record of what SAS did –Output window ….. Results of analysis u All windows can be printed or saved
3
SAS Screen u Menu bar –Global: Main access to different windows –Local: Commands specific to the active window –File: Open, save, print, etc. –Edit: Modifying window contents –Journal: saving current window for easy printing –Help
4
SAS Input u DATA step –define and name a data set –allows input of data –define new variables –manipulate variables –generate variables u PROC step (procedures) –doing things to data; analysis
5
A data set u Imagine a data set as you would write it on a page u Or as it would exist in Excel u Rows are observations u Columns are variables u In cells are values
6
A data set OBSVar1Var2Var3 14red10 25blue4 35red11 48green8 5 7green7...
7
SAS data sets u Temporary –Exist only while SAS is running –Can be reused, but disapper when SAS is closed –Data saved in the Library WORK u Permanent –Saved on disk (Hard or Floppy) –Exist after SAS is closed –Files end in.SSD –Must use two level name –Data saved in another defined library (e.g., SASUSER, other name)
8
Saving input and permanent data sets u Do not put these on the Hard Disk Drives in NSLB 121 u Save to FLOPPY only u Open saved input just as any windows file
9
SAS Data Sets u Data sets must have names –Eight characters … letters or numbers –Begin with a letter u Variables must have names –Eight characters … letters or numbers –Values of variables may be numeric or character v character variables are not treated as numbers
10
DATA step functions u LOG –LOGX = LOG10(X); –LOGY = LOG(Y); u SQRT –SROOT = SQRT(X); u + - multiply ( * ) divide ( / ) power ( ** ) –NEWVAR = 10*( X + Y/2 ) - X**3 ;
11
Procedures u UNIVARIATE u CHART u PLOT u SORT u CORR u PRINT u TTEST u NPAR1WAY u GLM u REG u VARCOMP u NESTED
12
Procedures u UNIVARIATE - all summary statistics –mean, SD, Variance, and a lot more u CHART - Bar charts, also pie charts u PLOT - bivariate plots u CORR - correlation coefficients u PRINT - what it says u SORT - orders data set
13
Guided Data Analysis (SAS / LAB) u Automated, menu driven, window –Data set –Response, Factors, Model v used for analysis –Summarize v summary statistics v plots –Analyze v inferential statistics
14
Guided Data Analysis u Fields (Data set:, Analysis:, etc.) –you fill in information –Click field -- opens a menu –e.g., Data set: field opens data window v Lists available data sets v CREATE button for creating new data sets –Summarize, Analyze produce output
15
Guided Data Analysis u Journal menu –Save current text –Save current graph –Review v Text - review entire saved text v Graph - review graphs 1 at a time –Print
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.