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

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…

Contents