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 - SAS Tutorial
From the course: SAS Essential Training: 1 Descriptive Analysis for Healthcare Research
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…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
(Locked)
Alternatives to labels and formats4m 11s
-
(Locked)
Using PROC FREQ to prepare5m 5s
-
Removing rows by categorical criteria6m 21s
-
(Locked)
Removing rows by continuous criteria4m 38s
-
(Locked)
Removing rows where values are missing6m 38s
-
(Locked)
Observations from the log file6m
-
(Locked)
Updating data reduction documentation5m 36s
-
(Locked)
-
-
-
-
-
-
-