HISTORY 493 Quantitative Historical Analysis

Up

 

 

 

GETTING A FILE FROM IPUMS AND SAVING IT AS AN SPSS DATAFILE

File from IPUMS

1. Go on the web to www.ipums.umn.edu and choose create an extract. If you are doing this for the first time, you will have to register.

2. Log on by giving your email address as a password

3. Choose the size of the dataset you want and check all available samples

4.  Go to SAMPLE SELECTION page and choose

     a. rectangular file to get individual records, household file to get just household
        characteristics. Avoid at this point hierarchical files.

     b. opt for compressed file.

     c. ask for full variable list

5. Go to VARIABLE SELECTION

    a. choose variables

    b. submit extract

You will get an email, often almost immediately with three files attached: one is a very small text file that lists the variables (extension is cbk), a second  is the compressed data file with an _dat Z ending, the third file is a SPSS syntax file which has the commands that will define and label all the variables and create a SPSS file out of your data file. Right click on each of these files and save them to your flash drive or if you are on your own computer to whatever place is most convenient that you can find easily.

 

Decompressing Files

1. You need software to decompress the data file. IPUMS features direct links to free software like winzip (http://www.winzip.com). The machines in the labs have this or similar software.

2. On winzip you hit extract to decompress the datafile and send it to where ever you have the other files.

 

Reading the files into SPSS

1. Go into SPSS, choose OPEN, syntax to call up the syntax file (the file with a little icon of SPSS on it and identified as an SPS file) from whatever drive it is on.

2. Note the beginning line  data list file =   Make any change necessary to the name of the file so that it corresponds to what name you have for the decompressed datafile and the drive. If for example it is on the E drive insert the E.  data list file =  ‘E:\smith001.dat’/

[This is the trickiest part because sometimes your machine adds .txt or another .dat or something else that you won’t see when you check the name of the file. Erase the entire name and rename with a new .dat ]

3. Click on RUN, all  which is a menu item that appears on the Syntax screen and the data will be read in. It takes a minute or so depending on the size of the file. Also, depending on your version of SPSS the variable or data editor page might automatically come up or an output screen will come up with a message at the lower right hand corner indicating transformation pending. Click on TRANSFORM, run and the data  will appear on the data editor.

4. Save the file -   FILE, save as, whatever you want to name it, an spss sav file.