You are on page 1of 36

SPSS, Part I

Introduction & Data Management


Objectives
Describe how the SPSS environment is split into 3 windows
Enter data into the Data Editor (Data View)
Define variables in the Data Editor (Variable View)
Import data from excel file
Create new variable
Select cases & split file
Starting IBM SPSS

Step 1

Step 2
The Data Editor – Variable View
The Data Editor – Variable View
Variable

ID Age Gender Smoking STAT Course


Element / Case
1 23 2 No 414
2 24 1 No 505
3 35 1 Yes 414
4 28 2 No 505

Gender: 1 = Female; 2 = Male


Smoking: 1=No; 2 = Yes
STAT Course: 1 = 414 ; 2 = 505
Levels of Measurement

Types of
variables

Quantitative or Qualitative or
Continuous Variables Categorical Variables

Ratio Interval Nominal Ordinal

Levels of measurement Scale Nominal Ordinal


in SPSS
The Data Editor – Variable View
The Data Editor – Variable View
The Data Editor – Variable View
The Data Editor – Variable View
The Data Editor – Data View
Output Window (Statistics Viewer)
Variable Coding
Data Entry Coding
Data Entry Coding
Importing Data from Excel file
 Import Excel File into SPSS

File > Open> Data>Browse to the Folder Where You Saved the Excel file (Make Sure to Change Files of Type to Excel >
Select the File > Click Open > Select the Correct Sheets (If You Have Multiple Sheets) > Uncheck [ Percentage of Values
That Determine Data Type [95] & Ignore Hidden Rows and Column Options > Click Ok > Save Your SPSS File.

You need to check your Level of


measurement for each variable and
to label your qualitative variables
Creating new variables
 Exploring different ways to create new variables or to manipulate existing

variables.

 Transform Compute procedure in SPSS is used to create a quantitative variable

from another quantitative variable(s)

 Transform Recode into different variables procedure in SPSS is used to create a

qualitative variable from another quantitative variable


Creating New Variables

Transform
Procedures Transform
(Recode Into Different
(Compute) variables)

Quantitative Quantitative
Variable Variable
Types of original
variables

Quantitative
Variable

Type of new
variables Quantitative Qualitative
Variable Variable
Example:

1. Compute body mass index (BMI) for the subjects

Answer:

Step 1: Computing the BMI from two quantitative variables Please note that no space is allowed for
the new name
From the menu choose:
Transform Compute Variable Enter the name of the target variable BMI_baseline
Enter the numeric expression… (weight at baseline x 703)/Height2 Click ok

Please select each variable name


from the variable list because it
The BMI formula in SPSS should look
might be different from the
variable label. like this (weight*703)/height**2
Step 1:
Enter the
name of the
new variable Use this pad
(with no exclusively to
space) complete the formula

Step 2:
Select the
original
variables
from the list
2. Classify the study subjects BMI at baseline into the categories indicated in Table 1.1

Answer:

Step 1: Use Transform Record procedure to create BMI groups at baseline (qualitative) from BMI at baseline (quantitative).
Use “Recode into Different Variables” option in order to avoid overwriting the original variable. See the next slide.
3. Indicate the percent of the subjects with overweight __________21.6%___________

4. What percent of the female population have normal weight? _________18.1%__________


Select Cases
Data  Select cases  if condition satisfied  Enter if statement 
continue  Ok
Split File
Data  Split file  Organize output by groups  Move grouping variable
to box  Ok
THANK YOU

You might also like