SPSS Tutorial
SPSS Tutorial
Variable View
Data View
Questionnaire
Practice Data Set
Analysis
Frequencies
Crosstabs
Codebook (3 examples)


INTRODUCTION TO SPSS (STATISTICAL PACKAGE FOR SOCIAL SCIENCES)
SOC 212 

SPSS can only be accessed on campus or at home with a version of the SPSS program (student versions can be purchased in the bookstore).  You can not access the SPSS program on UNIX with an off-campus connection.

General Steps once Survey has been distributed:

1.   Code Survey (if / where needed - i.e. open-ended questions, closed-ended questions with no pre-coding on the questionnaire itself, assigning case ID numbers, etc.)
2.   Create SPSS file (from information off of the survey) - Variable View spreadsheet
3.   Enter the data from the survey - Data View spreadsheet in SPSS file
4.   Run Analysis of the data
5.   Create a Codebook (can be created by “hand” or through SPSS)

This section gives you instruction on how to create an SPSS file (from a copy of the questionnaire), enter data (from a coded data sheet since original surveys are not available), run two types of analysis (Frequency table and Crosstabs / Bivariate tables), and create a codebook (computer generated and individually created).

Most of the computers will have an SPSS icon located on the desktop - If so, Click the Icon

If not,

       1.  Go to the START button in Windows
       2.  Go to PROGRAMS
       3.  Go to STATISTICS
       4.  Find SPSS and open

Once you are in SPSS:

      1.  “Open File Box”  - Cancel
      2.  The Data Editor will open as a Spreadsheet
      3.  This is where you will define your variables and enter your data

Go to VARIABLE VIEW spreadsheet first: 

1.   Columns:
a.   NAME: type the Variable Name, (NO SPACES OR DASHES, NO #'S AT BEGINNING)
b.   TYPE:  leave as numeric for this course
c.   WIDTH:  can leave as default
d.   DECIMAL:  Change to 0 unless you have the need for your own data to use decimals in the coding scheme
e.   LABEL:  type in your Variable Labels (usually best to do as an abbreviated part of the question - something that will "define" the varialbe name above)
 f.   VALUES:  
1.   Click on the little gray box
2.   a Value Label Box will appear
3.   type in the Value Labels (codes that have been assigned and their labels)
4.   after adding a value, hit ADD
5.   when finished, click OK

NOTE:  If multiple varialbes have the SAME VALUES, you can enter the values into the 1st on, the Right Click on the Value box, hit COPY, then Rt. Click on the other variables with the same values, highlight them all, Rt. click and PASTE

g.   MISSING, COLUMNS, ALIGN, and SCALE: Leave as Defaults

2.   Rows:
a.   Each Row on this spreadsheet represents 1 Variable - need a row for each Variable

These two examples go end-to-end across the Variable View Spreadsheet




Go to DATA VIEW spreadsheet: 

1.   Columns:
a.   Each Column Should be headed with a Variable Name (that was assigned in the Variable View)

2.   Rows:
a.   Each Row represents 1 case or 1 Respondent
b.   For each respondent, enter their responses in the appropriate column going across the spreadsheet

NOTE:  Make sure that you do not hit enter after the last line of data - if you do, you will see a line with dots in each column.  You need to remove this line before running your analysis.  Do this by highlighting the entire row then hit “clear” (rt. Click on the highlighted row).  If you don't remove it, it will show up in your analysis as a missing case.


Last line has "dots" and would be considered Missing Data - would need to remove row

NOTE:  whenever you run an analysis, those results will remain on the Output File unless you select the information and clear it/delete it.  If you run frequencies and printed it, then ran crosstabs and printed it - the second printout would include both the frequencies results as well as the crosstabs results if you did NOT delete the frequencies data BEFORE running the crosstab.  This becomes a big issue if you are doing several analyses - you may end up double printing a lot of tables (the computer lab does not like this).  Either clear-out the file each time, or wait until you are finished and print the Results once.


To Run an Analysis: 

Frequencies: 
1.   Go to Analyze in tool bar at top
2.   Descriptive Statistics
3.   Frequencies
4.   Highlight all the variables you want to run, Click Arrow to move them from Left Column to Right Column
5.   If you want to run a Mean, Median, and Mode - Click on the subcategory at the bottom labeled “Statistics”
6.   Click OK



When you analyze a frequencies table, typically use Valid Percents.  That is the percentage in each category with the "Missing" cases removed.  If there are no missing cases, the Percent and Valid Percent columns will be the same.  You will use terminology such as "of those who responded, 25% ......) in a summary.


Crosstabs: 
1.   Go to Analyze in tool bar at top
2.   Descriptive Statistics
3.   Crosstabs
4.   ROW = this would be your Dependent Variable (s)
5.   COLUMN = this would by your Independent Variable (s)
6.   Go to Subcategory “CELLS”
a.   Under “Percentages”, click COLUMNS


Crosstab with Gender as Independent Variable and Satisfaction with Life as Dependent Variable


  When you analyze the crosstab, you always compare across the independent variable.  Above you might say something like "females are more likely to disagree that they are satisfied with their life than are males".  You can't use "significantly" until you run tests of significance which we really don't get into much in this class.


NOTE:  When you run an analysis, an OUTPUT file will come up showing your results.  You can print the data from this file, or Copy and Paste it into a word file (this is nice if you want to edit, format or add to the file), then print it.



Practice Data Set
Questionnaire 

(This is one of many ways to create a survey from its Introduction / Instructions, Statement Wording, to the overall layout of the Questionnaire itself)

Please respond to all of the items.  Do NOT write your name or student ID on the questionnaire.  No effort will be made to identify individual respondents.  Only summaries of the data will be made available to others, and your individual responses are considered private and confidential.


Please respond to the following statements by specifying the extent to which you agree or disagree with it.

                                                                                                              Strongly                                                                  Strongly
                                                                                                                 Agree     Agree     Undecided     Disagree     Disagree

      1.   I control the circumstances of my life.                                  1               2                 3                    4                   5

      2.   I am satisfied with my life.                                                       1               2                 3                    4                   5


The following questions are for Demographic purposes.  Once again, responses will be grouped together for the final summary and will be kept completely confidential.

     3.   Gender

1.   Male
2.   Female

     4.   Please mark your present academic rank

1.   Freshman
2.   Sophomore
3.   Junior
4.   Senior


PRACTICE DATA SET
CODED DATA FROM THE SURVEY 

For Variables: “CASE”, CONTROL, LIFESAT, GENDER and ACADRANK
(N=30)


Case
LIFESAT
CONTROL
GENDER
ACADRANK
1
4
3
2
4
2
5
4
1
2
3
3
3
1
1
4
3
2
1
1
5
4
3
2
2
6
5
4
2
3
7
5
5
2
3
8
3
3
1
1
9
2
2
2
1
10
3
3
2
1
11
3
3
1
2
12
4
5
1
3
13
3
3
1
2
14
4
5
2
3
15
5
4
1
3
16
4
3
2
4
17
2
1
1
2
18
3
2
2
1
19
2
3
2
1
20
4
4
1
3
21
4
3
1
2
22
5
5
1
3
23
4
4
2
3
24
3
2
1
2
25
2
2
1
1
26
4
3
2
1
27
5
4
2
4
28
4
3
2
2
29
3
2
1
1
30
5
4
1
2


Practice Data Set:
CODEBOOK  

(First example: Created in a Word file)


Cases = 30       (N=30)
Variables = 5    (includes a “variable” for Case ID number - although created by you, computer
                considers it a variable)

Variable Names:  (cannot exceed 8 characters - no spaces, but you can use underscore _  )
     CaseID
     Control
     Lifesat
     Gender
     Acadrank

Variable Labels:
     CaseID          Case Identification Number
     Control           Control over one's life
     Lifesat            Satisfaction with one's life
     Gender           Gender of Respondent
     Acadrank       Academic Rank of Respondent

Value Labels / Variable Attributes:  (Coded)
     CaseID          (Quantitative data, no need to code - numbers represent themselves)

     Control          1 = Strongly Disagree
                            2 = Disagree
                            3 = Undecided
                            4 = Agree
                            5 = Strongly Agree

     Lifesat          1 = Strongly Disagree
                           2 = Disagree
                           3 = Undecided
                           4 = Agree
                           5 = Strongly Agree
     Gender         1 = Male
                           2 = Female

     Acadrank     1 = Freshman
                           2 = Sophomore
                           3 = Junior
                           4 = Senior

CODEBOOK

(Second Example: Printed straight from the Output File in SPSS)


1.   Click FILE on the SPSS tool bar
2.   Click DATA IMPUT FILE
3.   Click WORKING DATA
4.   This will create an Output Box with Codebook (information on each variable)

*Different versions of SPSS will yield various output structures for the codebook.
* For Project, you may Cut/Paste this into your Document or Print straight from SPSS - Just change/add a Title to the top of the Output before Printing

(Partial Codebook)

File Information
List of variables on the working file
Name                                                                                                                                   Position

CASE                                                                                                                                         1
Measurement Level: Scale
Column Width: 8   Alignment: Right
Print Format: F8
Write Format: F8

LIFESAT        Satisfied with life                                                                                                2
Measurement Level: Scale
Column Width:  8   Alignment: Right
Print Format:     F8
Write Format:     F8

Value     Label
1     Strongly Agree
2     Agree
3     Undecided
4     Disagree
5     Strongly Disagree

CONTROL     Control circumstances of life                                                                         3
Measurement Level: Scale
Column Width:  8   Alignment: Right
Print Format:     F8
Write Format:     F8

Value     Label
1     Strongly Agree
2     Agree
3     Undecided
4     Disagree
5     Strongly Disagree



CODEBOOK

(Third Example: Created in SPSS but Cut/Pasted and Printed from a Word
With this, you can edit the format (easier), take out unnecessary lines, etc.)

1.   Click UTILITIES on the SPSS tool bar
2.   Click FILE INFO, This will create an Output Box with Codebook (info on each variable)
3.   IF you choose to Copy & Past into Word:
a.   In SPSS Output File, Click EDIT
b.   SELECT ALL     
c.   EDIT, COPY OBJECT
d.   Open Word file, then PASTE
i.  Change the Right Margin to .9 (point 9) (position numbers will then line up)

NOTE:  Can delete the COLUMN WIDTH, PRINT FORMAT, WRITE FORMAT, and  MEASUREMENT LEVEL rows.  These are not needed in the codebook for this class.


File Information
List of variables on the working file
Name                                                                                                                                            Position

CASE                                                                                                                                                   1

LIFESAT              Satisfied with life                                                                                                   2
Value     Label

1     Strongly Agree
2     Agree
3     Undecided
4     Disagree
5     Strongly Disagree

CONTROL           Control circumstances of life                                                                               3
Value     Label

1     Strongly Agree
2     Agree
3     Undecided
4     Disagree
5     Strongly Disagree

GENDER             Respondent's gender                                                                                         4
Value Label

1     male
2     female

ACADRANK       Academic rank                                                                                                    5
Value Label

1     Freshman
2     Sophomore
3     Junior
4     Senior