Getting Started with SAS
Introduction to SAS Programs
Submitting a SAS Program
1
Getting Started with SAS
Introduction to SAS Programs
Submitting a SAS Program
2
Objectives
!
!
3
List the components of a SAS program.
State the modes in which you can run a
P6110: Statistical Computing with SAS
Lecture 2: Data Manipulation
Cody Chiuzan, PhD
Department of Biostatistics
Mailman School of Public Health (MSPH)
Review
Lecture 1 covered:
Reading data into SAS
INPUT statement
INFILE statement
IMPORT/EXPORT Wizard
P6110: Statistical Computing with SAS
Lecture 3: Descriptive Statistics
Cody Chiuzan, PhD
Department of Biostatistics
Mailman School of Public Health (MSPH)
Review from Lecture 2
Variable Manipulation (labels, formats/informats, etc.)
IF/THEN Statement
P6110: Statistical Computing with SAS
Lecture 4: SAS Reporting (PROC REPORT, PROC TABULATE)
Cody Chiuzan, PhD
Department of Biostatistics
Mailman School of Public Health (MSPH)
Homework 1
Solutions posted on CourseWorks
Frequent mistakes in homework 1
P6110: Statistical Computing with SAS
Lecture 5: Arrays and Macros
Cody Chiuzan, PhD
Department of Biostatistics
Mailman School of Public Health (MSPH)
Review from Lecture 4
SAS Reporting
PROC REPORT
PROC TABULATE
Your favorite?
Outline
Array process
P6110: Statistical Computing with SAS
Lecture 7: T-tests and their non-parametric equivalents
ANOVA (part 1)
Cody Chiuzan, PhD
Department of Biostatistics
Mailman School of Public Health (MSPH)
Outline
Parametric
T-test (one-, two-sample)
Independent sa
P6110: Statistical Computing with SAS
Lecture 6:Restructuring SAS data sets
Cody Chiuzan, PhD
Department of Biostatistics
Mailman School of Public Health (MSPH)
Review from Lecture 5
Array processing
Modify and create new variables
Re-code missing valu
P6110: Statistical Computing with SAS
Lecture 8: ANOVA and Linear Regression
Cody Chiuzan, PhD
Department of Biostatistics
Mailman School of Public Health (MSPH)
Lecture 7
One-, two-sample t-test
PROC TTEST
Checking normality (PROC UNIVARIATE)
Non-par
P6110: Statistical Computing with SAS
Lecture 9: Chi-squared Test and Logistic Regression
Cody Chiuzan, PhD
Department of Biostatistics
Mailman School of Public Health (MSPH)
Lecture 8
Analysis of Variance (ANOVA)
Model assumptions
One- and two-way ANO
P6110: Statistical Computing with SAS
Fall 2015
Instructor: Cody Chiuzan, PhD
TAs: Eun Oh, Yuexia Mei, Jodi Yiao
Department of Biostatistics
Mailman School of Public Health (MSPH)
Statistical Computing with SAS
Class time: Fridays, 1:00-3:50pm
Location:
Macro Definitions
Defining and Calling a Macro
Macro Parameters
Macro Storage (Self-Study)
1
Macro Definitions
Defining and Calling a Macro
Macro Parameters
Macro Storage (Self-Study)
2
Objectives
3
Define and call a simple macro.
Defining a Macro
A macro
Getting Familiar with
SAS Data Sets
Examining Descriptor and Data Portions
Accessing SAS Data Libraries
Accessing Relational Databases (Self-Study)
1
Getting Familiar with
SAS Data Sets
Examining Descriptor and Data Portions
Accessing SAS Data Libraries
A
Reading SAS Data Sets
Introduction to Reading Data
Using SAS Data as Input
Subsetting Observations and Variables
Adding Permanent Attributes
1
Reading SAS Data Sets
Introduction to Reading Data
Using SAS Data as Input
Subsetting Observations and Variables
Reading Delimited Raw Data Files
Using Standard Delimited Data as Input
Using Nonstandard Delimited Data as Input
1
Reading Delimited Raw Data Files
Using Standard Delimited Data as Input
Using Nonstandard Delimited Data as Input
2
Objectives
!
!
!
3
Use
Other SAS Languages
An Overview of Other Languages
Using the SQL Procedure
The SAS Macro Language
1
Other SAS Languages
An Overview of Other Languages
Using the SQL Procedure
The SAS Macro Language
2
Objectives
!
3
Describe other languages available in SA
Producing Bar Charts
Creating Vertical and Horizontal Bar Charts
Creating Grouped and Subgrouped Bar Charts
Creating Bar-Line Charts
Creating Area Bar Charts (Self-Study)
1
Producing Bar Charts
Creating Vertical and Horizontal Bar Charts
Creating Grouped
Producing Scatter and Line Plots
Creating Scatter Plots
Creating Line Plots
Creating Plots Containing Multiple Lines
Creating Other Types of Plots
with Individual Data Points
Creating Other Types of Plots with Grouped Data
(Self-Study)
1
Producing Scatter
Chapter 4: DATA Step and SQL Interfaces
4.1 Creating Macro Variables in the DATA Step
4.2 Indirect References to Macro Variables
4.3 Retrieving Macro Variables in the DATA Step
(Self-Study)
4.4 Creating Macro Variables in SQL
1
Chapter 4: DATA Step and SQ
P6110: Statistical Computing with SAS
Lecture 11: Power and Sample Size
Cody Chiuzan, PhD
Department of Biostatistics
Mailman School of Public Health (MSPH)
Lecture 10
Survival Analysis: time to event and censoring
Compare groups of survival times
Kapl