Introduction



Starting SPSS

To start SPSS just double-click (left mouse button) the SPSS icon from the desktop. After you double-click on the SPSS icon, the computer will load the SPSS software. You will know that SPSS is loading when the Windows hourglass replaces pointer on your screen. When the loading process is completed, the SPSS Data Editor window will be on your screen. This is the main SPSS screen. There are a number of pull-down menus across the top and a toolbar with various icons that appear below the menu bar. In order to operate the menus, you must use the mouse to point and then single-click (left mouse button) on the menu to which you have pointed. In order to activate a procedure represented by an icon, just point to the icon and single-click (left mouse button) on it.



Creating a New Data File

In many cases, you will begin your work on SPSS by creating a data file with the information that you want to analyze. SPSS should come to the Data View scrreen seen above. If not, simply click the Data View tab (bottom left). 



Defining Variables

The first step in creating a new data file is to define the variables you want to use in your project. As part of this introduction we are going to use the following data set.

ID     STUDY HOURS     GPA     SEX

--     --------------------     ------     ------

1                  32                  3.6         M
2                  16                  3.5         F
3                  21                  2.8         M
4                  23                  3.7         F
6                   8                   3.5         F
7                   4                   3.7         F
8                 10                   2.5         M
10               15                   2.3         F
11               31                   3.0         F
12               40                   3.9         M
13                 5                   3.1         F
14               28                   2.7         M
15               15                   2.3         F

To define our first variable (ID number), click on the Variable View tab at the bottom of the Data Editor window. Your screen should now look like this. 

First, we will want to give the variable a name that is useful to us. Click on the Name column, and type id (see figure below). Then press the Enter key. 

In addition to giving our variable a name, we usually want to specify some of its characteristics. In the case of id we want the entries to be whole numbers, without decimal places and either one or two numerals in length. To do this click, click the small square with three dots in the Type column next to the word Numeric. The panel seen below will appear.

We want to treat this data as a number, so leave the dot next to Numeric. But we want just two digits maximum and no decimal places. Make those changes in the appropriate boxes and then press OK. Notice that the Width and Decimals designations for id have changed on the Variable View page. 

This is all we need to do with this variable.

Using these procedures, name the second column StudyHr. It should also be numeric with a format of 2.0.

Note: Even if you type the variable name StudyHr SPSS changes it to studyhr. And remember that the maximum length of a variable name is 8 characters. It is possible to provide more information about a variable and we will learn how to do that next.



More on Defining Variables

The next variable we want to define is grade point average (GPA). Call this new variable GPA (or gpa) and set it for a width of two digits with one place after the decimal. 

But what does GPA stand for? To provide more information about a variable, we can add a Variable Label

Type Grade Point Average in the Label column and press the Enter key (see figure above). Now when statistical analyses are done on this variable, the extended label, Grade Point Average, will be included to remind us what this variable is all about. 
 
 

Now for our final variable, Sex. Although it is possible to use M and F for this variable, it is best to "code" the variable numerically such as 1 for male and 2 for female (or 0 for male, 1 for female, etc.).

Begin by defining the variable (using either method we have learned). Define its type as Numeric1.0.

Provide a more complete description of the variable by typing Sex of Subjects in the Label column. But remember that we are going to type 1 or 2 for this variable. How do we remember what 1 stands for?

Click on the small box with the three dots in the Values column to get this box. 

In the the Value cell type 1 and in the Value Label cell type male. Now click the Add button. Notice that our entry is moved down to the open box at the bottom. 

Now enter 2 and female (and click Add). We now have a complete definition of our variable sex. Click OK to complete this entry. 



Entering the Data

Now that the characteristics of each variable have been specified, you will need to enter the data from the table on Page 2 into the spreadsheet. Just click on the first empty cell for the variable ID and press 1 and the Enter key.

One of the advantages of defining your variables before you begin entering data is that it provides some checks on the data that you enter. For example, try to enter a 4-digit number in the ID column. Rather than entering an incorrect number, SPSS just puts ** in the cell to remind you that incorrect data has been entered.



Entering Non-Numeric Data

In addition to being to do computations with numeric data (numbers), SPSS can also deal with labels, what are often called string data. In the data set shown below, Major, is a string variable. 

1998 Graduates of Allegheny College, Listed by Major
 
Major Number of 1998 graduates
Art 10
Biology 51
Chemistry 12
Classics 0
Communication Arts 21
Computer Science 8
Economics 26
English 21
Environmental Science/Studies 54
Geology 6
History 15
International Studies 4
Mathematics 6
Modern Languages 6
Music 2
Neuroscience 12
Philosophy 3
Physics 6
Political Science 28
Psychology 46
Religious Studies 4
Sociology/Anthropology 9
Student-Designed Majors 2
Women’s Studies 1
Total: 353 

Note: This procedure assumes that you have gone through the material in the Introduction to SPSS.  If not, you should review that material before proceeding. 

First, we need to define our first variable – the majors. Using the Variable View screen, give the variable the name "major"; remember that in SPSS variable names cannot be more than 8 characters long. Click on the three small dots in the Type column (next to Numeric) and change the variable to "string" (a "string" variable is one that is characterized by a word or set of letters (that is, not numbers). In the Labels column, call this variable "Allegheny College Major" – this command allows us to give a fuller description of the variable than we can give with just the name. 

When you have entered the data into the Data View screen, your data editor should now look like this: 

Now we need to enter the actual number of students in each major for 1998. Follow the same procedure using the second column, except that this variable name should be "grad98" (note: you cannot begin a variable name with numbers, so we have to start with letters). This variable is a numeric variable, and since it is the number of graduates, it is always going to be a whole number, and we can type 0 as the number of decimal places. Give it the label "1998 graduates", and when you are finished, begin to type in the second column of data. 

Be careful to check your numbers after you have entered them, though – entering the data is where most errors occur.



Saving Your Data

After the data has been entered into the spreadsheet you should save the data, even if you plan to do all your analyses before you log off. Things can go wrong and you do not want to enter the data twice.

To save your data, select File then Save (or Save As) from the pull-down menus at the top of the SPSS Data Editor window. You will see a window that looks like this. (The /Home/gator folder is the only place you can save files.) To save our data just click on the File Name box and enter a name for this file. For reasons that will become obvious later, try using AardvarkData as the name for this first data set.

Finally, press the Enter key. (SPSS will automatically add the extension .sav to your data. You do not need to type it yourself.) Your data is now saved on the local hard drive as Aardvark Data.sav.



Exiting SPSS

Now that we have entered our data and saved it, we can quit SPSS. Just go to the pull-down menu File and select Exit. This will close the main window and unload SPSS. The Windows Desktop will reappear.  Be sure to use WS_FTP Pro to move your file to your network account.  When you log out of Windows your files will be erased.

Back to SPSS Contents


Contents  |  Psychology   |  Allegheny
5/00