Presentation is loading. Please wait.

Presentation is loading. Please wait.

BMTRY 789 Introduction to SAS Programming Lecturer: Annie N. Simpson, MSc.

Similar presentations


Presentation on theme: "BMTRY 789 Introduction to SAS Programming Lecturer: Annie N. Simpson, MSc."— Presentation transcript:

1 BMTRY 789 Introduction to SAS Programming Lecturer: Annie N. Simpson, MSc.

2 Summer 2009 BMTRY 789 Intro. To SAS Programming2 Syllabus DEPARTMENT: Biostatistics, Bioinformatics, and Epidemiology PRINCIPAL INSTRUCTOR: A. Simpson, MSc. METHODS OF EVALUATION: Pass/No Pass (2 Credit Hours) Homework Assignments 70% Class Preparation and Participation 20% Group Presentation 10% READINGS: Readings assigned for a class are expected to be read prior to that class session. REQUIRED TEXT: Applied Statistics and the SAS Programming Language. Cody R.P. and Smith, J.K. (5 th Edition) 2006. Prentice Hall, Upper Saddle River, NJ 07458. WHEN OFFERED: Summer Semester, 12 weeks, Wed 10:00am-12:30pm

3 Summer 2009 BMTRY 789 Intro. To SAS Programming3 Syllabus (cont.) METHODS OF EVALUATION: Pass/No Pass (2 Credit Hours) Class Preparation and Participation 20% Homework (70%): : Homework is the main method of evaluation (AND PRACTICE!) 7-9 HWS, 1 free miss, 4 “√ - ” or less = your pass is in jeopardy (depending on attendance and final presentation). Attendance (20%): Attendance is required. If ≥3 of the 11 classes are missed you will automatically not pass. Final Presentation (10%): Required: No final presentation, no pass

4 Summer 2009 BMTRY 789 Intro. To SAS Programming4 What are your expectations?

5 Summer 2009 BMTRY 789 Intro. To SAS Programming5 Syllabus (cont.) DETAILED STATEMENT OF OBJECTIVE: To introduce students to the concepts and methods of programming using SAS, and to expose them to other statistical software packages through guest lecturers. At the end of the course, the student will be able to: 1. Read basic SAS syntax and functions; 2. Enter raw data and import data from other sources into SAS; 3. Manipulate SAS data to construct flat and vertical files structured to answer specific research questions; 4. Program procedures to describe the characteristics of continuous and categorical variables; 5. Be aware of other software packages and the conditions under which they may be superior to SAS for analytical purposes; 6. Be able to debug programs and to use assorted references, both online and text, to learn new SAS procedures and functions, as well as solve programming challenges. 7. Be familiar with individuals at MUSC with extensive experience in data manipulation, SAS and other programming languages.

6 Summer 2009 BMTRY 789 Intro. To SAS Programming6 CLASS SCHEDULE LectureDateTitleReadings 15/20 Overview of SAS None 25/27 SAS syntax, variable naming rules, entering your own data, and Input Statement Chapter 1, 2, 12 & 13 6/3 No Class on this day, but HW 1 is still due by 5pm in Annie’s mailbox 36/10 Categorical data and working with dates and longitudinal data Chapters 3 & 4 46/17 Subsetting, Merging, Construction of Flat Files from Vertical, etc. Chapter 14 56/24 Random Number Generators, If-Then_Else and Do Loops Chapter 5 & 6 67/1 No Class on this day, but HW 3 Libname quiz is due via email or in my mailbox 77/8 Conquering Proc gPLOT, Output Statements and the Output Delivery System (ODS) SAS Functions, especially dealing with dates Chapters 7, 17, 18 & Selected Readings

7 Summer 2009 BMTRY 789 Intro. To SAS Programming7 CLASS SCHEDULE (cont.) LectureDateTitleReadings 87/15 Arrays and Advanced Analytical Data set Creation Chapter 2 & 3 97/22 Intro. To Macro Programming Chapters 19 & Selected Readings 107/22 Scoring a Test and Proc Tabulate Chapter 11 & Selected Readings 118/5 Debugging your Code AND Final Presentations on Pieces of Useful SAS Code and/or tricks (class will take place in the dept., not the library!) None

8 Summer 2009 BMTRY 789 Intro. To SAS Programming8 SAS Help Resources Nothing replaces experience / trial and error Help files from the program, all the manuals you could ever want or need! SAS Books by users (I have a shelf full) SAS on the web: www.SAS.com

9 Summer 2009 BMTRY 789 Intro. To SAS Programming9 Example *Import Data using the File->Import Data pull down menu; *Call the new SAS data set STROKE; *Add a new hypertension indicator to the data set based on bp; *Print the new data set out to the screen; Libname Annie “C:\DATA”; DATA Annie.Stroke; Set Stroke; If sbp > 140 and dbp > 90 then Hypertensive=1; Else If sbp =. Or dbp =. Then Hypertensive=.; Else Hypertensive = 0; RUN; PROC PRINT DATA = Annie.Stroke; /*Prints the results*/ RUN;

10 Summer 2009 BMTRY 789 Intro. To SAS Programming10 Commenting Your Code Comments are usually used to annotate the program, making it easier for someone to read your program and understand what you have done and why. YOU WILL NOT GET FULL CREDIT IN THIS CLASS IF YOUR CODE ISN’T VERY WELL COMMENTED!

11 Summer 2009 BMTRY 789 Intro. To SAS Programming11 Rows/Columns & Data Types What is the SAS lingo for Rows of Data? What is the SAS lingo for Columns? What are the two types of data? Where do dates fit in?

12 Summer 2009 BMTRY 789 Intro. To SAS Programming12 Rules for SAS names How long (# of characters) can variable names be? What are the two things that can begin a variable name? What can NOT be contained in a variable name? Is SAS case sensitive? When?

13 Summer 2009 BMTRY 789 Intro. To SAS Programming13 Reading the SAS Log Every time you run a SAS job, READ the Log window first! Every time you have a question for me I will ask, “What does you SAS Log say?”.

14 Summer 2009 BMTRY 789 Intro. To SAS Programming14 Let’s go over how to use the SAS Import Wizard to get Excel Data into SAS… Open the Import Wizard Instructions.

15 Summer 2009 BMTRY 789 Intro. To SAS Programming15 Test Your SAS Knowledge Find the class 1 in-class assignment from the class website. http://people.musc.edu/~simpsona/SASclass/Class_Notes.html Use the Excel Data file to complete the questions. For brand new SAS programmers we will do this together. New students to SAS, please do the Practice problems on the websites’ Homework page first.


Download ppt "BMTRY 789 Introduction to SAS Programming Lecturer: Annie N. Simpson, MSc."

Similar presentations


Ads by Google