From the course: Descriptive Healthcare Analytics in R
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Generating the age variables - R Tutorial
From the course: Descriptive Healthcare Analytics in R
Generating the age variables
- [Instructor] We are going to start with generating the age variables we need for our descriptive analysis. Remember how we set up our data dictionary? Remember all those variables we decided to make? Now, in this chapter we will go through the data dictionary and make all those variables. We will start in this session with the age variable. Where I will start by showing you how to refer to your data dictionary about the age variables. This time we don't need a grouping variable. But we do need a bunch of indicator variables. This is part of why we designed the variables and put them in the data dictionary, to make coding easier. Looking at that while we formulate the code, will prevent us from making mistakes with our code. Let's go over to the age tab in our data dictionary for guidance. Age was complete in BRFSS so we don't need to make an age grouping variable. We can just use X age to G as our grouping variable. But we need to make all these indicator variables we can use in our…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.