From the course: Introduction to Stata 15

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Manipulating data: Solution

Manipulating data: Solution - Stata Tutorial

From the course: Introduction to Stata 15

Start my 1-month free trial

Manipulating data: Solution

(upbeat music) - [Instructor] Let's have a look at the solution Stata data manipulation challenge. Our first challenge was to create a new variable that identifies all married, non-white women, aged 40 or above. So, let's go ahead and load up the data, and see what we can do. We've loaded the NLSW88 data, so, let's do a quick describe to see what variables we might need for the first challenge, describe. Doing that describe the data shows us that the following variables are likely to be of interest to us, age, race, and married. Let's look at each in turn before we set up our code. So, let's tabulate age. Age looks fairly straightforward. This is a continuous variable so, we just need to ensure that we use the right cut-off point. Now, let's look at race, tabulate race. Okay, so, we have two non-white categories, black and other. However, before we continue, we need to identify the numerical values behind the labels. So, let's tabulate race without labels. Tabulate race, no label. So,…

Contents