DAY 2 QUESTIONS

 

Reminder: Use help for any command you need assistance with throughout the workshop, or feel free to ask one of us for assistance.

NOTE: Be sure to create a log file for the following exercises.  Please name the file hw2.

1.  How do you find the number of observations in the saldru12.dta data set? How many are there?

 

 

 

 

2.  How many variables are in this data set?

 

 

 

 

 

3.  What would be a quick and easy way to find variables related to farming?

 

 

 

 

 

4.  What is the gender, race and hhid of the individual labeled as observation 2004? Now, sort the data set by race, hhid and pcode.  What is the gender, race and hhid of the individual labeled as observation 2004?

 

 

 

 

 

5.  Report the household identification number for all households with an individual who is 84 years of age.

 

 

 

 

 

6a.  For household 27001 find the total monthly income, number of members in the household, as well as age, race, relationship to head and gender for household members.  Identify which of these variables is a household level variable or an individual level variable and be sure to include your reasoning.  

 

 

 

 

 

6b. Is <incmon> a household level or an individual level variable? Why? Provide evidence for your answer.  (Hint: you may want to use the sort command to aid in answering this question.)

 

 

 

 

 

7.  What are the different types of subsidies that employees provide workers?  Create a variable that measures the total value of subsidies received from the employer.  Please label this new variable appropriately.   Refer to the survey instrument when answering this question.

 

 

 

 

 

8. In this question you will create a new variable and recode it so that the variable describes the following levels of educational attainment: none, pre-school, primary education, secondary education, college.  You will need to use the survey instrument for this question.  Please label this variable “educational attainment.”  Please code existing educ_c values as follows with your new variable:

0,19 as -- 0  (none)

17, 18 as -- 1 (pre-school)                  

1,2,3,4,5,6,7 as -- 2 (primary education- before Junior certificate)

8, 9, 10, 11 as -- 3 (secondary education – before Senior certificate)

12, 13, 14, 15 as -- 4 (some college)

16 as -- 5 (college)

 

 

 

 

 

9. Generate a new variable equal to 1 for all females in the sample who are between the ages of 18 and 35 and are white.

 

 

 

 

 

BACK