Ninth Edition CoverGraziano & Raulin
Research Methods (9th edition)

Data Entry in
SPSS for Windows

Computers work with files, which store information or programs for use. Files traditionally have a name, followed by a period, followed by a three-character extension. For example, the program file for SPSS for Windows is spsswin.exe (the name is spsswin and the extension is exe). 

You don't normally have to know this, because you typically start a program in Windows by either clicking on the icon on the desktop or opening the program through the start menu. However, the extension is important because it is often used to identify the type of file. For example, SPSS for Windows uses ".sav" to indicate a data file and ".lst" to indicate an output file. SPSS for Windows automatically applies these extensions to the appropriate file for you. 

The .sav files in SPSS for Windows are written to your disk in a particular structure that the program controls. Therefore, it is best to do all of your editing of data files from the SPSS for Windows data screen. [We have prepared some of the data sets used in the textbook and saved them for you elsewhere on this website.]

When you first start the SPSS for Windows program, you are given several choices. [Note that most of the instructions shown here are for SPSS 13.0, which is not the current version. SPSS corporation periodically updates their software that same way we periodically update this text. Therefore, there might be slight differences in the program if the version bundled with your text is a later edition of SPSS.] Select the "Type in Data" choice to get the data editor screen. This is a matrix with columns representing fields and rows representing records. This structure is referred to as a spreadsheet. Each record typically corresponds to one participant, and each field corresponds to a variable. 

To illustrate the process of data entry, we will enter the data in Table 5.2 of the textbook and label the variables. The best way to understand this section is to work along, following the steps on your computer as you read. We will structure the data exactly as it is shown in Table 5.2. 

When you first open the Data Editor window, the first cell (upper left) is highlighted. You can use the mouse to move to any cell (a plus sign is the cursor when you are working in the spreadsheet) and can select that cell by clicking the mouse. Anything you type will go into the selected cell as soon as you hit either the enter key or one of the arrow keys. Starting in the upper left corner, we will enter the data for the first participant by typing "1" (do not type the quotation marks) and hitting the right arrow key to move to the next cell in that row. 

When you do that you will notice that the column title (which had read "var") changes to var00001. This is the default name (name that is automatically assigned) for that variable. In a minute, we will show you how to change the default names as well as the way the numbers are displayed. To continue the data entry for the first participant, type the following: 28, 32000, 6, M, R with a right arrow key in between each entry to move you to the next cell. The result can be seen in this next figure.

To define a variable, we need to switch to the Variables View in the data editor. You can do that by clicking on View from the menu at the top of the screen and selecting "Variables" at the bottom of the menu. Note that next to this choice is the phrase "cntl+T." This is a reminder that holding down the control key and hitting T will achieve the same result. This is called a shortcut key. In this case, this shortcut key is a toggle that moves one from the Data View to the Variables View in the SPSS data editor. This action will give you what you see on this screen

To rename the variable, highlight the old variable name in the Name column and type in the new name. For example, this screen shows that the names of the variables were changed to ID, Age, Income, Voted, Sex, and Party, respectively. 

You can also define the variable type for each variable by clicking in the Type column for the variable. A small box with three dots will appear on the right of that cell. Click on the box to open the Variable Type box as shown in this screen. You will want to change the number of Decimal Places from 2 to 0 by moving the cursor to the Decimal Places box, clicking, deleting the number 2, inserting 0, and clicking on the OK button, which will give you the following screen. If you toggle back to the Data View (cntl+T), note that the participant number, which had read 1.00, now reads 1.

We will be defining each of the remaining variables in much the same way. Note that we gave the variables short names. We did this because these names tend to appear it the tops of columns when the data are printed out. However, we often want to give the variables more descriptive labels. These more extended labels appear in the Label column.  For example, you might want to type "Party Affiliation" for the variable Party. With the variables "Age" and "Voted," we will set the number of decimal places to zero as we did for the first variable ("ID"). 

For income, we will also change the type, but this time we will select the Dollar option on the left by clicking on the small circle preceding the word dollar and then selecting the format that shows no decimal places and room for up to six figures (plus the comma and the dollar sign). When we select that option, we will see that the width and decimal place readings below automatically change to 8 and 0, respectively. 

The variables "Sex" and "Party" are handled differently. Those variables were automatically set to "string" when the letter codes for male and republican were entered previously. A string variable contains nonnumeric characters. We are using letter codes in our example for the variables "Sex" and "Party." Although our letter codes for these variables are reasonably self-explanatory, it is best to provide explicit labels for each of these codes. We do that by clicking in the "Values" column for the variable of sex and then clicking the gray box, which will give us this screen. We will list each value that the variable can take and its associated label below. For example, this screen shows that the value "F" is associated with the value label "female." We click the Add button (which is now highlighted since we have put values in the Value and Value Labels boxes) to add this value label. Do the same for male and click OK to complete this variable. A similar process can be used to define the "Party" variable and its three value labels ("Democrat," "Republican," and "Other").

Now that the details of the variables have been defined, we toggle to the data entry screen with cntl+T or clicking on the View menu and selecting data. We then move the cursor to the beginning of the second line and enter the data for the second participant. We continue this process until all of the data from the 24 subjects in Table 5.2 have been entered. At this point the screen looks like this. Our last step is to save that file by selecting the File menu and the Save As option, which will give us this screen. We name the file Table_5-2. SPSS automatically assigns the extension ".sav" to indicate it is an SPSS for Windows data file. We also tell the program where on our disk we want the file saved.

The level of detail in the preceding paragraph may have been unnecessary. The advantage of SPSS for Windows is that it is so intuitive that most students with a basic knowledge of statistics can figure the program out by playing with it for a short while. On this first task, however, we wanted to explicitly list every step. 

In the sections that follow, we will move through the procedures more quickly. Do not be afraid to try something to see how it works. It is very hard to do anything that you cannot undo. To undo a step, simply click the undo button (arrow going counter clockwise). The worst that is likely to happen is that you will have to start over.

To summarize data entry principles:

  1. Always give each variable a descriptive name (up to eight characters) and a more extended name if the eight characters are not self-explanatory.
  2. Be sure to give value labels to any variable that uses codes so that the output will be readily interpretable. Remember that each row represents one subject and each column represents one variable.
  3. Save the data file with a name that is descriptive enough that you will be able to identify the file easily.


We have prepared some animations that will walk you through the steps described above. To view each of the animations, click the title of the animation in the table below. 

Note that we do not recommend that you run the animations if you have a slow Internet connections, such as a dial-up connection. You will find that the animations take forever to load on a slow connection.

Entering Data into SPSS for Windows
Defining the Variables in SPSS for Windows