dr. engr. sami ur rahman data analysis lecture 6: spss

28
Dr. Engr. Sami ur Rahman Data Analysis Lecture 6: SPSS

Upload: lilian-pickrell

Post on 28-Mar-2015

231 views

Category:

Documents


6 download

TRANSCRIPT

Page 1: Dr. Engr. Sami ur Rahman Data Analysis Lecture 6: SPSS

Dr. Engr. Sami ur Rahman

Data AnalysisLecture 6: SPSS

Page 2: Dr. Engr. Sami ur Rahman Data Analysis Lecture 6: SPSS

Courtesy:

Kevin Schoepp (Zayed University)

Kentaka Aruga

University Of Malakand | Department of Computer Science | UoMIPS | Dr. Engr. Sami ur Rahman | 2

Page 3: Dr. Engr. Sami ur Rahman Data Analysis Lecture 6: SPSS

Level of Measurement

Scale: A variable when its values are represented with a meaningful metric so that distance comparisons between values are appropriate. Examples: Age in years, Income in thousands of Rupees.

Nominal: A variable when its values are represented with no ranking.Example: Region, zip code, or Political party affiliation.

Ordinal: A variable when its values are represented with some ranking.Example, levels of service satisfaction from highly dissatisfied to highly satisfied.

University Of Malakand | Department of Computer Science | UoMIPS | Dr. Engr. Sami ur Rahman | 7

Page 4: Dr. Engr. Sami ur Rahman Data Analysis Lecture 6: SPSS

Introduction: What is SPSS?

Originally it is an acronym of Statistical Package for the Social Science but now it stands for Statistical Product and Service Solutions

One of the most popular statistical packages which can perform highly complex data manipulation and analysis with simple instructions

University Of Malakand | Department of Computer Science | UoMIPS | Dr. Engr. Sami ur Rahman | 8

Page 5: Dr. Engr. Sami ur Rahman Data Analysis Lecture 6: SPSS

Data Editor

Data Editor

Spreadsheet-like system for defining, entering, editing, and displaying data. Extension of the saved file will be “sav.”

University Of Malakand | Department of Computer Science | UoMIPS | Dr. Engr. Sami ur Rahman | 9

Page 6: Dr. Engr. Sami ur Rahman Data Analysis Lecture 6: SPSS

Output Viewer

Output Viewer

Displays output and errors. Extension of the saved file will be “spv.”

University Of Malakand | Department of Computer Science | UoMIPS | Dr. Engr. Sami ur Rahman | 10

Page 7: Dr. Engr. Sami ur Rahman Data Analysis Lecture 6: SPSS

The basics of managing data files

University Of Malakand | Department of Computer Science | UoMIPS | Dr. Engr. Sami ur Rahman | 11

Page 8: Dr. Engr. Sami ur Rahman Data Analysis Lecture 6: SPSS

Opening SPSS

The default window will have the data editorThere are two sheets in the window:

1. Data view 2. Variable view

University Of Malakand | Department of Computer Science | UoMIPS | Dr. Engr. Sami ur Rahman | 12

Page 9: Dr. Engr. Sami ur Rahman Data Analysis Lecture 6: SPSS

Data View window

The Data View window

This sheet is visible when you first open the Data Editor and this sheet contains the data

Click on the tab labeled Variable View

Click

University Of Malakand | Department of Computer Science | UoMIPS | Dr. Engr. Sami ur Rahman | 13

Page 10: Dr. Engr. Sami ur Rahman Data Analysis Lecture 6: SPSS

Variable View window

This sheet contains information about the data set that is stored with the dataset

NameThe first character of the variable name must be alphabeticVariable names must be unique, and have to be less than 64 characters.

Spaces are NOT allowed.

University Of Malakand | Department of Computer Science | UoMIPS | Dr. Engr. Sami ur Rahman | 14

Page 11: Dr. Engr. Sami ur Rahman Data Analysis Lecture 6: SPSS

Variable View window: Type

TypeClick on the ‘type’ box. The two basic types of variables that you will use are numeric and string. This column enables you to specify the type of variable.

University Of Malakand | Department of Computer Science | UoMIPS | Dr. Engr. Sami ur Rahman | 15

Page 12: Dr. Engr. Sami ur Rahman Data Analysis Lecture 6: SPSS

Variable View window: Width

WidthWidth allows you to determine the number of characters SPSS will allow to be entered for the variable

University Of Malakand | Department of Computer Science | UoMIPS | Dr. Engr. Sami ur Rahman | 16

Page 13: Dr. Engr. Sami ur Rahman Data Analysis Lecture 6: SPSS

Variable View window: Decimals

DecimalsNumber of decimals It has to be less than or equal to 16

3.14159265

University Of Malakand | Department of Computer Science | UoMIPS | Dr. Engr. Sami ur Rahman | 17

Page 14: Dr. Engr. Sami ur Rahman Data Analysis Lecture 6: SPSS

Variable View window: Label

LabelYou can specify the details of the variableYou can write characters with spaces up to 256 characters

University Of Malakand | Department of Computer Science | UoMIPS | Dr. Engr. Sami ur Rahman | 18

Page 15: Dr. Engr. Sami ur Rahman Data Analysis Lecture 6: SPSS

Variable View window: Values

ValuesThis is used and to suggest which numbers represent which categories when the variable represents a category

University Of Malakand | Department of Computer Science | UoMIPS | Dr. Engr. Sami ur Rahman | 19

Page 16: Dr. Engr. Sami ur Rahman Data Analysis Lecture 6: SPSS

Defining the value labels

Click the cell in the values column as shown belowFor the value, and the label, you can put up to 60 characters.After defining the values click add and then click OK.

Click

University Of Malakand | Department of Computer Science | UoMIPS | Dr. Engr. Sami ur Rahman | 20

Page 17: Dr. Engr. Sami ur Rahman Data Analysis Lecture 6: SPSS

Practice 1

How would you put the following information into SPSS?

Value = 1 represents Male and Value = 2 represents Female

Name Gender HeightJAUNITA 2 5.4SALLY 2 5.3DONNA 2 5.6SABRINA 2 5.7JOHN 1 5.7MARK 1 6ERIC 1 6.4BRUCE 1 5.9

University Of Malakand | Department of Computer Science | UoMIPS | Dr. Engr. Sami ur Rahman | 21

Page 18: Dr. Engr. Sami ur Rahman Data Analysis Lecture 6: SPSS

Practice 1 (Solution Sample)

Click

University Of Malakand | Department of Computer Science | UoMIPS | Dr. Engr. Sami ur Rahman | 22

Page 19: Dr. Engr. Sami ur Rahman Data Analysis Lecture 6: SPSS

Click

University Of Malakand | Department of Computer Science | UoMIPS | Dr. Engr. Sami ur Rahman | 23

Page 20: Dr. Engr. Sami ur Rahman Data Analysis Lecture 6: SPSS

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

University Of Malakand | Department of Computer Science | UoMIPS | Dr. Engr. Sami ur Rahman | 24

Page 21: Dr. Engr. Sami ur Rahman Data Analysis Lecture 6: SPSS

Sorting the data

Click ‘Data’ and then click Sort Cases

University Of Malakand | Department of Computer Science | UoMIPS | Dr. Engr. Sami ur Rahman | 25

Page 22: Dr. Engr. Sami ur Rahman Data Analysis Lecture 6: SPSS

Sorting the data (cont’d)

Double Click ‘Name of the students.’ Then click ok.

Click

Click

University Of Malakand | Department of Computer Science | UoMIPS | Dr. Engr. Sami ur Rahman | 26

Page 23: Dr. Engr. Sami ur Rahman Data Analysis Lecture 6: SPSS

Practice 2

How would you sort the data by the ‘Height’ of students in descending order?

AnswerClick data, sort cases, double click ‘height of students,’ click ‘descending,’ and finally click ok.

University Of Malakand | Department of Computer Science | UoMIPS | Dr. Engr. Sami ur Rahman | 27

Page 24: Dr. Engr. Sami ur Rahman Data Analysis Lecture 6: SPSS

Transforming data

Click ‘Transform’ and then click ‘Compute Variable…’

University Of Malakand | Department of Computer Science | UoMIPS | Dr. Engr. Sami ur Rahman | 28

Page 25: Dr. Engr. Sami ur Rahman Data Analysis Lecture 6: SPSS

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

University Of Malakand | Department of Computer Science | UoMIPS | Dr. Engr. Sami ur Rahman | 29

Page 26: Dr. Engr. Sami ur Rahman Data Analysis Lecture 6: SPSS

Transforming data (cont’d)

A new variable ‘lnheight’ is added to the table

University Of Malakand | Department of Computer Science | UoMIPS | Dr. Engr. Sami ur Rahman | 30

Page 27: Dr. Engr. Sami ur Rahman Data Analysis Lecture 6: SPSS

Practice 3

Create a new variable named “sqrtheight” which is the square root of height.

Answer

University Of Malakand | Department of Computer Science | UoMIPS | Dr. Engr. Sami ur Rahman | 31

Page 28: Dr. Engr. Sami ur Rahman Data Analysis Lecture 6: SPSS

Thanks for your attention