EXERCISE 1 - ANSWER

Is the variable gender categorical or continuous? Considering this, how would you graph this variable in Stata?

The gender variable is categorical.

A pie graph is a good way to represent this variable with only two valid responses. One first has to generate separate variables for each valid response:

tab gender_n, gen(gendr)

Then to graph using a pie chart, use the following command:

graph gendr1-gendr2, pie

The following graph appears:

 

BACK TO EXERCISE QUESTIONS