Вы находитесь на странице: 1из 31

Four

SPSS: An Introduction
102
4.1 WHAT IS SPSS?
Statistical Package for Social Sciences.
It is an interactive user-friendly statistical package.
It comprises of two parts
Data editor creating and modifying data sets;
Statistical procedures analyzing the given data sets.
103
4.2 FOUR STEPS IN DATA ANALYSIS USING SPSS
(1) Get your data into the Data Editor.
You can open a previously saved data le; read a spreadsheet, text le,
or database; or enter your data directly in the Data Editor.
(2) Select a procedure from the menu to create tables, calculate statistics,
or create charts.
(3) Select the variables you want to use in the analysis.
The variables in the data le are displayed in a dialog box for the pro-
cedure.
(4) Run the procedure and study the results.
104
4.3 HOW TO START SPSS IN WINDOWS 7
Double click the following icon in the desktop to activate SPSS:
Alternatively:
Start" Program" IBM SPSS Statistics" IBM SPSS Statistics 22".
After SPSS starts, the following window will appear:
105
106
4.4 ENTERING DATA INTO THE DATA EDITOR
Step 1 Activate the tab labeled Variable View" at the bottom of the
Data Editor.
In the name column, dene ve variables: Subject, Gender,
Exam1, Exam2, and HWGrade.
A new variable will be created after we type a name in a new
line.
Specify the variable type, variable label and value labels.
107
Specifying the type of data
108
Specifying label
Label the variable Gender" as Sex of the subject".
Label Exam1" as Exam 1 Mark".
Label Exam2" as Exam 2 Mark".
Label HWGrade" as Homework Grade".
109
Specifying Value Labels
Give a label to the corresponding value of the variable.
This is very useful for qualitative variables.
110
Step 2 Switch to Data View" by clicking the tab in the lower left of
the screen.
Type in the data in a way similar to entering data in an Excel
le.
When it is done, Data Editor" should look like the following:
111
4.5 HANDLING DATA FILES
Saving a data le
File" Save As ...".
In the Save In" box, select the appropriate directory.
Enter the le name and click Save".
112
Importing a data le
File" Open" Data ...".
In the Files of Type" box, select the appropriate Type.
It can be a SPSS (*.sav), Excel (*.xls), SAS, or Text (*.txt) le.
Open".
For Excel les, check the box if variable names are given in the
rst row.
113
Importing a xed format data le
File" Read Text Data".
Choose the le (ex4.1fw.txt) and click Open" Next".
Choose Fixed width".
114
Click Yes" if the variable names are found in the 1st line.
Click Next".
Specify the line number of the rst case and the number of lines
representing a case.
Specify the number of cases to be imported. Click Next".
115
Set the variable break lines.
For example:
id: cols 1-2; gender: col 3; exam1: cols 4-6, exam2: cols 7-9,
and hw_grade: col 10.
Set the variable break lines between cols 2 & 3, between cols
3 & 4, between cols 6 & 7, between cols 9 & 10.
116
Click Next" Finish".
Highlight the variable column and change the variable name
and data format if you want.
Click Next" Finish".
117
4.6 EDITING DATA FILES
Insert a variable
In the Variable View" windows, move the cursor to the row
where you want to insert the new variable.
Edit" Insert Variable".
118
Modify the specications (such as Type", Label" and so on) of
the new variables.
119
Remove a variable
In the Variable View" window, highlight the row corresponds
to the variable which you want to remove.
Edit" Clear".
120
Select cases
In the Data View" window, Data" Select Cases ..." . . .
Check If conditions is satised" and then click the If" icon.
121
Choose the variable for the condition (Gender) and state the con-
dition (Gender =F").
Click Continue" and then OK".
122
Statistical Analysis will be done on those cases with filter_$
value equal to 1.
123
Merge les: Add cases
Open one of the les that you want to merge.
Data View" Data" Merge Files Add Cases...".
Choose the le either from External SPSS data le" or from An
open dataset".
124
Click OK".
125
Sorting a le
Data" Sort Cases ...".
Sort a le according to an index variable (Subject" is used as the
index variable).
126
Merge les: Add variables
Sort ALL the les that we want to merge according to the index
variable.
Open one of the sorted les.
Data View" Data" Merge Files Add Variables...".
Continue" OK".
The data set ex4.1sort after merging with ex4.1 IQsort:
127
128
Transformation on Numerical Expression
Suppose we want to create a new variable which represents the
average mark of exam 1 and exam 2 marks.
Transform" Compute Variable ...".
Click OK".
129
Transformation: Recode
Suppose we want to create a new variable FinalGrade" which
takes A" if the average mark >= 90, B" if the average mark
>=85 and <90, C" for the other values of the average mark.
Transform" Recode" Into Different Variable".
130
Give a name and label to the new variable.
Click Change".
Click Old and New Values ...".
Specify the range of the old value and the corresponding new
value.
131
Click Add".
Complete specifying all the ranges, then Continue" OK".
132

Вам также может понравиться