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.

Recoding into quartiles

Recoding into quartiles - SAS Tutorial

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

Start my 1-month free trial

Recoding into quartiles

- In this movie we are going to categorize a continuous variable into quartiles. You'll see I have opened exercise file 425_Quartiles. Let's keep working with the big initial data set, BRFSS_a. Remember the variable for age continuous in BRFSS_a, which is called _AGE80? Let's first run a proc univariate on that variable and decide if cutting it into quartiles is a good idea. Let's highlight and run. Alright, we have our quantiles table in our output here. Remember when we looked at this variable earlier in the course? We saw that it was truncated at AGE80. Here is quartile 3, AGE69. The median is AGE58. And here is quartile 1, AGE44. Theoretically, if you needed to automate what we are about to do you could output this quantiles table into the ODS and then query that table for the cut-points. But to simplify, I just wrote these cut-points down and then made code based on them. Let's go back to our cope. See? I put these results into the comments. Now, I'm going to do a data step to…

Contents