1 Introduction to SPSS

(PSY206) Data Management and Analysis

Author

Md Rasel Biswas

1 SPSS Background

1.1 Introduction to SPSS

  • SPSS originally stood for Statistical Package for the Social Sciences.
  • It was first developed in the late 1960s and is now owned by IBM, under the name IBM SPSS Statistics.
  • SPSS is widely used in:
    • Social sciences
    • Psychology
    • Public health and medical research
    • Education
    • Business and market research
    • Survey research
  • SPSS provides two main ways of working:
    • Graphical user interface (point-and-click): useful for beginners and exploratory analysis.
    • Syntax (command language): useful for documenting, repeating, and reproducing analyses.

SPSS combines data management, statistical analysis, visualization, and reporting in a single software environment.


1.3 Applications of SPSS

1.3.1 1. Data Management

SPSS can be used to:

  • Enter and edit data.
  • Import data from other sources.
  • Detect and handle missing values.
  • Recode variables.
  • Compute new variables.
  • Sort and select cases.
  • Merge and restructure datasets.

1.3.2 2. Descriptive Statistics

SPSS can produce:

  • Frequency tables and cross-tabulations.
  • Measures of central tendency:
    • Mean
    • Median
    • Mode
  • Measures of variability:
    • Range
    • Variance
    • Standard deviation
  • Percentiles and other summary measures.

1.3.3 3. Inferential Statistics

SPSS provides procedures for many common statistical analyses, including:

  • t-tests
  • Chi-square tests
  • Analysis of variance (ANOVA)
  • Correlation
  • Linear regression
  • Logistic regression
  • Non-parametric tests

1.3.4 4. Advanced Statistical Analysis

Depending on the installed modules and version, SPSS can also be used for:

  • Factor analysis
  • Principal component analysis (PCA)
  • Reliability analysis
  • MANOVA
  • Discriminant analysis
  • Cluster analysis
  • Time-series analysis
  • Predictive modelling

The availability of some specialised procedures depends on the SPSS edition and installed modules.

1.3.5 5. Data Visualization

SPSS provides tools for creating:

  • Bar charts
  • Pie charts
  • Histograms
  • Boxplots
  • Scatterplots
  • Line charts
  • Other statistical graphs

SPSS also provides tools for producing and editing tables and charts for reports.


1.4 Limitations of SPSS

SPSS is powerful, but it is not ideal for every task.

  • Proprietary software: A commercial license is normally required.
  • Less programming flexibility: It is less flexible than programming-based environments such as R and Python.
  • Less emphasis on open-source workflows: R and Python provide very large open-source ecosystems and packages.
  • Advanced machine learning and modern data science: R and Python generally provide a broader range of current machine-learning, AI, and data-science tools.
  • Large-scale data processing: For very large datasets or specialised computational workflows, other tools may be more suitable.

However, these limitations do not make SPSS unsuitable for statistical research.

SPSS remains an excellent choice for learning and applying classical statistics, especially when a user-friendly graphical interface, structured output, and straightforward data management are important.


2 Starting SPSS

SPSS Statistics must first be installed on your computer.

The current version and licensing information can be found on the IBM SPSS Statistics website.

Note: The exact installation process and available features may differ depending on the operating system, SPSS version, and type of license.

On a Windows computer, SPSS Statistics can generally be launched from:

Start Menu > IBM SPSS Statistics > IBM SPSS Statistics

When SPSS starts, you will typically see an initial dialog box.

This dialog allows you to:

  • Open a recently used file.
  • Open another file from your computer.
  • Create a new dataset.
  • Start working with SPSS without immediately opening an existing dataset.

In most cases, you will begin an SPSS session by either:

  1. opening an existing data file, or
  2. creating a new dataset.

3 The SPSS Working Environment

3.1 Data, Syntax, and Output

A useful way to understand SPSS is to think of an analysis as a workflow:

Data → Analysis → Output
  ↑       ↑          ↑
 .sav    .sps       .spv
  • Data contain the observations and variable definitions.
  • Syntax contains the commands used to perform analyses.
  • Output contains the results produced by the analyses.

Keeping these components separate makes your work easier to organise and reproduce.


3.2 Data Editor

The Data Editor is the main environment for entering, viewing, and managing data.

It has two views:

  1. Data View
  2. Variable View

3.3 Data View

Data View looks similar to a spreadsheet.

  • Rows represent cases or observations.

    • Example: one respondent, student, household, or patient.
  • Columns represent variables.

    • Example: age, sex, income, or exam score.
  • Individual values can be entered or edited directly.

  • Data can also be pasted or imported from other files.


SPSS Data View

3.3.1 Example

Suppose we have data from 100 students.

Each row could represent one student:

Student 1
Student 2
Student 3
...
Student 100

and the columns might contain:

ID
Gender
Age
Exam_Score

Thus:

One row = one case One column = one variable


3.4 Variable View

Variable View is used to define the properties of variables.

Important columns include:

  • Name: the variable’s name.
  • Type: numeric, string, date, etc.
  • Width: controls the available display/storage width.
  • Decimals: number of displayed decimal places.
  • Label: descriptive explanation of the variable.
  • Values: labels for coded categories, such as 1 = Male, 2 = Female.
  • Missing: user-defined missing-value codes.
  • Columns: controls the display width in Data View.
  • Align: controls the alignment of values in Data View.
  • Measure: nominal, ordinal, or scale.
  • Role: indicates the intended role of a variable in some SPSS procedures.

SPSS Variable View

3.4.1 Example

Suppose we have a variable called gender:

Name:       gender
Type:       Numeric
Label:      Respondent sex
Values:     1 = Male
            2 = Female
Measure:    Nominal

The actual data may contain 1 and 2, while SPSS can display the corresponding labels.


4 Output Viewer

4.1 Statistical Results

The Output Viewer displays the results generated by SPSS procedures.

It can contain:

  • Statistical tables
  • Test statistics
  • Charts and graphs
  • Warnings or notes
  • Other analysis results

SPSS Output Viewer with frequency table

4.1.1 Example

Suppose we run a frequency analysis for Gender.

The Output Viewer may contain a table showing:

  • Frequency
  • Percentage
  • Valid percentage
  • Cumulative percentage

The output can be edited and exported for use in reports or presentations.


5 Syntax Editor

5.1 Working with SPSS Syntax

The Syntax Editor is used to write and run commands in the SPSS command language.

Syntax is particularly useful when:

  • The same analysis needs to be repeated.
  • An analysis needs to be documented.
  • A researcher wants a reproducible workflow.
  • Many analyses need to be performed.
  • A procedure is easier to specify through commands than through menus.

SPSS syntax files normally use the .sps extension.


5.1.1 Example

The following command produces a frequency table for Gender:

FREQUENCIES VARIABLES=Gender.

Instead of repeatedly navigating through menus, the command can be saved and run again whenever needed.


5.2 Point-and-Click vs Syntax

The same analysis can often be performed in two ways.

5.2.1 Point-and-click

Analyze → Descriptive Statistics → Frequencies

Then select the required variable and run the procedure.

5.2.2 Syntax

FREQUENCIES VARIABLES=Gender.

5.2.3 Which should you use?

As beginners, you will often use the menu system to understand what SPSS can do.

At the same time, you should develop the habit of saving the syntax used for important analyses.

Best practice: Use the menus to learn the procedures, but save the syntax so that your analysis can be checked, repeated, and modified later.


6 Other SPSS Editors

SPSS also provides specialised editors.

6.0.1 Chart Editor

The Chart Editor allows you to modify graphs, including:

  • Titles
  • Axis labels
  • Fonts
  • Data labels
  • Graph elements

6.0.2 Pivot Table Editor

The Pivot Table Editor allows you to modify the appearance and structure of output tables.

For example, you can change:

  • Formatting
  • Fonts
  • Row and column arrangement
  • Table titles
  • Displayed statistics

These editors are useful when preparing output for reports and presentations.


7 SPSS File Types

SPSS uses different file types for different purposes.

Extension File Type Main Purpose
.sav SPSS Data File Stores data and variable information
.sps SPSS Syntax File Stores SPSS commands
.spv SPSS Viewer File Stores statistical output

7.0.1 Example workflow

Raw data
   ↓
SPSS Data File (.sav)
   ↓
SPSS Syntax (.sps)
   ↓
Analysis
   ↓
Output (.spv)

The three files serve different purposes.

  • The .sav file contains the dataset.
  • The .sps file records the commands used for analysis.
  • The .spv file contains the results.

Important: Saving only the output is not enough for a reproducible analysis. You should keep the data file and syntax file along with the output whenever possible.


8 A Simple SPSS Workflow

A typical statistical analysis in SPSS can follow these steps:

  1. Obtain the data
  2. Import or enter the data
  3. Define the variables
  4. Check and clean the data
  5. Explore the data
  6. Perform the appropriate statistical analysis
  7. Interpret the results
  8. Save the syntax and output
  9. Report the findings

This workflow will be followed throughout the course.


8.1 Example Exercise

8.1.1 Question

Match each SPSS component with its main purpose.

  1. Entering and editing observations → ?
  2. Defining variable properties → ?
  3. Viewing statistical results → ?
  4. Writing and running SPSS commands → ?

8.1.2 Answer

  1. Data Editor: Data View
  2. Data Editor: Variable View
  3. Output Viewer
  4. Syntax Editor

9 Summary

  • SPSS (IBM SPSS Statistics) is a widely used statistical software package.

  • It is particularly popular in social sciences, health, education, business, and survey research.

  • SPSS provides both:

    • Point-and-click menus, and
    • Syntax commands.
  • The Data Editor contains:

    • Data View for entering and viewing observations.
    • Variable View for defining variables.
  • The Output Viewer displays statistical results.

  • The Syntax Editor is used to write and run SPSS commands.

  • SPSS uses different file types for different purposes:

    • .sav → data
    • .sps → syntax
    • .spv → output
  • A good SPSS workflow keeps data, syntax, and output organised separately.

  • SPSS is especially useful for learning and applying classical statistical methods through a user-friendly interface.