Name File Type Size Last Modified
for_instructors.zip application/zip 38.9 KB 03/14/2023 08:34:AM
for_replication.zip application/zip 59 MB 03/14/2023 08:37:AM
for_students.zip application/zip 66.1 KB 03/14/2023 08:34:AM

Project Citation: 

Lundberg, Ian. Class exercise: Predicting income mobility in PSID. Ann Arbor, MI: Inter-university Consortium for Political and Social Research [distributor], 2023-03-14. https://doi.org/10.3886/E185941V2

Project Description

Summary:  View help for Summary This repository contains data for a data science class exercise.

Students: This exercise is about income mobility over three generations: grandparents (g1), parents (g2), and children (g3). Your task is to predict log income in generation 3 using data on log incomes in generations 1 and 2. Additional predictors available include education in each generation, race as reported by the grandparent (g1), and sex of the respondent in g3.

The data you will use are in for_students.zip.
  • learning.csv contains 1,365 observations for which the outcome g3_log_income is recorded
  • holdout_public.csv contains 1,365 observations for which the outcome g3_log_income is NA
Your task is to build a predictive model using learning.csv. Then, make predictions for the cases in holdout_public.csv.

Here are some details about the variables in the data. All cases are from the cross-sectional Survey Research Sample of the PSID. In each generation, we took each respondent's annual income over several surveys from age 30 to 45, adjusted to 2022 dollars, and took the average. We truncated the data to the range from $5,000 to $448,501.10, where the bottom code is arbitrary and the top code is what we believe to be the lowest PSID top code over the series (in 1978), converted to 2022 dollars. Education is the first report at ages 30-45, coded as less than high school, high school, some college, or 4+ years of college. We merged the data together across generations using the PSID Family Identification Mapping System 3-generation prospective linkage file. See for_replication.zip for code to produce these data as well as a log file noting sample restrictions.

We are trusting the students to not open the instructor data, which contains the outcomes you are trying to predict. You could peek of course, but that would be no fun! We are trusting you not to peek.

Instructors: The file for_instructors.zip contains the true holdout outcomes in holdout_private.csv. You can use these to evaluate students' predictive performance (as long as you trust that they have not peeked).

For those replicating: The file for_replication.zip contains the directory structure and code that produced this exercise from raw files downloaded from the PSID.

Scope of Project

Subject Terms:  View help for Subject Terms mobility; income; multigenerational; data science


Related Publications

Published Versions

Export Metadata

Report a Problem

Found a serious problem with the data, such as disclosure risk or copyrighted content? Let us know.

This material is distributed exactly as it arrived from the data depositor. ICPSR has not checked or processed this material. Users should consult the investigator(s) if further information is desired.