SPSS Lesson 5 – Entering and Importing Data | Dataplexa

Entering and Importing Data

Before any statistical analysis can be performed, data must be available inside SPSS in a clean and structured form. This lesson focuses on how data enters SPSS and how numerical data should be handled correctly from the very beginning.

SPSS allows both manual data entry and importing data from external sources. Choosing the right method depends on the size and source of your dataset.


Manual Data Entry in SPSS

Manual entry is useful for small datasets, classroom examples, or quick demonstrations. In this approach, data values are typed directly into Data View.

Consider the following numerical dataset representing student exam scores:

Student_ID Age Score
101 18 72
102 19 85
103 18 90

Each row represents one student, and each column represents a numerical variable.

Before entering this data, variables should be defined in Variable View:

  • Student_ID → Numeric (Nominal)
  • Age → Numeric (Scale)
  • Score → Numeric (Scale)

Defining variables first ensures SPSS interprets the numbers correctly during analysis.


Importing Data from External Files

For real-world datasets, manual entry is inefficient. SPSS supports importing data from multiple file formats.

The most common import source is Excel. In research and business environments, data is often prepared in spreadsheets before analysis.

When importing Excel data:

  • The first row should contain variable names
  • Columns should contain consistent data types
  • Missing values should be clearly marked

SPSS converts spreadsheet columns directly into variables, saving significant time.


Numerical Data Handling in SPSS

Numerical data forms the foundation of most statistical analyses. SPSS treats numerical variables differently based on how they are defined in Variable View.

For example, exam scores such as 72, 85, and 90 are meaningful numeric quantities. SPSS can compute averages, variances, and test statistics from them.

If numerical data is accidentally defined as string data, SPSS cannot perform statistical calculations.

Always verify:

  • Decimal settings
  • Measurement level
  • Missing value definitions

Using SPSS Syntax for Data Entry

Although SPSS is menu-driven, it also allows data entry using syntax commands. This is useful for automation and reproducibility.


DATA LIST FREE / Student_ID Age Score.
BEGIN DATA
101 18 72
102 19 85
103 18 90
END DATA.
EXECUTE.

This syntax creates a dataset directly inside SPSS. Each row corresponds to one case, and each value is assigned to a variable.

Using syntax ensures consistency, especially when working with large or repeated analyses.


Common Data Entry Mistakes

Many beginners face issues during data entry. These mistakes often lead to incorrect analysis results.

  • Entering text into numeric variables
  • Skipping variable definitions
  • Misplacing rows and columns
  • Ignoring missing values

Careful data entry prevents costly analytical errors later.


Quiz 1

When is manual data entry most appropriate?

For small datasets or learning examples.


Quiz 2

Why should variable definitions be completed before entering data?

To ensure SPSS interprets data correctly during analysis.


Quiz 3

What happens if numeric data is defined as string?

SPSS cannot perform statistical calculations.


Quiz 4

Which file format is most commonly used for importing data into SPSS?

Excel files.


Quiz 5

Why is SPSS syntax useful?

It allows automation and reproducible analysis.


Mini Practice

Create a dataset with the following numerical variables:

  • Employee_ID
  • Age
  • Monthly_Salary

Enter at least five records using both:

  • Manual data entry
  • SPSS syntax

Define all variables as numeric, use Scale for Age and Salary, and verify data in Data View.


What’s Next

In the next lesson, you will learn about data cleaning basics, where you will identify and correct errors before performing any statistical analysis.