Presentation is loading. Please wait.

Presentation is loading. Please wait.

Introduction to SAS A SAS program is a list of SAS statements executed in order Every SAS statement ends with a semicolon! SAS statements can be in caps.

Similar presentations


Presentation on theme: "Introduction to SAS A SAS program is a list of SAS statements executed in order Every SAS statement ends with a semicolon! SAS statements can be in caps."— Presentation transcript:

1 Introduction to SAS A SAS program is a list of SAS statements executed in order Every SAS statement ends with a semicolon! SAS statements can be in caps or not; can be on one line or more; can be more than one statement per line - but all must end with a semicolon! Comments in SAS are good to use; they are either: * comment here... ; or /* comment here, usually a longer one maybe even on more than one line */

2 Two basic types of variables:
A SAS dataset consists of an array of observations (in rows) and variables (in columns) - think of it like a spreadsheet. Two basic types of variables: character (values are characters) numeric (values are numbers) Missing data are represented by . (period) for numeric variables and (blank) for character variables. SAS names are 32 characters at most in length, must start with a letter (or _), and can contain no special characters Can be upper or lower case.

3 A SAS program consists of two basic parts:
A SAS dataset contains information about the variables and observations (we’ll see later how to get this info...)- SAS datasets are self-documenting. A SAS program consists of two basic parts: the DATA step the PROC steps DATA steps begin with a DATA statement, read and modify data, create SAS datasets. Many ways to write SAS code here… PROC steps begin with the word PROC, perform specific functions or analyses, produce output and reports ... lots of analyses here.

4 DATA steps execute line by line, observation by observation (see the figure on page 8 of Chapter 1). Make sure you understand this important basic concept! Let’s go over our simple examples… See sections (p ) for a discussion of SAS windowing environment, the SAS log, and the SAS output. Section 1.10 discusses HTML output and 1.11 is about data libraries. Section 1.12 is about viewing datasets and their properties; 1.13 is about SAS system options. Read these as we go along - more on these important topics later…

5 For Monday: Read Chapter 1
Practice using the SAS windowing environment We’ll complete Chapter 1 soon - begin reading Chapter 2…


Download ppt "Introduction to SAS A SAS program is a list of SAS statements executed in order Every SAS statement ends with a semicolon! SAS statements can be in caps."

Similar presentations


Ads by Google