# SPSS Overview

### Text-only Preview

**Prof. Kalyan Sengupta, PhD.**

www.weanalyst.com

**SPSS 16 For Windows**

**1. Introduction of SPSS screen**

Variables

Case

Data View

Variables View

**Figure 1 : SPSS 16 Screen**

2.

**Opening a data file**:

2.1. Menu Option:

**File | Open | Open Data**(Opens File Dialog Box)

Change File of Type from here to select

non-SPSS file.

**Data file types which can**

be opened in SPSS are:

be opened in SPSS are

SPSS ( *.sav)

SPSS/PC+ (*.sys)

Sysstat (*.syd, *.sys)

SPSS Portable (*.por)

Excel file (*.xls, *.xlsx, *xlsm)

Lotus (*.w)

Sylk (*.slk)

Dbase file (*.dbf)

SAS (*.sas7bdat, *.sd7, *sd2, SSd01, *xpt)

Stata (*.dta)

Text (*.txt, *.dat)

**Figure 2 : Open Data Screen**

W e A n a l y s t

PAGE ‐ 1

**Prof. Kalyan Sengupta, PhD.**

www.weanalyst.com

3.

**The Data Editor Screen**: (Figure 1 : SPSS 16 Screen )

3.1. Looks like spreadsheet. Variables name at the top and data are placed

in rows and columns.

3.2. Each row represents a case.

3.3. Each column represents a variable.

4.

**Can define a variable by using**

4.1.

**Data I Define Variable**. Then enter Variable Name.

Use this to select and

unselect the data.

Left screen of data is not

selected where as right

screen is selected from

scan

Measurement Scale can be

Data can be numeric

changed

/string /date/currency etc.

**Field width**may be set

4.2. Click

**Continue**to change data format

with the decimal places

Click

**Labels**to assign

descriptive variable and

value labels

**Value labels**may be

typed in as for example,

Employment Category for

each value,

**value label**

may be added ego

1 ="Clerical"

2="Officer"

3="Manager”

W e A n a l y s t

PAGE ‐ 2

**Prof. Kalyan Sengupta, PhD.**

www.weanalyst.com

4.3. Click

**Missing Values**to specify codes for missing values. Data might

contain some missing values, as because

•

A respondent refused to answer

•

The question did not apply to that respondent.

The missing values are excluded from most calculations. In the

**Missing Values**window, can define

•

no missing values

•

Discrete missing values

**5. Inserting New cases:**

Select any cell in the row, below the positio

Select any cell in the row, below the

n in

positio

n in

whic

whi h you want to insert th

h you wa

e new

nt to insert th

ca

e new

se.

ca

•

**Right click and click “Ins**

**Right click a**

**ert Case**

**nd click “Ins**

**” or**

**ert Case**

**” or**

•

**Data I Insert case**

**Edit I Insert case**.

.

A new row is

A new ro

inse

w is

rted for th

inse

e ca

rted for th

se.

e ca

Select any cell in the column to the right of the

position where you want to insert the new

variable.

•

**Right click and click “Insert**

**Variables” or**

**6. Inserting New Variables:**

•

**Edit | insert Variable**.

W e A n a l y s t

PAGE ‐ 3

**Prof. Kalyan Sengupta, PhD.**

www.weanalyst.com

**7. Edit the data**

**Search for data:**

Select any case or variable you want to search

**Edit I find -> search dialog box**.

Enter the data value you want to find

Click search for ward or search

backward.

Go to case:

**Edit I go to case**( Enter the row

number for the case and Click

**OK )**

**8. Compute a variable (Transform I Compute )**

It can compute the values of a variable or a new variable. There are over 70 built-in

functions, which may be used during computation.

The formula of Numeric

Expression can be

composed from variable list

and the functions, Eg. Total

=Basic +DA + HRA

Logical functions can also be

inserted in computing a

Type name of the

variable.

single Target

Click If -> If cases dialog box

variable

Click "Include if case'

satisfies condition:"

**Types & Label button.**

Compose the logical

Label is optional, which describes a variable.

expression

By default, new computed variables are

Eg. JobCat = 3 & sex = 1

numeric.

This can be changed to string if you are doing

string operation

Click OK after all Operation

W e A n a l y s t

PAGE ‐ 4

**Prof. Kalyan Sengupta, PhD.**

www.weanalyst.com

**9. Count Occurrences (Transform I Count Value within case):**

Creates a variable that counts the occurrences of the same values in list of

variables for each case .For example reading of newspapers may be noted

in the survey by check boxes (Yes l No) for each one, say Statesman,

Telegraph, etc.

Enter a Target variable name

Select two or more variables of the same type (numeric or string)

Click define values and specify which value or values to be counted

If Cases Dialog Box (optional) for defining subset of cases.

**10. Recording Value (Transform | Recode into Different Variables)**

Can modify data values by recording

them. Useful for collapsing or

combining categories.

Select the variable you want to

recode

Enter an output (new) variable name

Click old and new values

You can recode Ole single values,

ranges of values and missing values

**11. Rank Cases (Transform | Rank Cases)**

This creates new values containing ranks, normal and percentile values for numeric variables .

Select one or more variables to rank

Optionally,

You can rank cases in ascending or descending order

Organize rankings into subgroups by selecting one or more values

Rank Cases – Tiles

This dialog box controls the method for assigning rankings to cases with the same

value on the original variable.

The following table shows how the different methods assign ranks to tied value 5 :

Value

Mean

Low High Sequential

10 1 1 1 1

15 3 2 4 2

15 3 2 4 2

15 3 2 4 2

16 5 5 5 3

20 6 6 6 4

W e A n a l y s t

PAGE ‐ 5

**Prof. Kalyan Sengupta, PhD.**

www.weanalyst.com

**12. Aggregate Data (Data I Aggregate)**

Combines groups of cases into simple summery cases, and creates a new

aggregate. Cases are aggregated based on the values of one or more grouping

variables. The new data file contains one case for each group.

**Steps:**

Data I Aggregate Select break variable

Select one or more aggregate variable

Select an aggregate function for each aggregate variable

Enter new variable name and label

**13. Split File ( Data I Split File )**

This separates the data file into separate groups for analysis, based on some

group variable.

**Steps:**

Data I Split File

Select Compare Groups or Organize Output by Groups

Select Group Variable

**14. Select Cases (Data | Select Cases)**

This provides several 21 methods for selecting a

subgroup of cases based on criteria that include

Variables and Complex expressions.

You can also select a random sample of cases.

The criteria used to define a subgroup can

include variable values and ranges, case

numbers, arithmetic, logical expressions,

functions etc.

The unselected cases may be filtered or

deleted. The filtered cases remain In the data

file but are excluded from the analysis.

SPSS creates a Filtered Variable filter-$, to

indicate tile filter status. Filtered cases are also

indicated by a slash (/) through the row number.

To get them all back, select all classes.

Deleted cases are removed from the data file

and cannot be recovered, if you save the data

file after deleting the cases.

Click here to select the case on the basis of

Random sampling may be performed by

some condition

selecting Random Sample of Classes. Two

By clicking on “if” window which will come is

options of available:

shown in next figure

Approximately 1 0 % of all cases

Exactly 20 cases from the first 100 cases.

W e A n a l y s t

PAGE ‐ 6

**Prof. Kalyan Sengupta, PhD.**

www.weanalyst.com

Select the criteria, Eg.

(gender = ‘m’ & Jobcat = 2)

**15. Charts of SPSS (Charts | Legacy Dialogs)**

Charts are obtained from graphs menu, bar, line, area, pie, histogram, scatter plots

are often used.

**15.1. Bars**

These may be drawn in three ways – single, cluster and stacked

Charts data may be selected with the option of

• Summaries for groups of cases

• Summaries for separate variable

• Values of individual cases

For a simple Bar chart, with summaries of group of cases, simply enter a variable

in the category axis, say, grade. The four bars corresponding to four .categories

will appear.

For a simple bar chart with summaries of a variable. add the summary parameter.

(say, mean age) . To do this, click on Option "Other Summary Functions" and add

age variable.

For a clustered Bar chart, with summaries of group of cases, for example, enter

Category axis as grade, and define cluster by sex.

For a cluster Bar chart, with summaries of separate variables, for example, enter

grade in the Category axis, and mean age, mean income in the Bars Represents

text box.

W e A n a l y s t

PAGE ‐ 7

**Prof. Kalyan Sengupta, PhD.**

www.weanalyst.com

**15.2. Line Chart**

Three types of Line charts are available, -Simple, Multiple, DropLine. Selection of

simple and multiple charts are similar to those of bar charts. The DorpLine chart

indicates the positions of two or more groups on vertical lines.

**15.3. Scatter Plots**

The Highlight the relationship between two quantitative variables, by plotting the

actual values along two axes. They of1en allow to see the bivariate relationships,

such as a curvilinear pattern, that descriptive statistics do not reveal. To obtain

scatter plot:

**15.4. Graphs | Scatter**

The scatter plot dialogue box has four options: simple, overlay, matrix, 3-D.

For simple scatter plot, only enter x-axis and y-axis variables. Two other options:

Set Markers By: Select a variable to determine the categories that will be shown on

the chart, each value of the variable is B different color or marker symbol on the

scatter plot.

Label cases by : Select a variable to provide labe.ls for each marker. The value

label of each case is placed above the point on the scatter plot. If there is no value

label, the actual value \'\~Il be placed above the point.

**15.5. Matrix scatter Plot**

Select Two or more numeric variables to define cells of the matrix. There is one

row end column for each variable. Each cell contains a simple scatter plot of the

row variable 2nd !lie column variable.

**15.6. Overlay Scatter Plots**

Select two or more numeric x-y variable pairs. Each pair of variables is plotted on

the same scatter plot with a separate marker symbol. To swap the y-x variables,

select a pair and Click "Swap pair".

**15.7. 3-D Scatter plot**

Select variables for y-axis, x-axis and z-axis. A 3-D diagram will be created.

**15.8. Histogram**

Enter the command graph | Histogram

Select a variable for histogram. You get bars showing the data divided into several

evenly spaced intervals. Height of each bar shows the number of cases in each

interval.

**15.9. Pie Chart**

This can be obtained for three different data sets as in case of bar chart

Summaries of groups of cases: This option will show slices for each group value.

Enter tile grouping variables, say grade; into “Define Slices By” text box.

This pie chart will show the case counts for each group values on the slices. In

case you want any summary variable to show, click “Other Summer Summary

Functions” and enter a summary variable (say, mean age).

Summaries of Separate Variables: For this you enter a list of summary variables to

indicate each slice.

W e A n a l y s t

PAGE ‐ 8

**Prof. Kalyan Sengupta, PhD.**

www.weanalyst.com

Values of Individual Cases: This can be formed by selecting a numeric variable to

"Slice Represent”. Label the slice by case number.

**15.10. Box**

**Plots**

A Box Plot characterizes tile distribution of a variable, displaying its median and

quartiles. Special symbols identify the positions of outliers, if any. Box Plots may be

simple or clustered.

For a simple Box Plot, with summaries of groups of cases, enter the variable you

want to plot and enter the grouping variable in the category axis. There will be a

box for each value of the group.

For a cluster Box Plot, with summ8rie5 of groups of cases, enter the variable you

want to plot. The category variable and a variable to define cluster by (say, sex)

should also be defined. For each category, two boxes for male and female will be

shown.

**16. To Obtain Descriptive and statistics (Analyze | Descriptive Statistics | Descriptive)**

Select the variables of your analysis

Select Statistics you want to output

Select Charts to plot bar or pie or histogram,

**17. To obtain Cross Tabulation (Analyze | Descriptive Statistics | Crosstabs)**

Select one or more row variables and column variables

Optionally, select one or more layer variables

Set parameters of Statistics, Cells and Format.

**18. To Obtain Means (Analyze | Descriptive Statistics | Means)**

Select one or more variables

Optionally, select grouping variables (independent list)

Set options for Cell Statistics.

**19. T - Test**

**19.1. To Obtain Independent Samples T – Test (Analyze | Compare**

**Means | Independent Samples T-Test)**

Select one or more test variables

Select a grouping variable

Click "Define Groups" to specify two codes for the groups you want to

compare

**19.2. To Obtain Paired Samples T-Test (Analyze | Compare Means |**

**Paired Samples T-Test)**

Select a pair of variables you want to test

May click Options to control treatment of missing data and the level of

confidence internal.

**19.3. To Obtain One Sample T-Test (Analyze | Compare Means | One**

**Samples T-Test)**

Select one or more variables to be tested

Enter 8 numeric test value against whict1 eact1 sample mean is compared.

W e A n a l y s t

PAGE ‐ 9

**Prof. Kalyan Sengupta, PhD.**

www.weanalyst.com

**20. To Obtain One Way Analysis of Variance (Analyze | Compare Means | One Way**

**ANOVA)**

Select one or more variables you want to test

Select a single grouping variable.

**21. Correlation:**

If two variables are suspected to be linearly related, then the question arises to

what extent they are related. Correlation co-efficient gives a measure of the degree

of linearity among two variables.

**SPSS Step**

Analyze I Correlate I Bivarate

Select Pearsonian and/or Kendall's t3U and/or Spearman's rank correlation

Decide which test are you going to perform; one-tailed or two-tailed.

Flag significant correlation to detect 'which correlation significantly differs from zero

Click "Options"

Select Statistics | Mean and S.D.

Click "OK".

**22. Regression Analysis**

If a set of variables (independent) are suspected to influence any other variable

(dependent) • then by a statistical technique we can find the relationship between

them by some optimal probabilistic way and use it to predict the value of the

dependent variable for a given set of values of the independent variables.

**Linear Regression:**This is the regression method where we assume linear

relationship between the variables. Linear regression can be fitted by two methods:

a) Enter or simple method

b) Stepwise method where the best set of repressors are used to predict the

dependent variable.

SPSS Steps

SPSS Steps

Open the Data Sheet

Select

from

menu

**Analyze | Regression | Linear**

Select one Dependent variable

Select independent variables

Select "Enter" method

Click "Plot" to produce partial plots

Click "Statistics" to obtain

• Regression coefficients

• Q Model fit, R squared value

Click "Save” store the following in the data sheet

• Unstandardized predicted value

• Unstandardized

residuals

Click "Options" to treat the missing values

**Stepwise Regression:**Same SPSS Linear regression with enter method, except

specify the method as Stepwise. In Options, F-to-change may be selected and

entered. But normally the default value is used.

W e A n a l y s t

PAGE ‐ 10