Using SPSS: Introduction

38
1 Using SPSS: Introduction Department of Operations Weatherhead School of Management

description

Using SPSS: Introduction. Department of Operations Weatherhead School of Management. Opening SPSS in the Comp. Lab. Start → All Programs → [ Analytical & Statistical ] → SPSS 20 → IBM SPSS Statistics . Click. Click. Double Click. Starting SPSS. - PowerPoint PPT Presentation

Transcript of Using SPSS: Introduction

Page 1: Using SPSS:  Introduction

1

Using SPSS: Introduction

Department of OperationsWeatherhead School of Management

Page 2: Using SPSS:  Introduction

2

Opening SPSS in the Comp. Lab Start → All Programs → [ Analytical & Statistical ] → SPSS 20

→ IBM SPSS Statistics

Click

Click

Double Click

Page 3: Using SPSS:  Introduction

3

Starting SPSS When you first start SPSS, you will see…

Here, you can open an existing file.

Here, you can create a new file.

Or you can ignore this dialog by click- ing CANCEL

Page 4: Using SPSS:  Introduction

4

Layout of SPSS Then you will see the main menu of SPSS

There are two sheets in the window 1. Data view 2. Variable view

Data ViewVariable View

Menu Bar

Tool Bar

Page 5: Using SPSS:  Introduction

5

Entering Data in the Data View Window

Name of the variable

Click

To change the name of a variable, you must change to the Variable View window.

Page 6: Using SPSS:  Introduction

6

Variable View Window

This sheet contains information about the way the data set are stored.

Page 7: Using SPSS:  Introduction

Variable View WindowName

This is where you can type the name you want for a variable. The first character of the variable name must be alphabetic. Variable names must be unique, and have to be less than 64

characters. Spaces are NOT allowed. Variable names that end with an underscore should be avoided. Certain key words are reserved and cannot be used as variable names, e.g. “compute”, “sum” and so forth.

Page 8: Using SPSS:  Introduction

Variable View WindowType

Click HereYou will see the “type” box

Page 9: Using SPSS:  Introduction

Variable View WindowType (Cont.)

This column enables you to specify the type of data to be stored in this variable.

The two basic types of variables that you will use are numeric and string.

String variables may contain letters or numbers. For string values a blank is considered a valid value.

Numeric operations on the string variables are NOT be allowed, e.g. finding the mean, variance, standard deviation, etc…

Page 10: Using SPSS:  Introduction

Variable View WindowWidth

The number of characters SPSS allows for a data value to be stored in this variable.

For a numerical value with decimals, this total width has to include a position for each decimal, as well as one for the decimal point.

Type the number you want or click the Up and Down arrows.

Page 11: Using SPSS:  Introduction

Variable View WindowDecimals

This is the number of decimal digits you want to display. It has to be less than or equal to 16. If more decimals have been entered or computed by SPSS,

the additional information will be retained internally but not displayed on the screen.

Type the number you want or click the Up and Down arrows.

Page 12: Using SPSS:  Introduction

Variable View WindowLabel

A sequence to characters used to identify in detail what a variable represents.

Limited to 256 characters. May contain spaces and punctuation.

Double click,then type in.

Page 13: Using SPSS:  Introduction

Variable View WindowValues

This is used and to associate an integer to a qualitative value when the variable is qualitative (see the next slide).

Page 14: Using SPSS:  Introduction

Variable View WindowValues (Cont.)

Click HereYou will see the “Value” box

Page 15: Using SPSS:  Introduction

Variable View WindowValues (Cont.)

Type in the code/number.

Then type in the label.

Click “Add”.

You will see the definition in this window.

When finished, click “OK”.

Here Value = 1 represents Male and Value = 0 represents Female

Click

Click

Page 16: Using SPSS:  Introduction

Variable View WindowValues (Cont.)

Now change to the Data View window … Here are the Values Click on the “toe tag” icon The values change to…

Click

Page 17: Using SPSS:  Introduction

Variable View WindowMissing

Click HereYou will see the “Missing” box

Signal to SPSS which data should be treated as missing.

System Missing data – SPSS display a single period.

Page 18: Using SPSS:  Introduction

Variable View WindowColumns

How wide the column should be for each variable. Columns affect only the display of values in the Data Editor.

Changing the column width does not change the defined width of a variable.

Type in the number you want or click the Up and Down arrows.

Page 19: Using SPSS:  Introduction

Variable View WindowAlign

This determines the data alignment in the Data View window.

Page 20: Using SPSS:  Introduction

Variable View WindowMeasure

Indicates whether the values of this variable are: Quantitative (“Scale) Qualitative (“Nominal” and “Ordinal”, which are

treated differently).

Page 21: Using SPSS:  Introduction

21

Creating an SPSS Data File

Click “File” in Menu Bar.

Then click “New”.

Then click “Data”.

Page 22: Using SPSS:  Introduction

22

Opening an Existing a SPSS file

Click “File” in Menu Bar.

Then click “Open”.

Then click “Data”.

OR click “Open Data Doc” icon in the Tool Bar.

Click

Page 23: Using SPSS:  Introduction

Opening an Existing SPSS file (Cont.)

Then you will see the “Open Data” window…

Change the location in the "Look in" box to the subdirectory where your file is.

Select the file. Click on the “Open” button.

Click

All SPSS files end with “.sav”

Page 24: Using SPSS:  Introduction

Opening an Existing SPSS file (Cont.)

You will see the data appear in the Data Editor window

and more information about the variables in the Variable View window.

Page 25: Using SPSS:  Introduction

25

Opening an Existing EXCEL File Get the “Open Data” window (just like opening an SPSS file). And change the location in the "Look in" box to the subdirectory where

your file is.

Use the "Files of type" to selectExcel (*.xls, *.xlsx, *.xlsm) files.

Page 26: Using SPSS:  Introduction

26

Opening an Existing EXCEL File (Cont.) Select the file. Click the “Open” button.

You will be asked about the location of the variable names.

Click “OK”

Page 27: Using SPSS:  Introduction

27

Opening an Existing EXCEL File (Cont.) You will see the data appear in the Data Editor window

There are some errors here…

Page 28: Using SPSS:  Introduction

28

Opening an Existing EXCEL File (Cont.) Here is the original Excel file stereo.xls. Some Excel formatting cannot be read in SPSS.

Prepare the Excel file before importing it...

Page 29: Using SPSS:  Introduction

29

Opening an Existing EXCEL File (Cont.) Here are the four general steps when importing Excel data.

Close the Excel file before you try to import it in SPSS. Arrange the data in a rectangular grid. Don't mix strings and numbers. Put variable names in your first row.

This works…

Page 30: Using SPSS:  Introduction

30

Opening an Existing EXCEL File (Cont.) You may need to modify some of the variable

definitions (in the Variable View)

These three variables are useless…

Page 31: Using SPSS:  Introduction

31

Saving an SPSS File

Click “File” in Menu Bar.

Then click “Save”.

OR double click “Save Data Doc” icon in Tool Bar.

Click

Page 32: Using SPSS:  Introduction

Saving an SPSS File (Cont.) Then you will see the “Save Data” window…

Change the location in the "Look in" box to the subdirectory where your want to save the file.

Type in the file name . Click on the “Save” button.

Click

By default, SPSS will add a “.sav” extension to the file name.

Page 33: Using SPSS:  Introduction

Saving an SPSS File (Cont.) If you want, you can choose the variables you want to save…

Click the “Variables” button. You will get the “Variables” window. Choose the desired variables, then click “Continue”

Click

Click

Click

Page 34: Using SPSS:  Introduction

Saving an SPSS File (Cont.) Here are two different saved SPSS files from one data set…

Page 35: Using SPSS:  Introduction

35

Saving Data as an Excel File

Click “File” in Menu Bar.

Then click “Save As”.

Then you will see the “Save Data” window

Page 36: Using SPSS:  Introduction

36

Saving Data as an Excel File (Cont.)

Use the ”Save as type" to select Excel (*.xlsx) files. The other steps are same as saving an SPSS file.

Page 37: Using SPSS:  Introduction

37

Saving Data as an Excel File (Cont.) Here is the saved Excel file example.