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

Post on 28-Mar-2015

231 Views

Category:

Documents

6 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Dr. Engr. Sami ur Rahman

Data AnalysisLecture 6: SPSS

Courtesy:

Kevin Schoepp (Zayed University)

Kentaka Aruga

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

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

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

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

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

The basics of managing data files

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

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

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

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

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

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

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

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

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

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

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

Practice 1 (Solution Sample)

Click

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

Click

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

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

Sorting the data

Click ‘Data’ and then click Sort Cases

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

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

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

Transforming data

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

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

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

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

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

Thanks for your attention

top related