Home   bullet   Help Center   bullet   How to Read ANES Data into SPSS

How to Read ANES Data into SPSS

Please note that for some earlier studies, data are not yet available in this format and are still available only as SAS transport and SPSS portable data files. All releases are planned for eventual re-release in the newer format.

Reading ANES data into SPSS is not difficult, and once you have done it once or twice it can be very easy. We provide special SPSS syntax files with each dataset that allow you to read the data in rather automatically. Here is how to do so:

1. Download the ZIP file for the dataset to a new, empty directory on your local computer. Once the download is complete, decompress (unZIP) the file. For instructions on how to decompress a ZIP file, see the ANES Help document titled "How to unZIP a File".
2. After you decompress the file, you will see that one of the resulting files is named "spss.zip" (you may need to refresh the window). The file "spss.zip" contains the syntax files that you will need to use the data in SPSS. Decompress the file "spss.zip" into the same directory as the other files.

3. A set of SPSS syntax files should appear - you will recognize them because their file names end in ".sps". Use a text editor to open the file ending in "_run.sps". The top of the file should look somewhat like the image below. Make note of the "recommended directory" (circled in red). If you use this directory no changes to the syntax files are required prior to creating an SPSS dataset.

You will notice that the "recommended directory" identifies the dataset (2004 American National Election Study)and version/date (in this case, Version 20050816).

  spss image

4. After making note of the "recommended directory" from Step 3, close the file ending in "_run.sps".

Now create the "recommended directory" on your computer.

Then move all of the files you unZIPped to the "recommended directory".

  SPSS image

5. Launch SPSS. In this example, we are using SPSS Version 10 for Windows, though things should work similarly in other recent versions of SPSS.

Choose to open a syntax file by selecting "File", then "Open", then "Syntax".
SPSS image

6. Go to the "recommended directory" and again choose the file whose name ends in "_run.sps". A new SPSS Syntax Editor window should appear, showing the file.

Choose "Run" and then select "All", as shown to the right.
  SPSS image

SPSS will then begin to process the datafile using the syntax files provided.

You may notice phrases such as "Running DATA LIST" and "Running SAVE" appearing on the screen; this is SPSS at work.

Once processing is complete, an SPSS Viewer output window and the phrase "SPSS Processor is ready" should appear. Depending on the speed of your computer, processing may take only a few seconds, or it may take much longer.

7. You're done! Switch to the SPSS Data Editor window to view the data. It is always important to check that the case count for the resulting file is the same as in the codebook.
  SPSS image

You will notice in the upper left corner of the SPSS Data Editor window that an SPSS System File (".sav") has been created and saved for you. It is located in the "recommended directory" from Step 3 - look to be sure it is there.

From now on, for this dataset you may begin to use the ".sav" file directly. You will not need to repeat these instructions for this dataset unless you make a change to the file and wish to recreate it from scratch. Good luck with your analyses!

Many thanks to The Comparative Study of Electoral Systems (CSES) for sharing this help file with us.

Do you have a suggestion as to how we could make this document more useful? Please let us know by email to "anes@electionstudies.org".