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 outcome variables - R Tutorial
From the course: Descriptive Healthcare Analytics in R
Generating outcome variables
- [Instructor] We are going to accomplish two main efforts in this movie. First we are going to clean up our outcome variable for sleep duration. Next we will make sure we have binary variable or flag that is valid for our asthma outcome. Let's start by reviewing our data dictionary. We'll look at our data dictionary but I just wanted to give you an overview on the slide. We need to remove the rows with no information on sleep time and we want to turn our asthma variable into an indicator variable with only ones and zeroes. Now we'll go to our data dictionary. Remember our sleep duration variable? I'm going to show you how to code sleep time 2 which eliminates these unknown records. Technically I don't have to show you how to do this with our project since we kicked out the records with unknown variable in sleep time 1 but it's helpful to see how you would do it if we had not done that. This shows we need to get rid of the 77s and the 99s. Let's also look at the asthma tab while we're…
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.
Contents
-
-
-
-
-
Reading in BRFSS XPT data6m 57s
-
(Locked)
Naming conventions5m 38s
-
(Locked)
Keeping native variables5m 15s
-
(Locked)
Applying the first exclusion6m 3s
-
(Locked)
Applying the rest of the exclusions4m 57s
-
(Locked)
Operations in code3m 52s
-
(Locked)
Making a data reduction diagram4m 35s
-
(Locked)
Generating exposure4m 43s
-
(Locked)
Generating outcome variables3m 32s
-
-
-
-
-