From the course: SAS Essential Training: 1 Descriptive Analysis for Healthcare Research

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Removing rows where values are missing

Removing rows where values are missing - SAS Tutorial

From the course: SAS Essential Training: 1 Descriptive Analysis for Healthcare Research

Start my 1-month free trial

Removing rows where values are missing

- [Instructor] So in this movie, I'm going to show you how to use the criterion if missing then exclude. See the code file I have opened? It is called 123_apply Missing Exclusions Example and it is in your exercise files for this movie. First, I'm going to give you an example of how to use a data step to create a data set with no missing values on a certain variable. First, let's go back and run a proc freq on BRFSS_a. That's the original data set we read in before we applied any exclusions. We will add the missing option so we can see how many we're missing originally. But before we run the code, let's right click on the results tab and delete the results from earlier. Remember, we have to click down here to toggle back to our code after doing that. Now, let's highlight this proc freq and run it. Aha! 589 records have a missing value. We can see missing is indicated by the period. Those are the records we want to remove. Let's go back to our code. You will see me here in this data…

Contents