From the course: Introduction to Stata
Unlock the full course today
Join today to access over 24,600 courses taught by industry experts.
Recoding an existing variable - Stata Tutorial
From the course: Introduction to Stata
Recoding an existing variable
- [Instructor] In this chapter we'll explore how to manipulate data in Stata. Data manipulation and data management are probably the key skill that new users to any statistical software should concentrate on. Proficiency in data manipulation reduces output mistakes, and you'll also find that once you gain proficiency in data management, other operations, such as visualization or statistical analysis, become much easier to perform. So in this session, we're going to explore how we can recode existing numerical variables. Specifically, we're going to introduce the recode command, which will help us recode existing variables very quickly. So let's head over to Stata. Here we are with the auto data already open. Let's take a closer look at the variable rep78. Let's tabulate it. Tabulate rep78. We see that this variable consists of five categories, one, two, three, four, five. But two of the categories, categories one…
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
-
-
-
-
-
(Locked)
Recoding an existing variable4m 3s
-
(Locked)
Generating a new variable5m 15s
-
(Locked)
Naming and labeling variables5m 20s
-
(Locked)
Extended generate3m 26s
-
(Locked)
Indicator variables4m 6s
-
(Locked)
Keeping and dropping variables3m 8s
-
(Locked)
Saving data3m 6s
-
(Locked)
Merging and appending6m 54s
-
(Locked)
String variables5m 53s
-
(Locked)
Local macros and looping7m 12s
-
(Locked)
Manipulating data: Challenge45s
-
(Locked)
Manipulating data: Solution4m 6s
-
(Locked)
-
-
-
-
-
-
-