General Instructions for Opening an Extract on Your PC
The IPUMS extract system does not provide data in the format of any particular statistics package. Instead, we provide compressed data files and the command files necessary for reading the raw data into SPSS, Stata, and SAS.
Step 1: Download the data and command files
On the Download or Revise Extracts page, you will see your extract requests along with the creation date, optional description, and five links on the right side of the page: data, codebook, SPSS, SAS, STATA.
Download the data file and the command file. To get the data, right click on the "data" link and select "Save Link As". Do the same for the link named "SPSS", "SAS", or "Stata".
Step 2: Decompress the data file
The downloaded data file should have the suffix "dat.gz", such as "ipumsi_00001.dat.gz". This file needs to be decompressed. Mac OSX will decompress the file when you double-click it. Many Windows-based computers will also do this. If your Windows-based does not know how to decompress the file, you need to download decompression software. A free option is 7zip; other programs are also available.
When decompression is complete, you should see a file with the suffix ".dat" (decompression removes the ".gz" part of the suffix). Note the path to the location of the ".dat" file on your computer. If you are unsure about the path to the file, right-click on the file and choose "Properties" (or, on Mac, "Get Info"). The path is indicated in the "Location:" section of the Properties or Get Info window.
Step 3: Modify the command file
The final step is to modify your command file to indicate the location of the ".dat" file on your computer. These instructions vary slightly for each statistics package. The examples below assume that you are working with a data file called "ipumsi_00001.dat" that is stored in a folder on your "C:" drive called "IPUMS", so that the full path to your dataset is "C:\IPUMS\ipumsi_00001.dat"
A line in the command file (the ".sps" file) will read
data list file ='ipumsi_00001.dat'/
Edit that line to include the path to the directory where the data are stored:
data list file ='C:\IPUMS\ipumsi_00001.dat'/
Pull down the "Run" menu and select "All". SPSS will then read in your data.
Change directories to the location containing your ".dat" and ".do" files. If your file is saved in a directory called IPUMS on your C drive, type
You will see "end of do-file" when STATA has finished reading in the data.
One line in the command file (the ".sas" file) will read
libname ipumsdat '.';
For example, if your file is saved in a directory called IPUMS on your C drive, change that line to read
libname ipumsdat 'C:\IPUMS\';
Pull down the "Run" menu and select "Submit." SAS will then read in your data.