Demystifying SPSS…it’s not as complicated
as you might think.
Dr. Christine Gregory
February 2011
• Open SPSS
• Entering data & defining variables
• Open, import and save data files
• Saving output files
• Summarising data using descriptive statistics
ASK Week Spring 2011
DEFINING VARIABLES
ASK Week Spring 2011
0
0
1
0
1
1
0
1
0
1
0 = Male
1 = Female
1
1
2
1
1
1
3
4
1
2
1 = tfl (i.e. public transport)
2 = Car
3 = Cycle
4 = Walk
3
Indicate your level of agreement with
2
the following question: 4
5
“Most days, my commute causes me 5
4
to feel stressed when I arrive at 2
university”. 1
3
2
1 = Strongly Disagree
2 = Disagree
3 = I don’t know
4 = Agree
5 = Strongly Agree
Now, let’s define our variables
Levels of Measurement
Data
Categorical Scale
Qualitative Quantitative
Nominal Ordinal Discrete Continuous
(Unranked categories) (Ranked categories) (Not possible to take (Possible to take
fractional values) fractional values)
Marital Status Satisfaction level
Political Party Level of agreement No. of cars Height
Eye Color No. of students Weight
• In SPSS, data is either Nominal, Ordinal or Scale.
• It is essential to classify data correctly.
- Incorrect classification will result in incorrect analyses.
10
Identify the level of measurement for each variable
ASK Week Spring 2011
Identify the level of measurement for each variable
0 = Male
ASK Week Spring 2011
1 = Female
Identify the level of measurement for each variable
ASK Week Spring 2011
Identify the level of measurement for each variable
1 = tfl (i.e. public transport)
2 = Car
3 = Cycle
ASK Week Spring 2011 4 = Walk
Identify the level of measurement for each variable
1 = Strongly Disagree
2 = Disagree
3 = I don’t know
4 = Agree
ASK Week Spring 2011 5 = Strongly Agree
ENTERING DATA
ASK Week Spring 2011
Opening SPSS 15.0
Always open SPSS first, then open or type in data.
Choose ONE
Open a data file from
SPSS OR Excel
ASK Week Spring 2011
Now, let’s enter our data
Saving your SPSS files
• Save in one of YOUR folders
• Name file appropriately
• Choose correct file extension
Save as type:
.sav for data files
.spo for output files
ASK Week Spring 2011
Output File
• Shows output for ALL analysis run in SPSS
• Keeps a log of all activity of open data files
• Saved with the extension .spo
Everything done in SPSS is A data file was saved as test.sav.
shown here, in outline form. This was recorded in the log here.
ASK Week Spring 2011
Creating a NEW Data File
ASK Week Spring 2011
Opening data in SPSS 15.0
Open existing SPSS data file
ASK Week Spring 2011
IMPORTING DATA
…from Excel
ASK Week Spring 2011
Importing data from Excel
• The file MUST BE .xls NOT .xlsx
• Variable names CAN be imported too
• Must be in row 1 of the worksheet
• Must begin with a letter
• No spaces and no special characters (except _ )
• Data will appear in SPSS data editor
ASK Week Spring 2011
For Example. Importing data from Excel.
Filename (.xls)
Variable names
(Row 1)
Sheet1 contains the dataset
ASK Week Spring 2011
Importing data into SPSS 15.0
Open existing data
ASK Week Spring 2011
For Example. Importing data from Excel.
Filename (.xls)
Select All Files
to see your .xls
ASK Week Spring 2011
For Example. Importing data from Excel.
Tick here if
variable names
are in row 1.
Is this range correct?
If NOT
Enter correct range here
ASK Week Spring 2011
For Example. Importing data from Excel.
Variable names
(from Row 1)
View all data
View and define
variables
ASK Week Spring 2011
SUMMARISING DATA
Representing data Numerically
ASK Week Spring 2011
Summarising Variables Numerically
Categorical – Nominal or Ordinal
Categorical
1 Variable
e.g., Gender
Frequency table
Mode and/or Median
use Frequencies in SPSS
ASK Week Spring 2011
Summarising Variables Numerically
Categorical – Nominal or Ordinal
ASK Week Spring 2011
Summarising Variables Numerically
Categorical – Nominal or Ordinal
Categorical
2 Variables
e.g., Stress by Gender
Contingency table
use Crosstabs in SPSS
ASK Week Spring 2011
Summarising Variables Numerically
Categorical – Nominal or Ordinal
ASK Week Spring 2011
Summarising Variables Numerically
Categorical – Nominal or Ordinal
ASK Week Spring 2011
Summarising Variables Numerically
Quantitative – Scale
Quantitative
1 Variable
e.g., Travel time (min)
Descriptive Stats
use Frequencies or
Descriptive Statistics in SPSS
ASK Week Spring 2011
Summarising Variables Numerically
Quantitative – Scale
Descriptives
option
Frequencies
option
ASK Week Spring 2011
Summarising Variables Numerically
Quantitative – Scale
Quantitative
Quantitative
by
Categorical
e.g., Travel time by
Mode of travel
Descriptive Stats
use Explore in SPSS
ASK Week Spring 2011
Summarising Variables Numerically
Quantitative – Scale
DESCRIPTIVE STATISTICS
Describing and presenting data using SPSS
ASK Week Spring 2011
“I am very satisfied with my current position.”
Strongly Neutral Strongly
Disagree Agree
1 2 3 4 5
Level of Measurement?
ASK Week Spring 2011
Categorical – Nominal or Ordinal
Categorical
1 Variable
e.g., Job Satisfaction
Frequency table
Mode and/or Median
use Frequencies in SPSS
ASK Week Spring 2011
Descriptive Statistics Menu
Statistics
Charts
• Bar
• Pie
• Histogram
Frequency tables
ASK Week Spring 2011
Frequencies. Multiple scale and/or categorical variables.
ONLY
appropriate for
categorical variables
ASK Week Spring 2011
Frequencies Output. Job Satisfaction Item 1
• ONLY a frequency table was outputted.
• Did not request statistics for these categorical variables
Percent = (Frequency)/(Total B) Valid Percent = (Frequency)/(Total A)
Total A
Total B
ASK Week Spring 2011
What is your ethnicity? Gender
(please tick one) (please tick one)
White/European Male
Asian Female
West Indian
African
Level of Measurement?
ASK Week Spring 2011
Categorical – Nominal or Ordinal
Categorical
2 Variables
e.g., Ethnicity by
Gender
Contingency table
use Crosstabs in SPSS
ASK Week Spring 2011
Descriptive Statistics Menu
Contingency table
(Counts or %’s)
•Observed tallies
• Expected tallies
Crosstab statistics
• Chi-square
• Correlations
Clustered bar charts
ASK Week Spring 2011
Crosstabs. Ethnic group by Gender
Add 1 or more
categorical
variables for row
and column
Output
One crosstabs table
between each row
and column variable
SPSS helps out by
identifying which
stats should be
used on certain
data types
ASK Week Spring 2011
Crosstabs Output. Ethnic group by Gender
Case Processing Summary
Cases
Valid Missing Total
N Percent N Percent N Percent
Ethnic Group * Gender 70 100.0% 0 .0% 70 100.0%
Ethnic Group * Gender Crosstabulation
Gender
female male Total
Ethnic White/European Count 22 14 36
Observed
Group Expected Count 20.1 15.9 36.0 Expected
% of Total 31.4% 20.0% 51.4%
% out of 70
Asian Count 8 10 18
Expected Count 10.0 8.0 18.0
% of Total 11.4% 14.3% 25.7%
West Indian Count 8 6 14
Expected Count 7.8 6.2 14.0
% of Total 11.4% 8.6% 20.0%
African Count 1 1 2
Expected Count 1.1 .9 2.0
% of Total 1.4% 1.4% 2.9%
Total Count 39 31 70
Expected Count 39.0 31.0 70.0
% of Total 55.7% 44.3% 100.0%
ASK Week Spring 2011
What is your gross annual income?
Level of Measurement?
Summarising Variables Numerically
Quantitative – Scale
Quantitative
1 Variable
e.g., Gross Annual Income
Descriptive Stats
use Frequencies or
Descriptive Statistics in SPSS
ASK Week Spring 2011
Descriptive Statistics Menu
Statistics
Charts
• Bar
• Pie
• Histogram
Frequency tables
ASK Week Spring 2011
Frequencies Output. Gross Annual Income
• Descriptive statistics
• Histogram with normal curve overlay.
Statistics
Gross Annual Income
N Valid 68
Missing 2
Mean 7819.12
Median 7800.00
Mode 6800a
Std. Deviation 997.947
Variance 995897.7
Skewness .370
Std. Error of Skewness .291
Kurtosis -.294
Std. Error of Kurtosis .574
Range 4600
Minimum 5900
Maximum 10500
Percentiles Q1 25 6925.00
(Quartiles) Q2 50 7800.00
Q3 75 8675.00
a. Multiple modes exist. The smallest value is shown
Messages appear at the bottom
ASK Week Spring 2011
Descriptive Statistics Menu
Limited statistics
• Mean, SE of Mean
• Stdev, Variance
• Range, Min, Max
• Skewness, Kurtosis
ASK Week Spring 2011
Descriptives. Analyse scale variables.
• Appropriate for scale variables ONLY.
• Offers fewer statistics than Frequencies.
Calculates the z-values for each
variable and saves as a new variable.
ASK Week Spring 2011
Descriptives Output. Gross annual income and Age last birthday
Standardised values
saved as variables:
Z-values for Gross
Annual Income
ASK Week Spring 2011
Summarise the gross annual income of
male and female employees, separately.
Level of Measurement?
Summarising Variables Numerically
Quantitative – Scale
Quantitative
Quantitative
by
Categorical
e.g., Gross Annual Income by
Gender
Descriptive Stats
use Explore in SPSS
ASK Week Spring 2011
Descriptive Statistics Menu
Statistics
Plots
• Boxplots
• Stem-and-leaf
• Histogram
• Normality plots
ASK Week Spring 2011
Explore. Examine each scale variable by each categorical variable.
Add 1 or more
Output scale variables here
Statistics ONLY
Plots ONLY
or Both
Outputs most
descriptives
Add 1 or more
offered under
categorical
Frequencies
variables here
K-S test for normality for
each group within each
Factor variable for each
Dependent variable
ASK Week Spring 2011
Explore Output. Exam Performance by Gender
Explore Output. Exam Performance by Gender
SPSS Course at University of Colorado at Colorado Springs:
http://www.uccs.edu/~faculty/lbecker/SPSS/content.htm
SPSS Tutorials (lots of links on this site):
http://www.uccs.edu/~faculty/lbecker/SPSS/content.htm
SPSS On-Line Training Workshops (tutorials & videos):
http://calcnet.mth.cmich.edu/org/spss/toc.htm
ASK Week Spring 2011
SPSS Survival Manual, 4th Edition (2010) by Julie Pallant.
(For SPSS Version 15 or later)
Discovering Statistics Using SPSS, 3rd Edition (2009) by Andy Field.
(For SPSS Version 15 or later)
ASK Week Spring 2011
• Stats & SPSS drop-in.
(If more time is needed we’ll make an appointment)
• Undergraduates:
Friday 12.00-13.00
ASK area, ground floor of library
• Post Graduates:
Thursdays 13.30-15.00
Graduate School Training Room
(it’s in with the offices on the top floor)
ASK Week Spring 2011
THE END
ASK Week Spring 2011