Problem Set 2

Author

Stephen B. Holt

Instructions

Begin by downloading the data you will need. We will again be using the Current Population Survey ASEC data like in problem set 1.

  1. Go to IPUMS.
  2. Select only the ASEC samples from 2015-2019 and 2021-2024. You will need to de-select the basic monthly samples and should have 9 samples selected when finished.
  3. Select the following variables:
  1. Under Household -> Core -> Economic Characteristics, select HHINCOME, FOODSTMP, PUBHOUS.
  2. Under Person -> Core -> Demographics, select AGE, SEX, MARST.
  3. Under Person -> Core -> Work, select EMPSTAT, UHRSWORKT.
  4. Under Person -> Core -> Education, select EDUC.
  5. Under Person -> Annual Social and Economic Supplement -> Migration, select MIGRATE1.

This should leave you with an extract of 10 variables across 9 samples.

In this problem set, we are going to graph a few distributions of variables, look at a trend, and, for extra credit, make a few tables. But first, there are a few cleaning tasks you will need to do:

  1. Create a new education variable, starting from EDUC, that uses four categories: Less than a high school diploma, a high school diploma, some college but less than 4-year degree, and 4-year college degree or more.
  2. Create a binary variable for whether someone is employed, whether someone receives food stamps, whether someone is living in public housing, and whether someone moved to a new state in the past-year (MIGRATE1). That’s four new binary variables.
Hint

We have created versions of both the smaller education variable and the employment binary variable in previous labs. While the code might not be exactly the same for these variables - you’ll want to check the categories and codes - the process for doing this is the same. You may also want to check the coding of the continuous variables to account for missings and topcodes properly.

Questions

  1. What is the distribution of educational attainment in the U.S. in our data? Make both a pie chart and a bar graph presenting this distribution.

  2. How does this distribution differ by employment status? Make a bar graph presenting the distribution of education by employment status.

  3. How does average household income differ by educational status? Make a bar graph that presents average earning across educational attainment.

  4. How does educational attainment differ between those who move states and those who do not? Make a bar graph that presents educational attainment by whether someone moved to a different state or did not.

Note

Don’t over think this one - the category of people who did not move out of state can be those who did not move and those who did move in some way but that move was not to a different state. Use the simple binary you created in the setup.

  1. How does the work week look for different levels of educational attainment before and after COVID? Create a bar graph that presents average hours usually worked per week over the categories of educational attainment by pre-covid and post-covid.

  2. What do the trends in migration look like? Create a line graph that presents the percent of people who move to a new state every year for the years in our data.

Extra Credit

  1. What is the difference in the average number of hours worked in a typical week between those in public housing and those not in public housing?

  2. What is the difference in the percentage of people who moved to a different state between those receiving food stamps and those not receiving food stamps?

  3. Create a table with the distribution of educational attainment, average age, average household income, employment status, and average usual hours worked for the full sample, for those not in public housing, and for those in public housing.