SlideShare a Scribd company logo
STATISTICS FOR  ECONOMICS AND BUSINESS INTRODUCTION TO SAS
Introduction to SAS SAS is a powerful statistical software designed to support Business Intelligence.  SAS communicates with you, and you communicate with SAS through a system of  Windows . Main programming windows There are three main programming widows. EDITOR :  In the editor window you write your SAS programs, i.e., the procedures you want to apply to your data. SAS procedures are a collection of statements.  LOG :  The log window gives to you information about programs you submitted to SAS. In particular, you should always have a look to this window where you can find the statements you submitted. In this windows three kind of messages are displayed:  NOTES  (blue):  give to you information about your elaboration.  ERRORS  (red):  tell you that some error occurred while elaborating your program, and that this error can not be managed by SAS. Your program statements have to be changed in order to remove the problem. WARNINGS  (green):  tell you that your program may contain some errors. Nevertheless, SAS “understood” which error occurred and tells you how it managed the error itself. You have to check if the correction made by SAS is satisfactory.  OUTPUT :  The output window displays the required output.
Introduction to SAS Navigation windows Two more windows are available to have an easier access to your input and to your output. EXPLORER :  In this window you find information about SAS libraries (see later).  From this window you can open SAS data set . RESULT :  This window permits to you to quickly navigate your output. Moreover, you can use this window to obtain the output in a format which can be easily exported in Excel and in Word (see later).
Introduction to SAS Below a description of the main steps of a SAS section is reported External  Data DATA Step SAS Dataset OUTPUT SAS Dataset IMPORTING OR ACCESSING DATA CREATING A SAS DATASET TO BE ELABORATED ELABORATE DATA AND OBTAIN THE DESIRED OUTPUT PROC Step
Introduction to SAS – Accessing SAS datasets SAS only elaborates data matrices in a SAS format.  Managing SAS datasets. To access an already existing SAS dataset, you have to indicate to SAS where (which directory on yr PC) it is located. Directories on your PC can not be directly accessed from SAS .  A  SAS library  is a “name” assigned ( during a session ) to one directory in your PC. Hence, when your session starts, you have  to specify which directories in yr PC (possibly) contain data you are going to use, by declaring the libraries. Assigning a library The simplest way to assign a library consists in clicking on the New Library button on the main menu
Introduction to SAS – Permanent and work libraries Managing SAS datasets. A data set in a given directory can be accessed by specifying its name and its directory:  libname.dataname   Work and permanent SAS datasets. A data set created during one SAS session will  by default  be stored in a  work  library, which will be erased at the end of the session.  If you want to save your SAS dataset you have to specify the library (directory on yr PC) where you want yr data to be saved. Hence A data set referred to as  dataname Will be lost at the end of the session A data set referred to as  libname.dataname Will be saved at the end of the session
Introduction to SAS – Importing External data  Importing data from external sources   It is possible to import data in other formats.  At this aim you can use the  Import Wizard . From any SAS window, you can open the  File  menu in the main menu bar and you can select  Import Data.  The imported dataset can be saved in the work library or in a permanent library
Introduction to SAS – SAS programs SAS  programs  are constituted by two fundamental steps. DATA Step:  This step is used to manipulate data, transform variables and, also, to modify the structure of datasets.  PROC Step:  This step is used to elaborate SAS dataset, i.e. to analyze data, to create reports, to obtain graphs.  As it was said before, SAS programs must be written in the  Editor Window.  Data and Proc Steps are  collection of statements .  The  first  statement contains a starting declaration key ( DATA  or  PROC ) indicating whether the procedure consists in a data or in a proc step. Also the other statements start with an identification key [in blue] identifying the elaboration required.  ALL SAS statement must end with a semicolon  “  ;  ”. Each data or proc step  ends  with a “  run;  ” statement, indicating that no more elaboration are required in a particular step of analysis. If a word in a statement  is emphasized in  red  this means that the statement is wrong. Comments may be inserted, and have to be preceded by a “  /*  ” and followed by a “  */  ”. Comments are emphasized in  /*   green */ . A quoted text,  ‘ Text ’  (within quotation marks), is emphasized in  violet . Take care: Quotation marks must always be closed.

More Related Content

PDF
Introduction to SAS
PPT
Understanding SAS Data Step Processing
PPT
Overview spss student
PDF
Sap abap material
PDF
SPSS Getting Started Tutorial
PPT
Base sas 2 sas windowing environment
DOCX
Sas Macro Examples
PDF
SAP ABAP data dictionary
Introduction to SAS
Understanding SAS Data Step Processing
Overview spss student
Sap abap material
SPSS Getting Started Tutorial
Base sas 2 sas windowing environment
Sas Macro Examples
SAP ABAP data dictionary

What's hot (20)

PDF
Sas tips & tricks
PPTX
PPTX
Ms access
PDF
Introduction to sas
PDF
Creating a Coding Book in IBM SPSS Statistics
PPTX
Sas visual analytics Training
PDF
001.general
PDF
Quickstart Microsoft access 2013
PPT
Access 2 day course
PPTX
Ms access 2010
PPTX
Ms access
PPTX
Spss presentation
PPTX
SAP ABAP Practice exam
PPT
Microsoft Access 2007
PPT
Uses of MS Access in Business
PPTX
Class viii ch-2 log on to access
PDF
Intro to Microsoft Access
PPT
B.sc i agri u 4 introduction to ms access
PPT
Lecture03 abap on line
PDF
IBM SPSS Statistics: Download and Upload
Sas tips & tricks
Ms access
Introduction to sas
Creating a Coding Book in IBM SPSS Statistics
Sas visual analytics Training
001.general
Quickstart Microsoft access 2013
Access 2 day course
Ms access 2010
Ms access
Spss presentation
SAP ABAP Practice exam
Microsoft Access 2007
Uses of MS Access in Business
Class viii ch-2 log on to access
Intro to Microsoft Access
B.sc i agri u 4 introduction to ms access
Lecture03 abap on line
IBM SPSS Statistics: Download and Upload
Ad

Similar to 8323 Stats - Lesson 1 - 03 Introduction To Sas 2008 (20)

PPTX
SAS basics Step by step learning
DOCX
SAS Programming Notes
PPT
Hechsp 001 Chapter 2
DOC
Introduction to SAS
PPT
BASE SAS Training presentation of coding
PDF
Introduction to-sas-1211594349119006-8
PPT
SAS Online Training by Real Time Working Professionals in USA,UK,India,Middle...
PDF
Introduction To Sas
PPTX
BAS 150 Lesson 3 Lecture
PPTX
Introducción al Software Analítico SAS
PDF
Sas language reference concepts
PDF
Sas summary guide
PPTX
sas.pptxnbhjghjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
PDF
Basics of SAS
PPTX
GENERAL CONCEPTS OF BASE SAS PROGRAMMING.pptx
PPT
Sas short course_presentation_11-4-09
PPT
Sas short course_presentation_11-4-09
PPT
SAS - overview of SAS
PPT
Prog1 chap1 and chap 2
SAS basics Step by step learning
SAS Programming Notes
Hechsp 001 Chapter 2
Introduction to SAS
BASE SAS Training presentation of coding
Introduction to-sas-1211594349119006-8
SAS Online Training by Real Time Working Professionals in USA,UK,India,Middle...
Introduction To Sas
BAS 150 Lesson 3 Lecture
Introducción al Software Analítico SAS
Sas language reference concepts
Sas summary guide
sas.pptxnbhjghjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
Basics of SAS
GENERAL CONCEPTS OF BASE SAS PROGRAMMING.pptx
Sas short course_presentation_11-4-09
Sas short course_presentation_11-4-09
SAS - overview of SAS
Prog1 chap1 and chap 2
Ad

Recently uploaded (20)

PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Unlocking AI with Model Context Protocol (MCP)
PPTX
Big Data Technologies - Introduction.pptx
PPTX
sap open course for s4hana steps from ECC to s4
PDF
Electronic commerce courselecture one. Pdf
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Network Security Unit 5.pdf for BCA BBA.
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PPTX
Spectroscopy.pptx food analysis technology
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
KodekX | Application Modernization Development
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Spectral efficient network and resource selection model in 5G networks
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PPTX
Understanding_Digital_Forensics_Presentation.pptx
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Unlocking AI with Model Context Protocol (MCP)
Big Data Technologies - Introduction.pptx
sap open course for s4hana steps from ECC to s4
Electronic commerce courselecture one. Pdf
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Mobile App Security Testing_ A Comprehensive Guide.pdf
MYSQL Presentation for SQL database connectivity
Network Security Unit 5.pdf for BCA BBA.
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Spectroscopy.pptx food analysis technology
Digital-Transformation-Roadmap-for-Companies.pptx
KodekX | Application Modernization Development
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Spectral efficient network and resource selection model in 5G networks
“AI and Expert System Decision Support & Business Intelligence Systems”
Understanding_Digital_Forensics_Presentation.pptx

8323 Stats - Lesson 1 - 03 Introduction To Sas 2008

  • 1. STATISTICS FOR ECONOMICS AND BUSINESS INTRODUCTION TO SAS
  • 2. Introduction to SAS SAS is a powerful statistical software designed to support Business Intelligence. SAS communicates with you, and you communicate with SAS through a system of Windows . Main programming windows There are three main programming widows. EDITOR : In the editor window you write your SAS programs, i.e., the procedures you want to apply to your data. SAS procedures are a collection of statements. LOG : The log window gives to you information about programs you submitted to SAS. In particular, you should always have a look to this window where you can find the statements you submitted. In this windows three kind of messages are displayed: NOTES (blue): give to you information about your elaboration. ERRORS (red): tell you that some error occurred while elaborating your program, and that this error can not be managed by SAS. Your program statements have to be changed in order to remove the problem. WARNINGS (green): tell you that your program may contain some errors. Nevertheless, SAS “understood” which error occurred and tells you how it managed the error itself. You have to check if the correction made by SAS is satisfactory. OUTPUT : The output window displays the required output.
  • 3. Introduction to SAS Navigation windows Two more windows are available to have an easier access to your input and to your output. EXPLORER : In this window you find information about SAS libraries (see later). From this window you can open SAS data set . RESULT : This window permits to you to quickly navigate your output. Moreover, you can use this window to obtain the output in a format which can be easily exported in Excel and in Word (see later).
  • 4. Introduction to SAS Below a description of the main steps of a SAS section is reported External Data DATA Step SAS Dataset OUTPUT SAS Dataset IMPORTING OR ACCESSING DATA CREATING A SAS DATASET TO BE ELABORATED ELABORATE DATA AND OBTAIN THE DESIRED OUTPUT PROC Step
  • 5. Introduction to SAS – Accessing SAS datasets SAS only elaborates data matrices in a SAS format. Managing SAS datasets. To access an already existing SAS dataset, you have to indicate to SAS where (which directory on yr PC) it is located. Directories on your PC can not be directly accessed from SAS . A SAS library is a “name” assigned ( during a session ) to one directory in your PC. Hence, when your session starts, you have to specify which directories in yr PC (possibly) contain data you are going to use, by declaring the libraries. Assigning a library The simplest way to assign a library consists in clicking on the New Library button on the main menu
  • 6. Introduction to SAS – Permanent and work libraries Managing SAS datasets. A data set in a given directory can be accessed by specifying its name and its directory: libname.dataname Work and permanent SAS datasets. A data set created during one SAS session will by default be stored in a work library, which will be erased at the end of the session. If you want to save your SAS dataset you have to specify the library (directory on yr PC) where you want yr data to be saved. Hence A data set referred to as dataname Will be lost at the end of the session A data set referred to as libname.dataname Will be saved at the end of the session
  • 7. Introduction to SAS – Importing External data Importing data from external sources It is possible to import data in other formats. At this aim you can use the Import Wizard . From any SAS window, you can open the File menu in the main menu bar and you can select Import Data. The imported dataset can be saved in the work library or in a permanent library
  • 8. Introduction to SAS – SAS programs SAS programs are constituted by two fundamental steps. DATA Step: This step is used to manipulate data, transform variables and, also, to modify the structure of datasets. PROC Step: This step is used to elaborate SAS dataset, i.e. to analyze data, to create reports, to obtain graphs. As it was said before, SAS programs must be written in the Editor Window. Data and Proc Steps are collection of statements . The first statement contains a starting declaration key ( DATA or PROC ) indicating whether the procedure consists in a data or in a proc step. Also the other statements start with an identification key [in blue] identifying the elaboration required. ALL SAS statement must end with a semicolon “ ; ”. Each data or proc step ends with a “ run; ” statement, indicating that no more elaboration are required in a particular step of analysis. If a word in a statement is emphasized in red this means that the statement is wrong. Comments may be inserted, and have to be preceded by a “ /* ” and followed by a “ */ ”. Comments are emphasized in /* green */ . A quoted text, ‘ Text ’ (within quotation marks), is emphasized in violet . Take care: Quotation marks must always be closed.