DOC

Base_One_07

By Leroy Cunningham,2014-08-31 00:22
7 views 0
Base_One_07

    SAS BASE Certificate

Topic: Introduction to SAS and SAS Fundamental Concepts

    1. Overview of the SAS System

    2. What Can SAS Do?

    3. SAS File

    4. SAS Display Manager System

    5. Basic Structure of SAS

    6. Preliminary Concepts and Rules

    7. SAS Resources

     1

1. Overview of the SAS System

    1.1 What Is the SAS System?

    The SAS System (Statistical Analysis System, SAS) is an integrated system of software

    products that enables you to perform

    ; data entry, retrieval, and management

    ; report writing and graphics

    ; statistical and mathematical analysis

    ; business planning, forecasting, and decision support

    ; operations research and project management

    ; quality improvement

    ; applications development.

    1.2 Overview of Base SAS Software

    The core of the SAS System is base SAS software, which consists of

    a programming language that you use to manage your data. SAS language

    software tools for data analysis and reporting. SAS procedures

    a tool for extending and customizing SAS software programs and macro facility

    for reducing text in your programs.

    a programming tool that helps you find logic problems in DATA DATA step

    step programs. debugger

    a system that delivers output in a variety of easy-to-access Output Delivery

    formats, such as SAS data sets, listing files, or Hypertext Markup System (ODS)

    Language (HTML).

    an interactive, graphical user interface that enables you to easily SAS windowing

    run and test your SAS programs. environment

2. What Can SAS Do?

    - Data entry

    - Data access and output

    - Data cleaning

    - Data manipulation

    - Data analysis: descriptive statistics and statistical analysis

    - Data report

    - Data graphics

3. SAS Files

    When you work with SAS, you use files that are created and maintained by SAS, as well

    as files that are created and maintained by your operating environment, and that are not

    related to SAS. Files with formats or structures known to SAS are referred to as SAS files. All SAS files reside in a SAS data library. The most commonly used SAS file is a SAS

    data set.

     2

3.2 SAS data set is structured in a format that SAS can process.

    There are two kinds of SAS data sets:

    ; SAS data file

    ; SAS data view.

    A SAS data file both describes and physically stores your data values. A SAS data set consists of the following:

    ; descriptor information (portion)

    ; data values(data portion).

    The descriptor portion contains information about the dataset such as the number of variables, their names and types, the number of observations and the date and time that the data set was created. The data portion contains the actual data arranged with variables in columns and observations in rows. SAS can handle up to 32,767 variables (however, some of people pointed out here is no limit to the number of variables that can be stored in a SAS data set.) and as many observations as the memory of your computer will allow (There is no limit to the number of observations).. The data values are data that has been

    collected or calculated.

    They are organized into rows, called observations, and columns, called variables. An observation is a collection of data values that usually relate to a single object. A variable

    is the set of data values that describe a given characteristic. The following figure represents a SAS data set:

3.3 External Files

    Data files that you use to read and write data, but which are in a structure unknown to SAS, are called external files. External files can be used for storing

    ; raw data that you want to read into a SAS data file

    ; SAS program statements

    ; procedure output.

4. SAS Display Manager System

    4.1 How to Use SAS software

    - Batch mode: submit a batch program by submitting a file that contains the batch

     3

     program, such as Unix, refer to background processing - Non-interactive mode:

    - Interactive line mode:

    - SAS Display Manger mode: provide you with all of capabilities through a set of

     windows

    - For many users, to use the SAS Display Manage to edit SAS program

4.2 SAS Display Manager

    When you first start SAS software, the five main SAS windows open:

    Explorer, Results, Editor, Log, and Output windows (demo). the

    4.2.1 Program Editor: enter program, create lines of text

    4.2.2 Log

    - a reprinting of the SAS program that was submitted

    - a listing of notes indicating how many variables and observations are contained in

    the data set

    - a listing of any errors made in writing the SAS program - main four types: error, warning, note, uninitialized, 4.2.3 Output

    - results of printed output or/and the statistical analysis requested 4.2.4 Results

    - a listing of outputs

    4.2.5 Explorer

    - view and manage your SAS files, which are stored in libraries

5. Basic Structure of SAS

    5.1 Data Step(s): consist of a group of statements in SAS languages

    - read raw data or existing SAS data sets

    - processes input data

    - create a SAS data set

    - read data, prepare, manipulates and combine it with other data set 5.2 Proc Step(s): consist of a group of statements to request a SAS procedure to

    - perform statistical analyses

    - produce formatted reports, tables, chart, plots

    - produce statistics, to create SQL queries, and to perform other analyses Advice:

    The most effective strategy for learning SAS is to concentrate on the details of the data

    step, and learn the details of each procedure.

    5.3 Data Values

    consists of data values in rectangular array.

    i) numeric: numbers; + or - sign can precede the number, such as 0-9, +7, -4 ,

    missing (.) 3-8 bytes

    ii) character: any characters, a missing value is treated as a blank, (' ')

5.4 SAS statements

    SAS programs consist of SAS statements. A SAS statement has two important

    characteristics:

     4

    ; It usually begins with a SAS keyword.

    ; It always ends with a semicolon.

    SAS statements are free-format. This means that

    ; they can begin and end anywhere on a line

    ; one statement can continue over several lines

    ; several statements can be on a line.

6. Preliminary Concepts and Rules

    6.1 Rules for Most SAS Name

    - be 32 characters long.

    - the first character must be a letter or underscore (_). Subsequent characters can be letters, numeric digits (0, 1, . . ., 9), or underscores.

    - use upper or lowercase letters, SAS processes names as uppercase regardless of how you type them.

    - Blanks cannot appear in SAS names.

    - Special characters, except for the underscore, are not allowed. - SAS reserves a few names for automatic variables and variable lists, SAS data sets, and librefs. For example: _N_ and _ERROR_, _CHARACTER_, _NUMERIC_, and _ALL_, SASHELP, SASMUG, SASUSER, _NULL_, _DATA_, _LAST_ et al.

6.2 Rules for SAS Variable Names

    - SAS variable names may be up to 32 characters in length.

    - recommended 8 characters or less, constructed of letters, digits and the underscore character.

    - The first character must begin with an alphabetic character or an underscore. Subsequent characters can be alphabetic characters, numeric digits, or underscores. - may not contain blanks.

    - may not contain any special characters other than the underscore. - may contain mixed case.

    Note: You cannot, therefore, use the same letters with different combinations of lower- and uppercase to represent different variables. For example, cat, Cat, and CAT all

    represent the same variable.

7. SAS Resources

    - Online Resources: www.sas.com and online documentation: v9doc.sas.com

    - SAS Institute Publications:

    1. Applied statistics and the SAS programming language, by R. P. Cody 2. The Little SAS Book: A Primer, Second Edition, by Lora Delwiche et al

    - Course Outline

     5

Report this document

For any questions or suggestions please email
cust-service@docsford.com