You are on page 1of 49

Objective

Introduction of SPSS
Environment of SPSS
The Process of the data Management : : Variable View
The Process of the data entry : Data View
Sorting the data
Transforming the Data
 Creating Charts, Graph, Table
Three Research Questions
Simple Questionnaire
Uses for SPSS

Data management
 Defining variables
 Coding values
 Entering and editing data
 Creating new variables
 Recoding variables
 Selecting cases

Data analysis
 Univariate statistics
 Bivariate statistics
 Multivariate statistics
Environments of SPSS
The data Management process
Define your variables in Variable View

Name Values
Type Column
Width Align
Decimals Measure
Label
Name

Each variable must have a unique name of not more


than 8 characters and starting with a letter
Try to give meaningful variable names:
 Describing the characteristic: for example, age
 Linking to the questionnaire: for example, A1Q3
Type
Internal formats: Output formats:
 Numeric  Comma
 String (alphanumeric)  Dot
 Date  Scientific notation
 Dollar
 Custom currency
Numeric

Numeric variables:
 Numeric measurements
 Codes
Definition of the size of the variable
String (alphanumeric)

String variables contain words or characters; strings


can include numbers but, taken here as characters,
mathematical operations cannot be applied to them
The maximum size of a string variable is 255
characters
Date

The input format for date variables must be defined,


such as DD/MM/YYYY, MM/DD/YYYY or
MM/DD/YY
Computers store dates as numbers from a base date;
in SPSS, dates are stored as the number of seconds
from 14 October 1582
Example

Create two variables:


 ID: the unique identifier, which will be alphanumeric
with a maximum of 8 characters
 Age: the age of the respondent measured in years, a
discrete variable ranging between 10 and 100
Values

Value labels are descriptors of the categories of a


variable
Coding
Columns and Align

Columns sets the amount of space reserved to


display the contents of the variable in Data View;
generally the default value is adequate
Align sets whether the contents of the variable
appear on the left, centre or right of the cell in Data
View
Numeric variables are right-hand justified by default
and string variables left-hand justified by default; the
defaults are generally adequate
Practice 1

 How would you put the following information into SPSS?


name gender height
sheryl female 5.7
jennifer female 5.4
tara female 5.3
christian male 5.6
jose male 5.8
roberto male 5.7
kasie female 5.5
cady female 5.5
sandy female 5.6
daniel male 6
kurra female 5.4
ashley female 5.4
alain male 6.1
Practice 1 (Solution Sample)

Click
Click
Saving the data
 To save the data file you created simply click ‘file’ and
click ‘save as.’ You can save the file in different forms
by clicking “Save as type.”

Click
Sorting the data
 Click ‘Data’ and then click Sort Cases
Sorting the data (cont’d)
 Double Click ‘Name of the students.’ Then click
ok.

Click

Click
Practice 2
How would you sort the data by the
‘Height’ of students in descending order?
Answer
 Click data, sort cases, double click ‘height of
students,’ click ‘descending,’ and finally click ok.
Transforming data
 Click ‘Transform’ and then click ‘Compute Variable…’
Transforming data (cont’d)
 Example: Adding a new variable named ‘lnheight’ which is
the natural log of height
 Type in lnheight in the ‘Target Variable’ box. Then type in
‘ln(height)’ in the ‘Numeric Expression’ box. Click OK

Click
Transforming data (cont’d)
 A new variable ‘lnheight’ is added to the table
Practice 3
Create a new variable named “sqrtheight”
which is the square root of height.
Answer
The basic analysis
Practice 4
Do a frequency analysis on the
variable “Gender”

Create pie charts for it


Answer

Click
Descriptives
 Click ‘Analyze,’ ‘Descriptive statistics,’ then
click ‘Descriptives…’
 Click ‘Gender and ‘Height and put it into the
variable box.
 Click Options

Click
Descriptives
 The options allows you to analyze other
descriptive statistics besides the mean and Std.
 Click ‘variance’ and ‘kurtosis’
 Finally click ‘Continue’

Click

Click
Descriptives
 Finally Click OK in the Descriptives box. You will
be able to see the result of the analysis.
SAMPLE SURVEY
Research Questions
1. What kind of device do people prefer to own?
2. What color do people prefer for their device?
3. Is device color preference different between males and females?

Survey Questions
4. What is your name?
5. What is your sex?
6. What is your GPA?
7. What is your age?

1. 19 or Younger 2. 20-23 3. 24-27 4. 28- 5. 32 or


31 Over
5. How much do you make in a
month? 1. Less than $1000 2. 3. $1500-$1999 4. $2000-$2499 5. Over
$2500
$1000-$1499
6. What is your class standing?
1. Freshman 2. 3. 4. 5.
Sophomore Junior Senior Graduate
7. What kind of device do you own?
4. 5. Other:
1. Tablet 2. Mac 3. PC Smartphone
8. What color do you like to have for your device?
1. Black 2. Silver 3. Navy Blue 4. White 5. Other:
1. What kind of device do people prefer to own?
2. What color do people prefer for their device?
3. Is device color preference different between males and females?

Research Question # 1
What kind of device do people prefer to own?
Frequency Analysis
Frequency Analysis
Frequencies Output
What kind of device do people prefer to own?

The measures of central tendency (mean, median, and


mode) can be used to summarize various types of
data. Mode can be used for nominal data such as
device type, device color, ethnicity, etc. Mean or
median can be used for interval/ratio data such as test
scores, age, etc. The mean is also useful for data with
a skewed distribution.

Answer: PC
Explanation: Look at question 7 in the Sample Survey. Notice that option 3 is PC. In the
output Statistics table, the mode for Device Owned is 3, which is PC. In addition, the
frequency analysis results for Device Owned indicate that 49 out of 80 people own a PC
device. This can be considered their preference.
Research Question # 2
What color do people prefer for their device?

Crosstabs are used to examine the relationship


between two variables. To answer the second
research question, users will analyze two variables:
Device Owned and Color (which indicates color
preference). Using crosstabs will show the
intersection between these two variables and reveal
the device type and color preferred by most people.
Research Question # 2
Answer: PC in black color
Explanation: As shown in the Crosstabulation matrix above, PC is the most preferred device type from
the row variable (Device Owned). From the column variable (color), black is shown as the most preferred
color. Therefore, you can conclude that most people prefer PC devices that are black.
To select cases for analysis

If you have two or more subject groups in your data and you
want to analyze each subject independently, you can use
the Select Cases option. For example, the data we are
currently analyzing has both male and female participants.
However, if you wish to analyze only female cases, then you
select sex cases and set the condition for female cases only.

1.Switch to the Data Editor window.


2.In Data View, click the Data menu, and then click Select
Case
In the Select Cases: If dialog box, select the sex variable in the left box, and then click the
transfer arrow button to move it to the right box
Click the = button , click the 1 button , and then click the Continue button.
Research Question # 3
Is device color preference different between males and females?

Split File
To answer the third research question, we need to split the file. You can analyze one
particular group of subjects using the Select Cases option. However, if you wish to
compare the response or performance differences by groups within one variable, it
is best to use the Split File option.

To split a file for analysis:


1. Switch to the Data Editor window.
2. In Data View, click the Data menu, and then click Select Cases.
3. In the Select Cases dialog box, in the Select section, select the All cases option
button, and then click the OK button. This removes the select cases option set
in the previous procedure.
4. The Output Viewer window opens, indicating that all cases are included.
Minimize the Output Viewer window.
5. Click the Data menu, and then click Split File
6. In the Split File dialog box, select the sex variable in the left box
7. Select the Compare groups option button.
8. Click the transfer arrow button to move the sex variable to the Groups Based
on box.
9. Click the OK button.
10.The Output Viewer window opens, indicating that the file is split by sex.
Minimize the Output Viewer window.
11.Rerun the crosstabs analysis by following steps 2 through 5 in the Crosstabs
section of this handout. The Output Viewer window opens and displays the
Crosstabulation table

Figure 24 – Split File Output Data

Answer to Research Question # 3


Is device color preference different between males and females?

Answer: Yes
Explanation: There is a device color preference difference based on sex. From the Crosstabulation
output, females prefer PC of other color over the colors black, silver, navy blue, and white. The
male group prefers silver PC devices.
Thank You very Much

You might also like