Psychology 340 Syllabus
Statistics for the Social Sciences

Illinois State University
J. Cooper Cutting
Fall 2002

Back to the 340 syllabus page.

SPSS Introduction and Review

  • General Procedures in SPSS
    1. Starting the Program
    2. Data Files and Formats
    3. Windows
      • Data (data view tab and Variables tab)
      • Output
      • Syntax
    4. Menus and Dialogue Boxes
  • Data Entry
    1. One row per independent source of data
    2. One column per variable
    3. Variable Name, Type, Width, Label, Value Labels, Scales of Measurement, etc...
  • Data Manipulation
    1. Select
    2. Split File
    3. Weight Cases
    4. Transform/Compute New Variable
    5. Recode (into Same or into Different)
  • Analyze Menu
    1. Frequencies
    2. Descriptives
  • Graphs Menu
    1. Histogram, Bar graph, Line Graph, etc...

    What is SPSS?

    Visit the SPSS home page.


    General Procedures in SPSS



    Data Entry



    Data Manipulation

    1. Sort The first thing that we can do is to "sort" the datafile.

        Step 1: To do this select "sort cases" under the "data" menu.

        Step 2: Then select "quiz1" for the sort variable field.

      By sorting the file you can begin to see the pattern of the distribution. For example, now it is easy to see what the lowest and highest scores are (now at the top and bottom of the column). However usually just sorting the variable isn't enough.
    2. Select
    3. Split File
    4. Weight Cases
    5. Transform/Compute New Variable

      Computing New Variables

        Creates a new variable and values for that variable based on an expression
        Computing scale totals is a common application
        Allows multiple scale items to be summed
        Individual items are not typically used in data analysis in psychology
        Choose Transform, Compute

          Quick overview of the Compute Process

            Enter the name of your new variable under "Target Variable"
            Enter numeric expression by typing or using calculator pad
            For quicker calculations, use "sum" function
            Separate variable names by commas
            If consecutive, use "to" (e.g., "var1 to var10")
            Use "mean" function to avoid problems with missing values
            Use it like "sum" function
            Multiply mean by number of scale items to retain original range of scores

        Conditional Transformations

          Purpose is to create new categorizations based on values of existing variables
          Recode Into Different Variables is one way to do this
          Compute a new variable is another way

        Transformation Cautions

          Remember to save data set so changes are saved on your file
          Never recode variables into same variable more than once or you'll get confused
          Be aware of how you're handling missing data

          Transforming data

            Sometimes you may want to change the data. If you just need to change a few cells, then it may be easiest to do it one cell at a time. However, there are times when you may want to change a whole bunch of cells, or even entire variables. SPSS provides two options for doing this: recoding and computing.

              Recoding

              This allows you to change the way in which you have coded a variable. For example you may want to change all of your 1's and 2's to 0's and 1's. SPSS gives you two options:

              • Recoding into the same variables
              • Recoding into different variables.

                Choose Transform, Recode from menu bar

                  Into same variables
                  Into different variables (choose new name)

                Recoding Into Same Variables

                  Assigns new values to a variable based on the old values of a variable
                  Reverse scoring is a common application
                  Many scales have items worded in two directions
                  All items must be scored so they are in the same direction
                  Indicate old and new values, then click "Add"
                  Repeat process until all values are in box
                  Click "Continue"

                Recoding Into Different Variables

                  Assigns new values to a new variable based on the old values of a variable
                  Select the old variable to be recoded
                  Type in the name of the new variable & click "change"
                  Indicate old and new values, then click "Add"
                  Repeat process until all values are in box
                  Click "Continue"




      Analyze Menu

      • Almost all of the analyses that SPSS runs are controlled from the Analyze menu.

      • Frequencies
      • Descriptives

        SPSS will create frequency distribution tables for you. Go to the "Analyze" menu, select "Descriptive statistics", and within that sub menu select "Frequencies".

        SPSS will then ask you for which variable you want the table for.

        For quiz 1 the frequency table output should look something like this:




      Graphs Menu

      • Most of the graphs and charts may be accessed with the Graphs menu.

        • Bar charts: The bar chart is used to present frequencies of scale categories where the scale is usually a nominal/categorical measure.  The x axis shows each category (in no particular order because the scale does not have an inherent order) and the y axis represents the frequency of the categories. A bar is created for each category that is shown on the x axis and its height is raised to the point on the y axis that corresponds to the frequency of that category. There should be spaces between the bars so that they do not touch each other. An example would be the number of A,B, C, D, and F grades in a class or numbers of subjects representing different ethnic groups.

        •  

          Bar charts are also useful for presenting other summary statistics, like means, for different groups. For example suppose that we wanted to know the mean on quiz 1 by the three different sections.

        • Histogram: The histogram is used to present frequencies of scale scores where the scale is usually either an interval or ratio measure. The x axis shows the values of the variable and the y axis shows the frequency of each score. A bar is raised from the x axis to the appropriate frequency on the y axis for each scale value shown. The bars usually touch each other.  These look similar to bar graphs except they are used more often to indicate the number of subjects or cases in ranges of values for a continuous variable, such as the number of subjects or cases in ranges of values for a continuous variable. 
        • The histogram of quiz 1 is basically just a picture of the frequency distribution table.

          In this case the histogram is a little different than you might expect after comparing it to the frequency distribution table above. Why?

             Because, the above histogram is based on a Grouped frequency distribution table of quiz 1. Go ahead and group scores 10 & 9, 8 & 7, 6&5, etc. and see if now the histogram looks as you'd expect it would.


           
           

        • Line plot: These may be used to display trends in data and multiple line charts are often used to demonstrate ANOVA interactions (we'll get to that later). 

           
        • Pie chart : These, like bar graphs, are another way of displaying the number of subjects or cases within different subsets of categorical data. 

        • Box Plots : These are based on percentiles and provide a good way to display the distribution of your data. 
        • Scatterplots : (simple and overly): These are a useful way to display the nature of the relationship between variables. 
        • In a scatterplot, you would simply put your two variables into the Y and X axes (for example, maybe you have test scores on two quizzes). It generally doesn't matter which variable is specified to be on the x axis and which variable is specified on the y axis. The one shown below gets even a little more complicated in that different points are represented by different colors to indicate which section that person belongs to (of 3 course sections). You should notice that each point represents a case or person and the point shows the intersection of their two quiz scores.

          Your scatterplot should look like this.



      If you have any questions, please feel free to contact me at jccutti@mail.ilstu.edu.