EXERCISE 1 - ANSWER

How many households are in the sadlru12 data file?

Answer: 1062

The first step is to determine what variable uniquely identifies each household. There are several ways to go about this. One possibility is to use the command lookfor to see if any variable names and/or variable labels contain the text "household".

lookfor household

The above command displays several variable names with their corresponding labels in the STATA Results window. From the labels it becomes clear that the variable hhid is the variable needed as it is the "household identification number". We can confirm this by using the SALDRU survey. To obtain the number of unique hhid values, we use the command codebook:

codebook hhid

This command displays the number of unique hhid values (1062), along with other useful information including the variable label and the number of missing values.

 

BACK TO EXERCISE QUESTIONS