EXERCISE 3 - ANSWER

How old is the oldest person in the data set?

The oldest person in the saldru12 data set is 93 years old. To obtain the answer to question 3, you could have used the following commands:

lookfor age
codebook age

First, to obtain a list of variables that were related to age we used the lookfor command. Browsing the list of variables the command produces, you will see that the variable age is the respondent's "recorded age in years". This is the variable we want. Then to find the largest value for the variable age, we use the command codebook. From the output in the Stata Results window you see that the codebook command provides a range for the variable specified, in this case age. From this, we know the smallest value for the variable age in the data set is 0 and the largest value is 93. The table will look like the following:

age --------------------------------------- recoded age in years*
type: numeric (byte)

        range: [0,93]                  units: 1
unique values: 91              coded missing: 196 / 5284

mean: 24.2408
std. dev: 18.5273

percentiles: 10%   25%   50%   75%   90%
              3    10    20    35    52

 

BACK TO EXERCISE QUESTIONS