Course Overview and downloadable course materials
  • Course Overview
  • Downloadable course materials
Free cloud-based SAS software option for learning: SAS OnDemand for Academics
  • Moving from SAS University Edition to SAS ondemand for Academics
  • Create a SAS account to access SAS ondemand for Academics
  • Upload course data files and SAS programs into SAS ondemand for academics
  • change file path/directory in SAS ondemand for academics
  • examples: update and run SAS programs in SAS ondemand for academics
An Introduction to SAS
  • SAS Introduction
  • Quiz: SAS introduction
Get Data into SAS: create temporary & permanent SAS data
  • Read data delimited by blanks (.txt data file) using list input
  • Read data delimited by commas (.csv data file) using list input
  • Read data delimited by any delimiters using list input
  • Read data in fixed columns using column input
  • Read data using formatted input including using SAS informat to read dates
  • Read data using formatted input: use SAS format to display SAS date values
  • Create internal SAS data using DATALINES statement
  • LIBNAME statement: assign library names and create permanent SAS data sets
  • Proc Import: Import Excel data file into SAS
  • Quiz
  • Coding Exercise 1
  • Coding Exercise 1: Solution
  • Coding Exercise 2
  • Coding Exercise 2: Solution
Work with data
  • Use ASSIGNMENT statements in DATA step & use SET statement to create a SAS data
  • SAS functions: overview
  • Conditionally execute SAS statements: IF-THEN/ELSE, DO and END statements
  • Conditionally execute SAS statements: IF-THEN/ELSE, DO and END statement (Cont.)
  • Subset your Data using subsetting IF statement and DELETE statement
  • Creating One-Dimensional Arrays
  • Quiz
  • Coding Exercise
  • Coding Exercise: Solution
Creating labels and formats
  • Use LABEL statement to add Labels to vars in DATA step & Proc Print Split option
  • Use FORMAT statement to assign Formats to Variables: SAS Built-in Formats
  • Create your User-Defined FORMATS
  • Storing and Referencing/using your User-Defined FORMATS
  • Define the length of a variable using the LENGTH statement
  • Proc format with CNTLIN= option to define custom formats
  • Quiz
  • Coding Exercise 1
  • Coding Exercise 1: Solution
  • Coding Exercise 2
  • Coding Exercise 2: Solution
Use SAS Functions to manipulate character and numeric data values
  • Convert Character & Numeric Value: Auto convert, explicitly PUT & INPUT function
  • SCAN function: Separate a character value and obtain a specified word/string
  • SUBSTR function: Extract and replace a portion of a character value
  • TRIM and CATX functions: Concatenate character values
  • INDEX function: Search a character value for a specified string
  • UPCASE, LOWCASE and PROPCASE functions: Change the case of characters
  • TRANWRD function: Replace/remove characters within a character string
  • INT and ROUND functions: Modifying Numeric Values
  • Quiz
  • Coding Exercise
  • Coding Exercise: Solution
Use SAS Functions to manipulate SAS date values
  • Explanation on how SAS stores date and time values; Usage of MDY function
  • YEAR, QTR, MONTH, DAY, WEEKDAY Functions: Extract year/quarter/month/day values
  • TODAY, DATE, INTCK functions: get current date value & number of time interval
  • DATDIF, YRDIF function: Calculate difference in days and years between two dates
  • Quiz
  • Coding Exercise
  • Coding Exercise: Solution
Process data using DO LOOPS
  • Constructing DO loops: part 1
  • Constructing DO loops: part 2
  • Conditionally Executing DO Loops using DO UNTIL and DO WHILE
  • Using Conditional Clauses with the Iterative DO Statement
  • Quiz
  • Coding Exercise
  • Coding Exercise: Solution
More on ARRAYS
  • Creating Variables in an ARRAY Statement
  • Assigning Initial Values to Arrays & Creating Temporary Array Elements
  • Two dimensional array
  • Quiz
  • Coding Exercise 1
  • Coding Exercise 1: Solution
  • Coding Exercise 2
  • Coding Exercise 2: Solution
Combine SAS data sets
  • One-to-One Merging
  • Concatenating
  • Appending
  • Interleaving
  • Match merging
  • Types of match-merging: merge data sets one-to-one and one-to-many
  • Match Merging: Renaming Variables
  • Match Merging: Excluding Unmatched Observations
  • Match Merging: Selecting Variables
  • Quiz
  • Coding Exercise
  • Coding Exercise: Solution
Reconstruct/Reshape SAS Data sets in DATA step and using Proc TRANSPOSE