Biostatistical Methods II PubH 6415 Spring 2007. 2 PubH 6415 – Biostatistics I Instructor: Susan Telke (office hours: lecture.

Slides:



Advertisements
Similar presentations
Statistical Methods Lynne Stokes Department of Statistical Science Lecture 7: Introduction to SAS Programming Language.
Advertisements

Slide C.1 SAS MathematicalMarketing Appendix C: SAS Software Uses of SAS  CRM  datamining  data warehousing  linear programming  forecasting  econometrics.
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.
C Programming for engineers Teaching assistant: Ben Sandbank Home page:
I OWA S TATE U NIVERSITY Department of Animal Science Getting Started Using SAS Software Animal Science 500 Lecture No. 2.
Introduction to CS170. CS170 has multiple sections Each section has its own class websites URLs for different sections: Section 000:
Public Health 5415 Biostatistical Methods II Spring 2005 Greg Grandits Class Times Monday10:10am-12:05pm Wednesday10:10am-11:00am.
Today: Run SAS programs on Saturn (UNIX tutorial) Runs SAS programs on the PC.
Categorical Data Analysis using SAS. 2 List the components of a SAS program. Open an existing SAS program and run it. Discuss the Chi Square Test of Independence.
SAS ® Regression Essentials. 2 List the components of a SAS program. Open an existing SAS program and run it. Objectives.
NonParametric Statistics using SAS. 2 List the components of a SAS program. Open an existing SAS program and run it. Objectives.
Quantitative Research Methods for Information Systems and Management (Info 271B) Course Introduction: Preface to Social Research and Quantitative Methods.
Welcome to the Exciting World of ! Lessons to familiarize yourself with.
1 SAS SAS is a statistics software package developed by SAS Institute Inc. in U.S.A. SAS products include SAS/STAT, SAS/IML, SAS/OR, etc. The most.
SAS for Categorical Data Copyright © 2004 Leland Stanford Junior University. All rights reserved. Warning: This presentation is protected by copyright.
EPLS Lab Software Orientation SAS. Orientation Overview Background Getting Started SAS Windows.
SAS ® ANOVA Essentials. 2 List the components of a SAS program. Open an existing SAS program and run it. Objectives.
Introduction To Correlation with SAS Sam Gordji Weir 107.
Data Preparation for Analytics Using SAS Gerhard Svolba, Ph.D. Reviewed by Madera Ebby, Ph.D.
Welcome to SAS…Session..!. What is SAS..! A Complete programming language with report formatting with statistical and mathematical capabilities.
Collection and Analysis of Data CPH 608 Spring 2015.
Topic 1: Class Logistics. Outline Class Web site Class policies Overview References Software Background Reading.
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.
SAS: The last of the great mainframe stats packages STA431 Winter/Spring 2015.
CIS162AD: C#.Net Programming Level I Instructor: Gary R. Smith, MS.
Introduction to SAS BIO 226 – Spring Outline Windows and common rules Getting the data –The PRINT and CONTENT Procedures Manipulating the data.
1 Experimental Statistics - week 4 Chapter 8: 1-factor ANOVA models Using SAS.
1 Agenda Administration Background Our first C program Working environment Exercise Memory and Variables.
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 Experimental Statistics - week 2 Review: 2-sample t-tests paired t-tests Thursday: Meet in 15 Clements!! Bring Cody and Smith book.
Math 3400 Computer Applications of Statistics Lecture 1 Introduction and SAS Overview.
SAS Macro: Some Tips for Debugging Stat St. Paul’s Hospital April 2, 2007.
SAS 介绍和举例 Presented by 经济实验教学中心 商务数据挖掘中心. Raw Data Read in Data Process Data (Create new variables) Output Data (Create SAS Dataset) Analyze Data Using.
BMTRY 789 Introduction to SAS Programming Lecturer: Annie N. Simpson, MSc.
1 Midterm Review. 2 Midterm Exam  30% of your grade for the course  October14 at the regular class time  No makeup exam or alternate times  Closed.
Chapter 1: Introduction to SAS  SAS programs: A sequence of statements in a particular order  Rules for SAS statements: –Every SAS statement ends in.
Welcome to CS 115! Introduction to Programming. Class URL Write this down!
An Interdisciplinary Approach in Statistics Courses for Biology Students Ramon Gomez Senior Instructor Dept. of Math & Statistics Florida International.
Lesson 2 Topic - Reading in data Chapter 2 (Little SAS Book)
CT 1503 Network Operating Systems Instructor: Dr. Najla Al-Nabhan 2014.
ISU Basic SAS commands Laboratory No. 1 Computer Techniques for Biological Research Animal Science 500 Ken Stalder, Professor Department of Animal Science.
SAS: The last of the great mainframe stats packages STA431 Winter/Spring 2013.
Today - Messages Additional shared lab hours in A-269 –M, W, F 2:30-4:25 –T, Th 4:00-5:15 First priority is for PH5452. No TA or instructor Handouts –
1 EPIB 698E Lecture 1 Notes Instructor: Raul Cruz 7/9/13.
STAT 3130 Statistical Methods I Lecture 1 Introduction.
Lesson 6 - Topics Reading SAS datasets Subsetting SAS datasets Merging SAS datasets.
1 Experimental Statistics - week 14 Multiple Regression – miscellaneous topics.
Introduction to Correlation & Regression with SAS Sam Gordji Weir 107.
Chapter 1: Overview of SAS System Basic Concepts of SAS System.
Ma123: Fall 2002 Sections Dr. Paul Eakin:Instructor Kyle McCormick:Recitation Leader ( ) Zhiqiang.
Lecture 4 Ways to get data into SAS Some practice programming
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.
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.
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.
Based on Learning SAS by Example: A Programmer’s Guide Chapters 1 & 2
Online Programming| Online Training| Real Time Projects | Certifications |Online Classes| Corporate Training |Jobs| CONTACT US: STANSYS SOFTWARE SOLUTIONS.
Lecture 11 Introduction to R and Accessing USGS Data from Web Services Jeffery S. Horsburgh Hydroinformatics Fall 2013 This work was funded by National.
PROBLEM SOLVING AND PROGRAMMING ISMAIL ABUMUHFOUZ | CS 170.
SAS ® 101 Based on Learning SAS by Example: A Programmer’s Guide Chapters 16 & 17 By Tasha Chapman, Oregon Health Authority.
Applied Business Forecasting and Regression Analysis
PubH 6420 Introduction to SAS Programming
SAS Programming Training
SAS Programming Training
Introduction to DATA Step Programming: SAS Basics II
SAS Programming Training
Accelerated Introduction to Computer Science
Presentation transcript:

Biostatistical Methods II PubH 6415 Spring 2007

2 PubH 6415 – Biostatistics I Instructor: Susan Telke (office hours: lecture hall or by appointment, location -A349 Mayo building) Teaching Assistant: Fang Liu– Katie Schomaker –

3 Books for 6415 Text Book: Introductory Biostatistics-(Chap T. Le) –Wiley SAS Books (highly recommended): The Little SAS Book – Delwiche and Slaughter Applied Statistics and the SAS Programming Language – Cody and Smith

4 Web Page Information on the web: 1. General class information 2. Syllabus 3. Course notes (updated weekly) 4. Homework 5. Computer Help- How to access SAS! 6. In Class Data Sets – More SAS examples

5 Computer Labs Mayo D199 (Classroom & Lab) Mayo D199 (Classroom & Lab) Teaching Assistant will have lab sessions in this classroom before and after Wednesday’s class. Deihl Hall (Medical Library) Deihl Hall (Medical Library) Coffman Union Coffman Union Carlson School of Management Carlson School of Management School of Public Health Lounge (Mayo) School of Public Health Lounge (Mayo)

6 SAS Primary computing environment will be PC SAS PC SAS can be purchased at the bookstore (one year agreement is about $150). PC SAS can be purchased at the bookstore (one year agreement is about $150). OR SAS (not PC SAS) is available using the UNIX version of SAS by SSH to the biostat workstation saturn. Instructions for use on course website. SAS (not PC SAS) is available using the UNIX version of SAS by SSH to the biostat workstation saturn. Instructions for use on course website.

7 Exams and Homework There will be weekly homework assignments There will be weekly homework assignments There will be two midterms and one final exam. There will be two midterms and one final exam. The midterms account for 25% each and the final accounts for 30% of the course grade. The remaining 20% is based on homework (best 10) The midterms account for 25% each and the final accounts for 30% of the course grade. The remaining 20% is based on homework (best 10)

8 Course objectives: Write and run simple SAS programs to perform common analyses. Write and run simple SAS programs to perform common analyses. Analyze health science data using basic statistical and inferential techniques. Analyze health science data using basic statistical and inferential techniques. Understand statistical methods as commonly presented in public health literature Understand statistical methods as commonly presented in public health literature

9 Topics Covered T-tests (review) T-tests (review) One Factor ANOVA/ Two Factor ANOVA One Factor ANOVA/ Two Factor ANOVA Linear regression Linear regression Logistic regression (plus Poisson) Logistic regression (plus Poisson) Survival analyses Survival analyses Proportional Hazards Proportional Hazards Sample Size Determination (If time allows) Sample Size Determination (If time allows) SAS programming to do above analyses

10 SAS Usage SAS is the worlds largest privately held software company SAS is the worlds largest privately held software company 40,000 customer sites worldwide 40,000 customer sites worldwide 3.5 million users worldwide 3.5 million users worldwide 90% of Fortune 500 companies use SAS 90% of Fortune 500 companies use SAS Nearly all analyses of publications in medical research use SAS Nearly all analyses of publications in medical research use SAS SAS invests extensive resources to R & D. SAS invests extensive resources to R & D.

11 What is SAS ? SAS is a programming language that reads, processes, and performs statistical analyses of data. SAS is a programming language that reads, processes, and performs statistical analyses of data. A SAS program is made up of programming statements which SAS interprets to do the above functions. A SAS program is made up of programming statements which SAS interprets to do the above functions.

12 Raw Data Read in Data Process Data (Create new variables) Output Data (Create SAS Dataset) Analyze Data Using Statistical Procedures Data Step PROCs

13 Structure of Data Made up of rows and columns Made up of rows and columns Rows in SAS are called observations Rows in SAS are called observations Columns in SAS are called variables Columns in SAS are called variables An observation is all the information for one entity (patient, patient visit, clinical center, county) SAS processes data one observation at a time

14 Example of Data 12 observations and 5 variables F 23 S 15 MN F 21 S 15 WI F 22 S 09 MN F 35 M 02 MN F 22 M 13 MN F 25 S 13 WI M 20 S 13 MN M 26 M 15 WI M 27 S 05 MN M 23 S 14 IA M 21 S 14 MN M 29 M 15 MN Gender Age Marital status Number of credits State of residence

* This is a short example program to demonstrate what a SAS program looks like. This is a comment statement because it begins with a * and ends with a semi-colon ; DATA demo; INPUT gender $ age marstat $ credits state $ ; if credits > 12 then fulltime = 'Y'; else fulltime = 'N'; if state = 'MN' then resid = 'Y'; else resid = 'N'; DATALINES; F 23 S 15 MN F 21 S 15 WI F 22 S 09 MN F 35 M 02 MN F 22 M 13 MN F 25 S 13 WI M 20 S 13 MN M 26 M 15 WI M 27 S 05 MN M 23 S 14 IA M 21 S 14 MN M 29 M 15 MN ; RUN; TITLE 'Running the Example Program'; PROC PRINT DATA=DEMO ; VAR gender age marstat credits fulltime state ; RUN;

16 Rules for SAS Statements and Variables SAS statements end with a semicolon (;) SAS statements end with a semicolon (;) SAS statements can be entered in lower or uppercase SAS statements can be entered in lower or uppercase Multiple SAS statements can appear on one line Multiple SAS statements can appear on one line A SAS statement can use multiple lines A SAS statement can use multiple lines Variable names can be from 1-32 characters and begin with A-Z or an underscore (_) Variable names can be from 1-32 characters and begin with A-Z or an underscore (_)

DATA demo; Create a SAS dataset called demo INPUT gender $ What are the variables age marstat $ credits state $ ; if credits > 12 then fulltime = 'Y'; else fulltime = 'N'; if state = 'MN' then resid = 'Y'; else resid = 'N'; Last two Statements create 2 new variables(fulltime and state -Character)

DATALINES; Tells SAS the data is coming F 23 S 15 MN F 21 S 15 WI F 22 S 09 MN F 35 M 02 MN F 22 M 13 MN F 25 S 13 WI M 20 S 13 MN M 26 M 15 WI M 27 S 05 MN M 23 S 14 IA M 21 S 14 MN M 29 M 15 MN ; Tells SAS the data is ending RUN; Tells SAS to run the statements

19 Types of Data Numeric (e.g. age, blood pressure) Numeric (e.g. age, blood pressure) Character (patient name, ID, diagnosis) Character (patient name, ID, diagnosis) Each type treated differently by SAS

TITLE 'Running the Example Program'; PROC PRINT DATA=demo ; VAR gender age marstat credits fulltime state ; RUN; * You can run additional procedures; PROC MEANS DATA=demo ; VAR age credits ; RUN; PROC FREQ DATA=demo ; TABLES gender ; RUN;

21 Files Generated When SAS Program is Submitted Log file – a text file listing program statements processed and giving notes, warnings and errors. Log file – a text file listing program statements processed and giving notes, warnings and errors. (in UNIX the file will be named filename.log) Always look at the log file ! Tells how SAS understood your program Output file – a text file giving the output generated from the PROCs Output file – a text file giving the output generated from the PROCs (in UNIX the file will be named filename.lst)

22 Messages in SAS Log Notes – messages that may or may not be important Notes – messages that may or may not be important Warnings – messages that are usually important Warnings – messages that are usually important Errors – fatal in that program will abort Errors – fatal in that program will abort (notes and warnings will not abort your program)

LOG FILE NOTE: Copyright (c) by SAS Institute Inc., Cary, NC, USA. NOTE: SAS (r) Proprietary Software Release 8.2 (TS2M0) Licensed to UNIVERSITY OF MINNESOTA, Site NOTE: This session is executing on the WIN_NT platform. NOTE: SAS initialization used: real time 7.51 seconds cpu time 0.89 seconds 1 * This is a short example program to demonstrate what a 2 SAS program looks like. This is a comment statement because 3 it begins with a * and ends with a semi-colon ; 4 5 DATA demo; 6 INFILE DATALINES; 7 INPUT gender $ age marstat $ credits state $ ; 8 9 if credits > 12 then fulltime = 'Y'; else fulltime = 'N'; 10 if state = 'MN' then resid = 'Y'; else resid = 'N'; 11 DATALINES; NOTE: The data set WORK.DEMO has 12 observations and 7 variables. NOTE: DATA statement used: real time 0.38 seconds cpu time 0.06 seconds

25 RUN; 26 TITLE 'Running the Example Program'; 27 PROC PRINT DATA=demo ; 28 VAR gender age marstat credits fulltime state ; 29 RUN; NOTE: There were 12 observations read from the data set WORK.DEMO. NOTE: PROCEDURE PRINT used: real time 0.19 seconds cpu time 0.02 seconds 30 PROC MEANS DATA=demo N SUM MEAN; 31 VAR age credits ; 32 RUN; NOTE: There were 12 observations read from the data set WORK.DEMO. NOTE: PROCEDURE MEANS used: real time 0.25 seconds cpu time 0.03 seconds 33 PROC FREQ DATA=demo; TABLES gender; 34 RUN; NOTE: There were 12 observations read from the data set WORK.DEMO. NOTE: PROCEDURE FREQ used: real time 0.15 seconds cpu time 0.03 seconds