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.

Creating flags: Indicator variables

Creating flags: Indicator variables - SAS Tutorial

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

Start my 1-month free trial

Creating flags: Indicator variables

- [Instructor] Hi there. You'll see I've opened code number 135 where we create more grouping variables. This code basically makes the other grouping variables we need to generate according to the data dictionary. This is the code I mentioned at the end of the last movie. We start with a data step incrementing BRFSS_h to BRFSS_i. Then we make MARGRP for martial group, EDGROUP for education, we recode GENHLTH into GENHLTH2, we recode INCOME2 into INCOME3, we create RACEGRP out of _MRACE1, we create EXERANY3 out of EXERANY2, we make HLTHPLN2 from HLTHPLN1, and we recode the BMI category variable. And of course, we check them all with PROC freqs. I'm going to just run this code so we can get onto the next code 140 which is what I really want to talk about. Remember from the prerequisite courses on how to create grouping variables, if it's a categorical variable and you want to include the categories in the regression, you have to make flags or indicator variables? Just to remind you, to…

Contents