 Hi there. Thank you for including me, Monica Wahee, in your journey as you learn to use SAS On Demand for Academics, otherwise known as SAS ODA. In this video, I'm going to show you how to run frequencies on a categorical variable in SAS ODA using PROC FREAK. 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 called Apli, 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 you should probably watch my other YouTube video where I put our SAS dataset into the SAS ODA instance. So you understand this LibNate statement up here and the data and set statements. So our data and code are on GitHub and in the last video we ran this top code. This code read in a SAS dataset that we named BRFSS underscore A. This is just an excerpt of data from the Behavioral Risk Factor Surveillance System or BRFSS Survey. It's a national health survey in the United States, so they keep track of what state people are in who take the survey. And that's the variable we are running a one-way frequency on using SAS PROC FREAK. See this PROC FREAK code down here? There are just three lines of this PROC FREAK code, so let's look at them. We start by declaring the PROC. PROC FREAK. And then we declare the dataset by saying data equals BRFSS underscore A. That's the one we just read in above. Then a semicolon. Next we get to the table statement. Here you can do a one-way frequency or a two-way frequency. We are just doing a one-way frequency by the state variable here. If you wanted a two-way frequency you would have to put two variables here and separate them with an asterisk. And you can even do a three-way frequency, but the output gets messy. I want to point out the slash here. In most SAS PROCs there are a lot of options you can set. The trick is that some gets set up at the line where you call the PROC, like data equals BRFSS underscore A, and some gets set on a different line. In PROC FREAK you can make SAS include the missing as a categorical level if you use the missing option after the tables command like I did here. There are many other options for PROC FREAK you can put on this line. I admit missing is my favorite. I really think it should be the default setting. But anyway, I digress. All right, let's run this puppy and see what happens. Since I just ran the code above and my data set is still in SAS ODA's brain, I'll just highlight the PROC FREAK code and run that. See the results of the PROC FREAK output? You will see I just included three states in this data set. That's because SAS ODA won't allow you to upload really big data sets. But still, this one is not really small because it has over 30,000 rows in it. See under the frequency columns? We know there are no missings in here because the only values we have for underscore state are 12, 25, and 27. If there were any missings, they would have shown up on their own line as having a period. Before we leave here, let's look at the log file. There were 38,901 observations read from the data set work.brfss underscore a. Procedure freak used. Music to my ears. No errors. You like it when SAS says stuff like this to you. Hey, if you always want SAS to whisper sweet nothings to you in its log files, take my free online course and how to use SAS on demand for academics. All these lessons are based on my philosophical yet pragmatic book, Mastering SAS Programming for Data Warehousing. I'll link to these in the description. Thanks for watching and have a marvelous day.