 Hi there! Thank you for allowing me, Monica Wahee, to assist you as you proceed along your journey into SAS On Demand for Academics, otherwise known as SAS ODA. In this video, I'm going to show you how to add where criteria to your PROC-FREAK code when you run frequencies in SAS. Okay, here we are in the SAS On Demand for Academics, or SAS ODA, Environment. If you need help setting up your free account in SAS ODA, you can take my free online course with a title that says it all, Getting Started with SAS ODA. I'll link you to it in the description. Okay, so assume you got started with SAS ODA, and now you can open a program window and copy and paste code into it. So, go on to GitHub and get this code and paste it into your program window. Now, this video is about using where criteria with PROC-FREAK. If you don't know how to get this data set we are using into SAS, then you better watch my video on that topic. And if you are unfamiliar with PROC-FREAK, you better watch my video on that topic. I'll link you to those in the description. As in those previous videos, we are working with a data set we read into SAS and named BRFSS underscore A. We use the name BRFSS because the data set contains data from a health survey in the U.S. called the BRFSS. Actually, it just contains data from three states because I had to make the data set small enough to fit into SAS ODA. If you watch my PROC-FREAK video, you'll remember that we ran a frequency on the underscore state variable, and we saw that there were only three values, 12, 25, and 27. So, what's different in this video is we are going to filter by one of these states. In other words, we are going to run a one-way frequency, but this time instead of running it on the state variable, we are going to set criteria on the state variable. So, because we are setting criteria on the state variable, I had to pick a different variable to run our one-way frequency on. I have chosen the variable Diabetes 3, which stands for Diabetes. The respondent can give a bunch of different answers like yes, prediabetes, and yes, but only during pregnancy. So, there's a lot of potential values, but the point of this video is this where statement here. Remember how I said that there were three states, 12, 25, and 27? Well, this where underscore state equals 12 is how we filter by just the records where the state is 12. Oh, and I threw in a little bonus here just for you. I added a title. You can put a title statement in most prox and sass, and it doesn't usually matter where you put it. Like, I could have put it right after the prox freak line. The state of 12 stands for Florida, so that's why I made the title prox freak with Florida only. Okay, let's run all this and see what we get. Okay, this looks a little like what we'd expect. At the top, we see our title printed out prox freak with Florida only, and we see multiple levels of Diabetes 3 in its column, so nothing suspicious here. Let's look at the log file. Okay, this is what really convinces me, what is written in the sass log file? I'll read this aloud. There were 15,242 observations read from the dataset work.brfss underscore a. Okay, but now let's look at the next line. Where underscore state equals 12? Now, if you watched my last video where we ran a one-way frequency on underscore state in this dataset, you'll recognize that the state with code 12 had 15,242 records. So, this is what actually makes me believe our where statement worked, and sass honored our criteria in our frequency procedure. Remember, in sass, the log file has the last word. If you want to get a better understanding of sass, I encourage you to take my free online course in how to use sass on demand for academics. All these lessons are based on my plain-spoken yet eloquent book, Mastering Sass Programming for Data Warehousing. I'll link to these in the description. Thanks for watching and have a transformational day!