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.

Slides:



Advertisements
Similar presentations
Introduction to SAS. What is a data set? A data set (or dataset) is a collection of data, usually presented in tabular form. Each column represents a.
Advertisements

The INFILE Statement Reading files into SAS from an outside source: A Very Useful Tool!
Chapter 3 – Fundamental Statements
Introduction to SAS Programming Christina L. Ughrin Statistical Software Consulting Some notes pulled from SAS Programming I: Essentials Training.
Statistics in Science  Introducing SAS ® software Acknowlegements to David Williams Caroline Brophy.
Introduction to scripting
Understanding SAS Data Step Processing Alan C. Elliott stattutorials.com.
Creating SAS® Data Sets
JavaScript, Fifth Edition Chapter 1 Introduction to JavaScript.
SAS Workshop Lecture 1 Lecturer: Annie N. Simpson, MSc.
Introduction to SAS Essentials Mastering SAS for Data Analytics Alan Elliott and Wayne Woodward SAS ESSENTIALS -- Elliott & Woodward1.
PROC REPORT organizes the output in many ways, from the simple to highly complex… PROC REPORT NOWINDOWS HEADLINE HEADSKIP; COLUMN variable-list; DEFINE.
Introduction to SAS BIO 226 – Spring Outline Windows and common rules Getting the data –The PRINT and CONTENT Procedures Manipulating the data.
C++ Basics Structure of a Program. C++ Source Code Plain text file Typical file extension .CPP Must compile the C++ source code without errors before.
Math 3400 Computer Applications of Statistics Lecture 1 Introduction and SAS Overview.
SAS Efficiency Techniques and Methods By Kelley Weston Sr. Statistical Programmer Quintiles.
1 PhUSE 2011 Missing Values in SAS Magnus Mengelbier Director.
Chapter 1: Introduction to SAS  SAS programs: A sequence of statements in a particular order  Rules for SAS statements: –Every SAS statement ends in.
/* Documentations */ Pre process / Linking statements Global declarations; main( ) { Local Declarations; Program statements / Executable statements; }
Lesson 2 Topic - Reading in data Chapter 2 (Little SAS Book)
10/24/20151 Chapter 2 Review: MATLAB Environment Introduction to MATLAB 7 Engineering 161.
ISU Basic SAS commands Laboratory No. 1 Computer Techniques for Biological Research Animal Science 500 Ken Stalder, Professor Department of Animal Science.
4 Chapter Four Introduction to HTML. 4 Chapter Objectives Learn basic HTML commands Discover how to display graphic image objects in Web pages Create.
1 Chapter 2: Working with Data in a Project 2.1 Introduction to Tabular Data 2.2 Accessing Local Data 2.3 Accessing Remote Data 2.4 Importing Text Files.
1 EPIB 698E Lecture 1 Notes Instructor: Raul Cruz 7/9/13.
1 Data Manipulation (with SQL) HRP223 – 2010 October 13, 2010 Copyright © Leland Stanford Junior University. All rights reserved. Warning: This.
BMTRY 789 Lecture 11: Debugging Readings – Chapter 10 (3 rd Ed) from “The Little SAS Book” Lab Problems – None Homework Due – None Final Project Presentations.
Here’s another problem (see section 2.13 on page 54). A file contains two different types of records (say A’s and B’s) and we only want to read in the.
Introduction to SAS Essentials Mastering SAS for Data Analytics Alan Elliott and Wayne Woodward SAS Essentials - Elliott & Woodward1.
Chapter 1: Overview of SAS System Basic Concepts of SAS System.
FORMAT statements can be used to change the look of your output –if FORMAT is in the DATA step, then the formats are permanent and stored with the dataset.
Chapter 2 Getting Data into SAS Directly enter data into SAS data sets –use the ViewTable window. You can define columns (variables) with the Column Attributes.
Question 3 RExcel Analysis. 1.Double click on the RExcel2007 icon on your desktop to launch R and Excel.
1 Introduction to SAS Available at
Introduction to JavaScript MIS 3502, Spring 2016 Jeremy Shafer Department of MIS Fox School of Business Temple University 2/2/2016.
Lesson 2 Topic - Reading in data Programs 1 and 2 in course notes –Chapter 2 (Little SAS Book)
1 EPIB 698C Lecture 1 Instructor: Raul Cruz-Cano
SAS Programming Training Instructor:Greg Grandits TA: Textbooks:The Little SAS Book, 5th Edition Applied Statistics and the SAS Programming Language, 5.
JavaScript 101 Lesson 6: Introduction to Functions.
SAS ® 101 Based on Learning SAS by Example: A Programmer’s Guide Chapters 14 & 19 By Tasha Chapman, Oregon Health Authority.
SAS ® 101 Based on Learning SAS by Example: A Programmer’s Guide Chapters 16 & 17 By Tasha Chapman, Oregon Health Authority.
SAS ® 101 Based on Learning SAS by Example: A Programmer’s Guide Chapters 5 & 6 By Ravi Mandal.
SAS ® 101 Based on Learning SAS by Example: A Programmer’s Guide Chapters 3 & 4 By Tasha Chapman, Oregon Health Authority.
Introduction to JavaScript MIS 3502, Fall 2016 Jeremy Shafer Department of MIS Fox School of Business Temple University 9/29/2016.
Web Database Programming Using PHP
Chapter 6 JavaScript: Introduction to Scripting
PubH 6420 Introduction to SAS Programming
Web Database Programming Using PHP
Have you signed up (or had) your meeting?
* Lecture # 7 Instructor: Rida Noor Department of Computer Science
Chapter 2: Getting Data into SAS
Two “identical” programs
Chapter 3: Working With Your Data
ECONOMETRICS ii – spring 2018
How to Import an Excel File
Chapter 1: Introduction to SAS
Instructor: Raul Cruz-Cano
Tamara Arenovich Tony Panzarella
We’ll now consider 2x2 contingency tables, a table which has only 2 rows and 2 columns along with a special way to analyze it called Fisher’s Exact Test.
Use of Mathematics using Technology (Maltlab)
Introduction to DATA Step Programming: SAS Basics II
Communication and Coding Theory Lab(CS491)
Amos Introduction In this tutorial, you will be briefly introduced to the student version of the SEM software known as Amos. You should download the current.
Have you signed up (or had) your meeting?
Data Manipulation (with SQL)
Instructor: Raul Cruz 9/4/13
Introduction to SAS Lecturer: Chu Bin Lin.
JavaScript 101 Lesson 8: Loops.
Introduction to SAS Essentials Mastering SAS for Data Analytics
Chapter 8 JavaScript: Control Statements, Part 2
Presentation transcript:

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 */

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.

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.

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 1.5-1.9 (p. 12-19) 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…

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