INTRODUCTION TO SPSS

(page numbers refer to the “Using SPSS” booklet that came with your text)

 

Creating a Data File (p. 5-8)

 

1.  First you need to “DEFINE VARIABLES” (p. 6).  This means that, for each question you asked the subject, you need to label a column in your SPSS file.

 

a. Double click on the box marked “var” in the left-most column. The “Define Variable” menu box should appear (p. 7).

 

b. To name the variable, click in the box to the right of “Variable Name” and type in a name that makes sense to you – no more than 8 characters are allowed.

 

Create two variables, one named “ID” that will represent the subject’s identification number and a second variable named “Sex” that will be each subject’s gender.

 

c.  Double click again on one of your two newly created variables. Click on the “Labels” button in the Define Variable box. If you would like, you can type in a longer description of the variable in the “Variable Label” box.

 

For variables like sex (i.e., “nominal” variables that are just categories of things instead of numerical measurements), you can decide how to “CODE” these variables. SPSS requires numbers to do most of its statistical procedures so you have to choose numbers for each category. In this case, we have two categories – male and female. 

 

d.  Double click again on the “sex” variable.  Go to “labels.” We now want to set “Value Labels.” In the box next to “Value” type a 1.  Then use the mouse or tab to click on the box next to “Value Label” and type “male.”  Click “ADD” to add this value and label to the list.  Do the same thing again for females, let’s use “2” for females.  Note that these numbers are what I chose... you could also use 0 and 1 or 99 and 100 (although 99 and 100 doesn’t make much sense). Also note that you are simply labeling the variables right now and can change this at any time.

 

Now create two more variables using the same procedures above:  one to indicate number of hours spent studying in an average week and another to indicate each subject’s grade point average.

 

 

 

(continued on next page)
2.  ENTERING DATA – Now you are ready to enter actual values underneath each of your variables. Each subject gets one row. Simply enter the appropriate numbers. Note that the “return” key takes you down a row, not over a column. So, you might want to use the arrow keys instead.  Enter the data set below:

 

ID #                          SEX           Hours spent studying   GPA  

1                              M                      32                     3.6

2                              F                       16                     3.5

3                              M                      21                     2.8

4                              F                       23                     3.7

5                              M                      13                     3.9

6                              F                       8                      3.5

7                              F                       4                      3.7

8                              M                      10                     2.5

9                              F                       21                     3.1

10                             F                       15                     2.3

11                             F                       31                     3.0

12                             M                      40                     3.9

13                             F                       5                      3.1

14                             M                      28                     2.7

15                             F                       15                     2.3

 

 

 

 

Saving the data file (p.8)

 

You want to save your work OFTEN.  To save a new file for the first time, click on “File” then “Save As.”  Chose the A: drive and save this file as “newfile.sav   Note that all SPSS DATA files have the suffix .SAV.  To save modifications to a file without changing the name, just use “File” then “Save.”

 

 

 

EXIT SPSS


SPSS INTRODUCTION CONTINUED

 

Start up SPSS again (sorry to be irritating, just want to be sure you know how to do everything)

 

Opening an  existing data file (p. 4)

 

-Go to “File” and “Open” 

-Switch to the A: drive

-Find “newfile.sav” and click on it, then click on “Open”

 

Selecting Variables for Analysis (p. 9) & Frequency Distributions (p. 19)

 

1.  Choosing an analysis... In the “Statistics” pull-down menu, SPSS offers a bunch of different tests you can run and information you can get from your data set.  Running “FREQUENCIES” on your data is a good first step, just to be sure everything was entered correctly.

 

a. Go to “Statistics”, “Summarize”, “Frequencies”

 

b. Choose one variable, click on it, and then click on the arrow to move the variable into the “Variables” box. SPSS will only run the analysis on chosen variables.  Since we want to run frequences on all the variables, move all of them over.

 

c.  Be sure “Display frequency tables” is checked.

 

d. Click “Okay”

 

Output Navigator Window (p. 9) – SPSS puts all its output (the results of your analysis) in a separate window from the data editor.  This window has a table that you can navigate on the left hand side indicating all the different results.  The actual results are on the right hand side (see p. 10). To switch from the Output window back to the Data Editor, you can use the “Window” pull down menu at the top of the screen, or the boxes at the bottom of the screen.

 

2.  A “Frequencies” analysis tells you how many subjects were in each category.  For example, scroll down until you see the box marked “Sex.”  The table should indicate that there are 6 males and 9 females (and 15 people total) in this data set.  Scroll back up to the top of the file and examine the rest of the tables.  Are there any numbers that shouldn’t be there (e.g., for ID number, is there just one subject for each number?  for GPA, are there any values that aren’t legitimate GPAs?).  It is good to check your data in this way to be sure you didn’t enter any incorrect values.

 

 

 

Go ahead and fill out the top of your In-Class Homework Sheet using this output.

 


Descriptive statistics & Correlations

 

1.  The “Frequencies” command in SPSS is one way to get descriptive information about your data. 

 

a. Go back to the “Statistics” “Summarize” “Frequencies” menu

b. Click on the box marked “Statistics”

c.  Under “Central Tendency” check “mean” and under “Dispersion” check “std. deviation”

d. Click “continue”

e.  UNCHECK the “Display frequency tables” box to keep your print out neat.

f.   Click “okay”

 

 

Fill out the second part of your In-Class Homework Sheet using this output.

 

 

2.  SPSS is a powerful tool to run all sorts of analyses.  Do you think that hours spent studying might be related to GPA? If so, how?  Let’s use a statistical analysis to test your hypothesis.

 

a.  Go to “Statistics” “Correlate” “Bivariate”

b.  Move your GPA and hours spent studying variables over to the “Variables” box.

c.  Click “okay”

 

Your output will be a table called a correlation matrix.  Look at the cell that is in the column with your GPA variable and the row with your hours spent studying variable.  The cell should contain the number .156.  This is the correlation coefficient.  That is, this is the numerical representation of the relationship between GPA and hours spent studying. Try to answer the questions on your homework based on what you remember about correlations.

 

 

 

 

Finish your In-Class Homework Sheet.

 

If you have more time remaining in lab, “play” with the data set some more. Ask me if you want to do anything and don’t know how. It might be interesting to see if women have higher GPAs or study longer than men for example... I can show you an easy way to find this out.