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 by continuous criteria

Removing rows by continuous criteria - SAS Tutorial

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

Start my 1-month free trial

Removing rows by continuous criteria

- [Instructor] Please look in your exercise files for the code titled 120_Apply Continuous Exclusions. See here, that's the code I have open. I want you to remember back to the last chapter when we did a proc freq of SLEPTIM1. We did not have any missings, but we did have records coded with both 77 and 99. Only one through 24 are valid entries, because the respondents were asked how many hours they typically sleep in a 24-hour period. 77 and 99 are values that the Codebook says indicate don't know and refuse to answer. Therefore, we'll remove records with 77 and 99. You will see we are reading in BRFSS_E, and reading out BRFSS_F, but you will also see I used a different approach to criteria, than I used before. Since all the values below 77 in SLEPTIM1 are valid, I just used the less than operator in this if statement. This code will result in the records in the dataset BRFSS_F all having values in SLEPTIM1 that are less than 77. Let's highlight this code, run it, and then look at the…

Contents