1 / 15

Laboratory 1. Introduction to SAS

Laboratory 1. Introduction to SAS. Statistical Analysis System Package for data entry data manipulation data storage data analysis reporting. SAS Screen. Handout Three opening windows Program (PGM) window ……Input Log window …… Record of what SAS did

Download Presentation

Laboratory 1. Introduction to SAS

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Laboratory 1.Introduction to SAS • Statistical Analysis System • Package for • data entry • data manipulation • data storage • data analysis • reporting

  2. SAS Screen • Handout • Three opening windows • Program (PGM) window ……Input • Log window …… Record of what SAS did • Output window ….. Results of analysis • All windows can be printed or saved

  3. SAS Screen • 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 • DATA step • define and name a data set • allows input of data • define new variables • manipulate variables • generate variables • PROC step (procedures) • doing things to data; analysis

  5. A data set • Imagine a data set as you would write it on a page • Or as it would exist in Excel • Rows are observations • Columns are variables • In cells are values

  6. A data set OBS Var1 Var2 Var3 1 4 red 10 2 5 blue 4 3 5 red 11 4 8 green 8 5 7 green 7 ...

  7. Temporary Exist only while SAS is running Can be reused, but disapper when SAS is closed Data saved in the Library WORK Permanent Saved on disk (Hard or Floppy) Exist after SAS is closed Files end in .SSD Must use two level name < library.file-name > Data saved in another defined library (e.g., SASUSER, other name) SAS data sets

  8. Saving input and permanent data sets • Do not put these on the Hard Disk Drives in NSLB 121 • Save to FLOPPY only • Open saved input just as any windows file

  9. SAS Data Sets • Data sets must have names • Eight characters … letters or numbers • Begin with a letter • Variables must have names • Eight characters … letters or numbers • Values of variables may be numeric or character • character variables are not treated as numbers

  10. DATA step functions • LOG • LOGX = LOG10(X); • LOGY = LOG(Y); • SQRT • SROOT = SQRT(X); • + - multiply ( * ) divide ( / ) power ( ** ) • NEWVAR = 10*( X + Y/2 ) - X**3 ;

  11. UNIVARIATE CHART PLOT SORT CORR PRINT TTEST NPAR1WAY GLM REG VARCOMP NESTED Procedures

  12. Procedures • UNIVARIATE - all summary statistics • mean, SD, Variance, and a lot more • CHART - Bar charts, also pie charts • PLOT - bivariate plots • CORR - correlation coefficients • PRINT - what it says • SORT - orders data set

  13. Guided Data Analysis(SAS / LAB) • Automated, menu driven, window • Data set • Response, Factors, Model • used for analysis • Summarize • summary statistics • plots • Analyze • inferential statistics

  14. Guided Data Analysis • Fields (Data set:, Analysis:, etc.) • you fill in information • Click field -- opens a menu • e.g., Data set: field opens data window • Lists available data sets • CREATE button for creating new data sets • Summarize, Analyze produce output

  15. Guided Data Analysis • Journal menu • Save current text • Save current graph • Review • Text - review entire saved text • Graph - review graphs 1 at a time • Print

More Related