Course Description
The starting point for anyone interested in becoming a SAS Programmer/Analyst is to understand SAS Base Programming. Courses to learn SAS Base Programming can cost thousands of dollars. I believe learning should be more affordable.
After you complete the course, you will be comfortable to import raw data files, manipulate data, combine SAS data sets, create summary reports, perform statistical tests, utilize the common SAS functions, learn how to clean and reduce your data, and finally learn programming logic.
Test yourself by completing two comprehensive assignments after the Functions Module. They will test your ability to integrate the skills that you have learned. Please ensure that you watch the instruction videos first before attempting the assignments. Download any data sets from the google drive (available in pdf in 1st module)
What am I going to get from this course?
1. Apply beginner to intermediate SAS skills.
2. How to import different data files
3. How to work with data, including merge, filter observations, sort observations, clean and reduce your data, read dates, subset data, utilize conditional logic, and more.
4. Apply the most commonly utilized SAS functions (RAND, LENGTH,TRIM, COMPRESS, and more).
5. Learn all about Arrays and where it makes sense to apply them.
6. Apply informats and formats.
7. Ability to integrate many of the individual concepts through the final project: a case study.
Prerequisites and Target Audience
What will students need to know or do before starting this course?
No software is necessary, however, if you want to follow along, instructions on how to obtain particular software will be provided. We do not endorse any specific software. This specific course was made with a commercial license from WPS.
Who should take this course? Who should not?
Beginners to SAS programming or programming in general.
Individuals wanting to learn SAS Base Programming.
Individuals preparing for SAS Base certification.
Individuals who work for large enterprises, or want to in the future, and are interested in data analysis/data science.
Curriculum
Lecture 1
Installing the Software of Your Choice
If you want to follow along with me (which I would suggest), there are a few different software options out there. The google drive link is clickable in the pdf. Make sure to check out the pdf.
Lecture 2
Importing a .txt file
In this video, you will learn how to import any .txt file. Importing these types of files is a bit easier than a .csv (which I cover a bit later).
Lecture 3
Importing .csv files
Here I show you how to import .csv files.
Lecture 4
Permanently Saving Files
Usually, SAS will save your work in a work library. The work library is where SAS stores your files temporarily. If you're interested in saving it permanently, this lesson is for you.
Lecture 5
Importing SPSS file to SAS
I show you how to import SPSS files.
Module 2: Working With Data
What if your data file is not separated by a blank space? What if it is separated by a dot (.) or |. I'll explain SAS default delimiters, and how to deal with such a problem!
Lecture 7
Reading Data Instream
Sometimes you want to just type your data directly in the syntax. This is logical if you have very little data, and if there is no need to import a file to SAS. I show you how to do it.
Lecture 8
Creating Variables/Calculations
Here I show you how to create new variables with the current data that you have. Often new variables utilize current variables, so calculations are often required.
SAS is not great at dealing with data that has dates, and by default it does not present them properly, I will show you what is required to deal with this.
Lecture 10
More on Creating New Variables
I talk more about how to go about creating new variables.
Lecture 11
Filtering Observations
Sometimes you only want certain part of your data set to show up. I'll show you how this is possible in SAS. If you are in the real estate business, maybe the boss asks you to show him list of only the homes that cost more than 250k.
Lecture 12
WHERE Expression/Statement
One of the ways to subset data is to use the WHERE Expression.
Lecture 13
If-then Conditional Logic
i discuss if-then conditional logic in SAS programming.
Lecture 14
Sorting Observations
I show you two new statements..proc sort and by statements. This will inform you how to sort your data.
Lecture 15
Merging Two Data Sets
I'll show you how you can merge data from two different .txt files. It is super simple to do in SAS.
Lecture 16
Data Reduction and Cleaning Your Data
First, I show you how to use the keep and drop statements in SAS. If you want to reduce your data by keeping or getting rid of certain variables, I'll take you step by step to show you how. Then I show you the rename and label statements that help make your data more "clean". This includes renaming your original variables and labeling those variables.
Lecture 17
Length statement
I discuss the length statement.
Lecture 18
Creating a Counting Variable
Creating an enumeration or counting variable is common with survey data!
Quiz 2
Working With Data Quiz
Module 3: Informats and Formats And Review of Input Types
Note 1
Informats and Formats
In this article style lesson, I write a bit about Informats and Formats!
Welcome to this lecture. I thought I'd change it up a bit and give you an article lecture on input types.
Lecture 20
User Defined Formats
In this lesson, I'm going to show you how to create or define your OWN formats. This is often neccesary, but it does not have to be difficult to understand!
Quiz 3
Formats, Informats, Input Style Quiz
Formats, Informats, Input Style Quiz
Module 4: Common SAS Functions
I show you how to use the rand function. This function allows you to produce a sample (random numbers) with a distribution of your choosing.
Lecture 22
LENGTH Related Functions
If you work with large data sets (lots of columns/rows), this lesson will be very useful. Learn about LENGTH, LENGTHC, and LENGTHN functions.
The TRIM function copies your argument(or parameter), and gets rid of trailing blanks(space).
Lecture 24
Compress Function (Article Lesson)
I discuss the compress function.
Lecture 25
Input and Put Functions
If you want to convert your character variable to a numeric one (ie so you can do analysis on that variable), you have to use the INPUT function. If you want to change a numeric variable to a character one, you have to use the PUT function.
CATX function will remove both leading and trailing blanks, insert a delimiter (or separator), and return a concatenated (merged) character string.
Do you want to only return the 2nd word (John) from a variable that is storing the concacated full name of an individual ie Fisher, John. Well now you can!
Lecture 28
Coalesce Function
The Coalesce function will return the first value that is NOT MISSING from a list of numeric arguments. I use an example where you store someone's home phone number and cell #. It's a good example as it is normal to sometimes have home number but no cell # contact, and the other way around. Well, if there is a value to return, ie at least a home number or cell are present, it will return that available number for you.
Lecture 29
VERIFY Function
The VERIFY function is super useful for data cleaning purposes (ie picking up errors) in a data set. I'll show you one way to use it!
Lecture 30
SUBSTR Function
I show you how to use the SUBSTR function, both the right application of it (which allows you to extract a substring) and the left application (which is useful for replacing character value contents).
Lecture 31
Arrays 1 (Recoding Variables)
Recoding variables can be time consuming if you go variable by variable..let me show you an easier way! We utilize the do end loop.
Lecture 32
Arrays 2 (Constructing New Variables)
Constructing new variables manually is a tedious process when you have many variables that you are working with..let me teach you a simpler way.
Assignment 1. You will be able to test how well you integrate the skills you have learned. Please watch the introduction to the assignment, this is critical.
Lecture 34
Assignment 1 Solution
Have a look at the solution once you have tried on your own.
Test if you are a SAS ninja, and if you can integrate the individual skills you have learned.
Lecture 36
Assignment 2 Solution
Here is the solution for Assignment # 2.
Module 7: Visual Representation of Data
I show you the ease at which you can create a scatter plot with SAS.
The software you are using for this course may not able to perform the graphs I will show you. Nevertheless, I show you which graphs other than a scatter plot that you can do. Your place of employment will certainly have it.
Module 8: Performing Common Statistical Tests with SAS
Lecture 39
Independent t-test
Independent samples t-test is one of the more common tests that businesses and corporations do for their data analysis! I'll show you how to to run this test on SAS.
Lecture 40
Chi-Square Test of Independence
Here I show you how to perform a chi-square independent groups analysis using SAS.
Module 9: Intro to Macro Programming Basics
Lecture 41
Handout for Macro Section
The code for the next two lessons.
Lecture 42
Creating A Macro Variable
Learning how to create a macro variable can speed up your coding, by making it easier to modify your data.
Lecture 43
Creating A Macro
Learning how to create a macro can give you great flexibility, and help finish your coding much quicker. Time=money.
Module 10: Health Care Case Study
Lecture 44
Important Note Before You Begin
Please read before you watch the case study.
Lecture 45
Case Study Part 1
This is part 1 of the case study.
Lecture 46
Case Study Part 2
Part 2 of the case study.
Lecture 47
Full Code for Case Study
Here is the full code for the case study as it is sort of long.