1 EPIB 698C Lecture 1 Instructor: Raul Cruz-Cano

Slides:



Advertisements
Similar presentations
Data Analysis using SPSS By Dr. Shaik Shaffi Ahamed Ph. D
Advertisements

Statistical Methods Lynne Stokes Department of Statistical Science Lecture 7: Introduction to SAS Programming Language.
Chapter 3: Editing and Debugging SAS Programs. Some useful tips of using Program Editor Add line number: In the Command Box, type num, enter. Save SAS.
Using Macros and Visual Basic for Applications (VBA) with Excel
Developing an Excel Application
Tutorial 8: Developing an Excel Application
Understanding Microsoft Excel
Word Lesson 1 Microsoft Word Basics
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.
1 Appendix A: Writing and Submitting SAS ® Programs A.1 Writing and Submitting SAS Programs.
Today: Run SAS programs on Saturn (UNIX tutorial) Runs SAS programs on the PC.
Using the Visual Basic Editor Visual Basic for Applications 1.
About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning.
Welcome to the Exciting World of ! Lessons to familiarize yourself with.
SPSS 1: An Introduction to the Statistical Package SPSS Suzie Cro MRC Clinical Trials Unit.
Introduction to SAS Essentials Mastering SAS for Data Analytics
COMPREHENSIVE Excel Tutorial 8 Developing an Excel Application.
Access Tutorial 10 Automating Tasks with Macros
A First Program Using C#
Lesson 1 – Microsoft Excel The goal of this lesson is for students to successfully explore and describe the Excel window and to create a new worksheet.
A Guide to SQL, Eighth Edition Chapter Three Creating Tables.
Copyright © Texas Education Agency, All rights reserved. 1 Web Technologies Website Development with Dreamweaver.
SAS Workshop Lecture 1 Lecturer: Annie N. Simpson, MSc.
Copyright 2007, Paradigm Publishing Inc. EXCEL 2007 Chapter 7 BACKNEXTEND 7-1 LINKS TO OBJECTIVES Record & run a macro Record & run a macro Save as a macro-
Introduction to SAS BIO 226 – Spring Outline Windows and common rules Getting the data –The PRINT and CONTENT Procedures Manipulating the data.
Website Development with Dreamweaver
Introduction to SAS. What is SAS? SAS originally stood for “Statistical Analysis System”. SAS is a computer software system that provides all the tools.
1 ADVANCED MICROSOFT EXCEL Lesson 9 Applying Advanced Worksheets and Charts Options.
Math 3400 Computer Applications of Statistics Lecture 1 Introduction and SAS Overview.
SAS 介绍和举例 Presented by 经济实验教学中心 商务数据挖掘中心. Raw Data Read in Data Process Data (Create new variables) Output Data (Create SAS Dataset) Analyze Data Using.
McGraw-Hill/Irwin The Interactive Computing Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. Microsoft Excel 2002 Lesson 1 Introduction.
Productivity Programs Common Features and Commands.
EPIB 698C Lecture 2 Notes Instructor: Raul Cruz 2/14/11 1.
Chapter 1: Introduction to SAS  SAS programs: A sequence of statements in a particular order  Rules for SAS statements: –Every SAS statement ends in.
What is MATLAB? MATLAB is one of a number of commercially available, sophisticated mathematical computation tools. Others include Maple Mathematica MathCad.
Lecture Set 2 Part A: Creating an Application with Visual Studio – Solutions, Projects, Files.
ISU Basic SAS commands Laboratory No. 1 Computer Techniques for Biological Research Animal Science 500 Ken Stalder, Professor Department of Animal Science.
Introduction to Enterprise Guide Jennifer Schmidt Rhonda Ellis Cassandra Hall.
Basic Computer and Word Functions, part 1 Read the information and use to answer the questions in the Basic Computer and Word Functions Study Guide.
1 EPIB 698E Lecture 1 Notes Instructor: Raul Cruz 7/9/13.
Lesson 1- The Basics.  In this lesson, you will learn how to: ◦ Start Excel. ◦ Open an existing workbook. ◦ Navigate within a workbook. ◦ Edit a worksheet.
Lesson 1 – Microsoft Excel * The goal of this lesson is for students to successfully explore and describe the Excel window and to create a new worksheet.
1 Introduction to SAS Available at
Lecture 20: Choosing the Right Tool for the Job. What is MATLAB? MATLAB is one of a number of commercially available, sophisticated mathematical computation.
Chapter 1: Overview of SAS System Basic Concepts of SAS System.
Dreamweaver MX. 2 Tools for Code Editing (p. 366) n An HTML editor like Dreamweaver writes most of the code you need, but at times you will need to perform.
Computing with SAS Software A SAS program consists of SAS statements. 1. The DATA step consists of SAS statements that define your data and create a SAS.
Introducing Dreamweaver. Dreamweaver The web development application used to create web pages Part of the Adobe creative suite.
Lecture Set 2 Part A: Creating an Application with Visual Studio – Solutions, Projects, Files 8/10/ :35 PM.
1 PEER Session 02/04/15. 2  Multiple good data management software options exist – quantitative (e.g., SPSS), qualitative (e.g, atlas.ti), mixed (e.g.,
1 Introduction to SAS Available at
1 Word Lesson 1 Microsoft Word Basics Microsoft Office 2010 Introductory Pasewark & Pasewark.
SAS Programming Training Instructor:Greg Grandits TA: Textbooks:The Little SAS Book, 5th Edition Applied Statistics and the SAS Programming Language, 5.
Based on Learning SAS by Example: A Programmer’s Guide Chapters 1 & 2
Microsoft Visual Basic 2012: Reloaded Fifth Edition Chapter One An Introduction to Visual Basic 2012.
Learning SAS Dr. Chaitali Basu Mukherji. What is SAS? SAS software started out in 1970s as a software package for statistical analysis By mid-1980s SAS.
McGraw-Hill/Irwin The Interactive Computing Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. Microsoft Excel 2002 Using Macros Lesson.
C Copyright © 2009, Oracle. All rights reserved. Using SQL Developer.
Word Lesson 1 Microsoft Word Basics
Excel Tutorial 8 Developing an Excel Application
Microsoft Word 2003 Illustrated Complete
Windows Internet Explorer 7-Illustrated Essentials
Chapter 1: Introduction to SAS
Instructor: Raul Cruz-Cano
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.
Instructor: Raul Cruz 9/4/13
Microsoft Excel 2007 – Level 2
Presentation transcript:

1 EPIB 698C Lecture 1 Instructor: Raul Cruz-Cano

Syllabus

3 What is SAS? SAS = “ Statistical Analysis System ” – developed for both data manipulation and data analyses in 1976 Visit the SAS website: SAS vs Excel SAS is like a computer language

4 Basics of SAS 5 Windows EDITOR – file where you write code and comments for execution by SAS (save as.sas) LOG – file where notes about the execution of the program are written, as well as errors (save as.log) OUTPUT – file where results from the program are written (save as.lst) Explorer Window Results Window

5 The SAS interface consists of multiple windows designed for specific functions. The following windows are open by default: Enhanced Editor Window Output Window Log Window Explorer Window Results Window Type SAS programs here. The "enhanced" editor has more advanced features than the traditional "program editor" used in SAS View the results of SAS procedures including tables and line charts. Graphs will be displayed in a separate Graph window. View SAS programs as they execute including error messages and warnings. Browse your SAS tables (datasets) and libraries. Create new files and file shortcuts. Displays a hierarchical outline of SAS results to simplify output navigation.

6 SAS Menus File: file input/output Edit: Editing contents in every window Contents in LOG and OUTPUT windows are not editable, but deletable View: view programs, log files, outputs, and data sets Tools: editors for graphics, report, table, etc Solutions: analysis without writing codes Window: navigating among windows Help: help information of SAS

7 SAS toolbar The toolbar gives you quick access to commands that are already accessible through the pull down menus Not all operating environments have a toolbar

8 SAS command bar Command bar is a place where you can type in SAS command. Most commands you can type in the command bar are accessible through the SAS menus or the toolbar

9 Controlling your windows The window pull-down menu Type the name of the window in the command bar Click on the window

10 Basic Rules of SAS Codes Every SAS statement ends with a semicolon ; Lines of data are NOT separated by semicolons SAS statements can extend over multiple lines provided you do not split a word of the statement across lines More than one statement can appear on a single line You can start statement anywhere within a line (not recommended) SAS is case insensitive, except for the values of categorical variables Words in SAS statement are separated by blanks

11 SAS Steps Two main types of SAS steps: Data Step: read in data, manipulate datasets etc. PROC Step: perform statistical analyses etc. DATA and PROC steps execute when a RUN, QUIT, or CARDS statement is enters Another DATA or PROC statement is entered The ENDSAS statement is entered

12 SAS Comments Two ways to comment:  /* …..comments…..*/  good for long documentation  good for commenting out sections of code  *……comments……;  good for commenting out one line of code  only commented until first ‘ ; ’  SAS Comments are green in (SAS steps are blue)

SAS Dataset Basic structure: a rectangular matrix NameSexAge Observation 1JaneF30 Observation 2MaryF29 Observation 3MikeM28 Columns are variables Rows are observations

Example 1 /*Data instructor contains information of several teachers*/ data instructor; input name $ gender $ age; cards; Jane F 30 Mary F 29 Mike M 28 ; run; Proc means;var age; run; Part 1 of code

15 SAS data type (1) Numeric data: numbers Can be added and subtracted Can have decimal places Can be positive or negative (2) Character data: contains letters, numerals or special characters

SAS Dataset and variable names Dataset name  Start with A-Z or underscore character _  Can contain only letters, numbers, or underscores  Can contain upper- and lowercase letters  choose names which are easy to be memorized  Can be greater than 8 characters in SAS 8.0+ Variable name: same rule as dataset name

17 Examples: valid SAS names Parts LastName First_Name _Null1_ X12 X1Y1

18 Examples: invalid SAS names 3Parts Last Name First-Name _Null1$ Num%

19 Submitting a program in SAS First, get your program into the editor  Type your program in the editor  Open an existing SAS program: use open from the File full down menu or use the open icon or just click your SAS program directly

20 Submitting a program in SAS Make your editor window active, and submit your code by  Submit Icon  Enter submit in the command bar  Select “ submit ” from the Run pull-down menu

21 Submitting a program in SAS Reading the SAS log window  It starts with notes about the version of SAS and your SAS site number  Original SAS code with line numbers added on the left  Notes contains information about SAS data set and computer resources used

22 Assessing errors in.log file Non-error SAS messages begin with NOTE: SAS error message begin with ERROR: or possibly WARNING: In data set creation NOTE ’ s are important to read because they indicate if the data set was created correctly. Many times there are no errors yet the data set is not correct. ERROR message sometimes give you hints about options or keywords in DATA/PROC steps

23 The output window Viewing results from the output window  You can save and print contents in the output window  When you have a lot of output, one easy way to find the specific output is to use the list in the “ results ” window Part 2 of code

24 Creating HTML output Tools ---  Options --  Preferences Click on the “ Results ” tab Click the box next to “ Create HTML ” Once turned on, results will be show in the “ Results Viewer ” window Results viewer window just show one piece of output at a time To turn off, just uncheck it

SAS on Demand for Academics