Lutz Hendricks. UNC. Department of Economics

Tips for Using IPUMS (USA or International) Files

This describes my method for working with IPUMS data. Other methods may work just as well.

Importing Data

  1. Make a list of the variables you need. Always include household and person number, so that each person is uniquely identified.
  2. I usually leave filtering observations for later. This way, the data can be reused for other projects.
  3. Create an extract (see IPUMS website). Download it. The extract comes as an undelimited text file with SAS and SPSS programs to load it.
  4. Modify the SPSS (or SAS) program so it can load the file (change the path to the "dat" file in the first line). Run the program to load the file into SPSS.
  5. Write a program that breaks the file into variables. For each variable you need a SAVE TRANSLATE statement. Now you have a set of files such age "age.txt" One for each variable. Each row is a person.

Filter and Import into Matlab

  1. In Matlab: Loop over the variables and import each into a "mat" file. This is simply a load/save operation.
  2. Start with variables used for preliminary filtering. Create a variable that is 1 for persons passing the filter and 0 otherwise.
  3. Then loop over all variables and import those passing the filter. Save them as numbered variables.
  4. Write a recode function for each variable. At least you want consistent missing value and topcoding codes.
Tip: Read a book on good programming practices before you start. I like "Writing Solid Code."