SAS Data Set Observation Variable: Temporary Permanent

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

SAS

Week 1: Introduction Introduction - SAS: Statistical Analysis System - Basic functionality: Access; Manage; Analyze; Present - Terminology o Data file: table of rows and columns representing all data kept for a collection of entities that usually have something in common -> SAS Data Set o Record: any horizontal row representing all data maintained for any one entity - > Observation o Field: any vertical column representing a single piece of information about all entities of interest -> Variable - SAS Environment o SAS Windowing Environment o Program Editor Window o Log Window o Output Window o Commands: used to navigate among the various windows and to execute a program SAS Data Sets - Two types: o Temporary deleted at end of session Reference with one level name, but stored in work library o Permanent exist after session ends; available to be used in other SAS sessions Must be referenced with two level name; data library created by programmer - Descriptor portion contains attribute information about the data in a SAS data set - Data portion contains data values in form of a rectangular table made up of observations and variables - Name: 1-32 characters; start with a letter or underscore; continue with any combination of numbers, letters or underscores; not case sensitive SAS Data Library - Identified by assigning a libref - Automatically access to: WORK temporary library; SASUSER permanent library. SAS Program Files - Contain SAS program code; can be saved and re-used; end is .sas - Components: o Environment and Options: Define data location and environment o Data Step: Read, modify, subset and write the data o Procedure(s): Perform an action on the data, e.g. sort, compute means, run regression, etc. Many different types of PROC steps: print, means, freq, etc.

Week 2: Getting Started with SAS Programs Programs - Steps o Every SAS program will contain at least one DATA or PROC step; may contain more than one. - Syntax o Statements always end with a semicolon o Statements are free format one or more blank spaces can separate words, begin in any column, single statement can span multiple lines, several statements can be on the same line. - Comments o Line comments: Begin with an asterisk *, end with semi-colon ;. Ctrl + / o General comments: Begin with /* and end with */. Ctrl + Shift + / Week 3: List Reports

Week 4: Enhancing Output and Reading in Text Data

You might also like