lecture_02 - UNDERSTANDING THE FUNCTION OF THE SAS DATASET...

Info iconThis preview shows pages 1–8. Sign up to view the full content.

View Full Document Right Arrow Icon
UNDERSTANDING THE FUNCTION OF THE SAS DATASET SAS enables you to solve problems by providing methods to analyze or process your data However, you must first get the raw data into a form that SAS can recognize and process Raw Data DATA step statements SAS Dataset
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
REVIEW OF THE STRUCTURE OF A SAS DATASET A SAS dataset consists of data organized into a rectangular form with a known number of rows (observations) and columns (variables) Name Sex Age Height Weight Steve M 41 74 170 Rocky M 42 68 166 Kurt M 39 72 167 Deborah F 30 66 124 Mary F 33 66 115 observation variable data value
Background image of page 2
REVIEW OF THE STRUCTURE OF A SAS DATASET In a SAS dataset, every variable exists for every observation. If you do not know the value, then you represent this with a missing value character (. for numeric variables, a blank for character variables) Name Sex Age Height Weight Steve M 41 74 170 Pat . 66 155 Mary F 33 66 115
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
UNDERSTANDING SAS DATA LIBRARIES SAS Data Library: A collection of one or more SAS files ( i.e. SAS datasets) that are recognized by SAS and can be referenced and stored as a unit. Organizing files in libraries makes it easier to locate and reference them in a program. Under Windows, a SAS data library is a group of SAS files in the same directory.
Background image of page 4
ACCESSING A DATA LIBRARY To access a SAS data library, you can either: Directly specify the physical name for the location of the data library on the appropriate statement (must be in single quotation marks): DATA C:\Documents and Settings\rrieger\My Documents\STA511\Data\Example ’ ; Assign a SAS l i br ef , a SAS name that is temporarily associated with the physical location of the SAS data library.
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
LIBREF By assigning a libref to the location of a SAS data library, you can reference files in the library by using the libref instead of the long physical name. The libref may be used throughout the SAS session. Upon starting a SAS session, SAS assigns the libref WORK to a special SAS data library for assigning temporary files. The LI BNAME statement is a common method for assigning a libref to save files permanently.
Background image of page 6
LIBNAME STATEMENT The simplest form of the LI BNAME statement is: LI BNAME l i br ef ‘ SAS dat a- l i br ar y’ ; where l i br ef is a shortcut name to associate with the SAS
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 8
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 10/01/2009 for the course STA 511 taught by Professor Scottmcclintock during the Spring '09 term at West Chester.

Page1 / 29

lecture_02 - UNDERSTANDING THE FUNCTION OF THE SAS DATASET...

This preview shows document pages 1 - 8. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online