0% found this document useful (0 votes)
9 views45 pages

Statistical Computing I-1

Uploaded by

yonasante2121
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views45 pages

Statistical Computing I-1

Uploaded by

yonasante2121
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 45

BONGA UNIVERSITY

DEPARTMENT OF STATISTICS
STATISTICAL COMPUTING
1. INTRODUCTION TO SPSS

May 27, 2024 Yehuluemebet S.


Overview Of SPSS
SPSS is a statistical package for beginning, intermediate, and
advanced data analysis.
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
 descriptive statistics such as frequencies, central tendency, plot
charts, and others; and

May 27, 2024 Yehuluemebet S.


Overview. . .
 sophisticated inferential and multivariate statistical
procedures, such as analysis of variance (ANOVA), factor
analysis, cluster analysis, and categorical data analysis based on
logit and probit model.

 SPSS can be used to analyse data from surveys, tests,


observations, etc.
Almost all commands and options can be accessed using pull
down menus at the top of the window, and the program opens
to a spread sheet which looks similar to that of Microsoft Excel.

May 27, 2024 Yehuluemebet S.


How to start and exit SPSS
Opening SPSS
Use one of the following approaches to open SPSS
1. Click on the Start button, then click Programs, then SPSS Inc for
windows and finally SPSS 20.0 for windows icon.

May 27, 2024 Yehuluemebet S.


Cont. . .
2. double-clicking the SPSS icon on the desktop
 The initial SPSS screen should appear, showing the Data
Editor window, with the Data View window on top, and a tab at
the foot of the screen giving access to the Variable View
window.
 This is superimposed by a smaller window headed IBM SPSS
Statistics for Windows which you can temporarily discard by
clicking on the Cancel button.

 You can switch between Data View and Variable View by


clicking the appropriate tab.

May 27, 2024 Yehuluemebet S.


Opening SPSS

May 27, 2024 Yehuluemebet S.


Exit SPSS
Before we start looking at data organisation, it is important
to know how to exit from SPSS. The process is similar to
quitting from most other Windows applications:
 Select File from the main SPSS menu bar, and then Exit.
 SPSS will ask you if you want to save any unsaved files. At
this point there should not be any need to save any work, but
consult the relevant sections of this workbook on saving files if
there are any open files.
 Restart SPSS so that you can continue with the rest of this
workbook.

May 27, 2024 Yehuluemebet S.


SPSS Windows & Menus
The four most common windows in SPSS are:
1. Data Editor window
2. Output /Viewer/ window
3. Syntax Editor window
4. Chart editor window

May 27, 2024 Yehuluemebet S.


1.Data Editor window
This window opens automatically when you start SPSS.
 This window displays the contents of the current (working) data
file.
 We can create new data files or modify existing ones with the Data
Editor. This window has two views called data and variable view
 Data View displays the data in a spread sheet format with variable
names listed for column headings.
 Variable View which displays information about the variables in
your data set.
In the Data View you can edit or enter data, and in the Variable View
you can change the format of a variable, add format and variable
labels, etc

May 27, 2024 Yehuluemebet S.


2. Output /Viewer/ window
This window displays the results of any statistical procedures
that we run and other text.
 In particular, tables, statistics, and charts are displayed in the
Viewer window.
 A Viewer window opens automatically the first time you run a
procedure that generates output.
This window is not accessible until output has been generated.

May 27, 2024 Yehuluemebet S.


3. Chart Editor Window
This window is used to edit charts and plots.
It is only displayed after SPSS has been requested to produce a
plot
 We can use this window to change the colours, select different
type fonts or sizes, rotate axes, change the chart type, and the
like.

May 27, 2024 Yehuluemebet S.


4. Syntax Editor Window
Most SPSS commands are accessible from the SPSS menus
and dialog boxes.
However, some commands and options are available only by using
the SPSS command language.
In this case the Syntax Window is used.
We can also use this window if you wish to run SPSS commands
instead of clicking on the pull-down menus.
Using the Syntax editor
Click ‟Analyse‟, „Descriptive statistics‟, then click „Frequencies‟.
Put VARIABLE ‟ in the Variable(s) box.
Then click –‟Charts', 'Bar charts‟, and click Continue.
Click -‟Paste‟.

May 27, 2024 Yehuluemebet S.


SPSS Menus

The Menu bar lists pull down menu, grouping the


available SPSS commands. Some of these have sub-
menus.
The menu bar provides easy access to most SPSS
features.

May 27, 2024 Yehuluemebet S.


Data Editor Menu:
 File. Use the File menu to create a new SPSS file, open an existing
file, or read in spreadsheet or database files created by other
software programs (e.g., Excel).
 Edit. Use the Edit menu to modify or copy data and output files.
 View. Choose which buttons are available in the window or how
the window should look.
 Data. Use the Data menu to make changes to SPSS data files, such
as merging files, transposing variables, or creating subsets of cases
for subset analysis.

May 27, 2024 Yehuluemebet S.


 Transform. Use the Transform menu to make changes to selected
variables in the data file (e.g., to recode a variable) and to compute
new variables based on existing variables.
 Analyze. Use the Analyze menu to select the various statistical
procedures you want to use, such as descriptive statistics, cross-
tabulation, hypothesis testing and regression analysis.
 Graphs. Use the Graphs menu to display the data using bar charts,
histograms, scatter plots, box plots, or other graphical displays . All
graphs can be customized with the Chart Editor.
 Utilities. Use the Utilities menu to view variable labels for each
variable.
 Add-ons. Information about other SPSS software.
 Window. Choose which window you want to view.
 Help. Index of help topics, tutorials, SPSS home page, Statistics
coach, and version of SPSS.

May 27, 2024 Yehuluemebet S.


Data Editor Menus

May 27, 2024 Yehuluemebet S.


Output/Viewer Menu-Specific menu
Output Menus are similar to Data Editor menu,
but has two additional options:
Insert. Use the insert menu to edit your output
Format. Use the format menu to change the
format of your output.

May 27, 2024 Yehuluemebet S.


Chart Editor- Specific Menus

Gallery. Use the Galley menu to change the chart type.


Chart. Use the Chart menu to modify layout and labeling
characteristics of your chart.
Series. Use the Series menu to select data series and
categories to display or omit.
Format. Use the Format menu to select fill patterns,
colors, line styles, bar style, bar label styles, interpolation
type, and text fonts and sizes. You can also swap axes of
plots, explode one or more slices of a pie chart, change the
treatment of missing values in lines, and rotate 3-D scatter
plots.

May 27, 2024 Yehuluemebet S.


Syntax Editor -specific menu

Run. Use the Run menu to run the selected


commands.

May 27, 2024 Yehuluemebet S.


Toolbars
 The toolbar, located just below the menu bar on the Data Editor
window. , provides quick and easy access to many frequently used
facilities
 Clicking once on any of these buttons allows you to perform an action,
such as opening a data file, or selecting a chart for editing.
 In order to determine the function of a tool, place the mouse pointer
over the corresponding button, but don't click the mouse button.
 SPSS displays a brief description of the tool in the Status Bar

May 27, 2024 Yehuluemebet S.


May 27, 2024 Yehuluemebet S.
File Types

Data Files. A file with an extension of .sav is assumed to


be a data file in SPSS for Windows format. A file with an
extension of .por is a portable SPSS data file. The contents
of a data file are displayed in the Data Editor window.
Viewer (Output) Files. A file with an extension of .spv is
assumed to be a Viewer file containing statistical results
and graphs.
Syntax (Command) Files. A file with an extension of .sps
is assumed to be a Syntax file containing spss syntax and
commands.

May 27, 2024 Yehuluemebet S.


The Status Bar

The status bar at the bottom of each SPSS window tells what
SPSS is currently doing.
The Status Bar runs along the bottom of a window and alerts
the user to the status of the system. Typical messages one
will see are “SPSS Processor is ready”,
“Running procedure…”. The Status Bar will also provide up-
to-date information concerning special manipulations of the
data file like whether only certain cases are being used in an
analysis or if the data has been weighted according to the
value of some variable.

May 27, 2024 Yehuluemebet S.


Entering Data in SPSS

May 27, 2024 Yehuluemebet S.



Data Editor Window
The Data Editor window opens automatically when you start an
SPSS session.
The most important components of the Data Editor window are
menus, toolbar, and status bar.
The Data Editor provides a convenient, spreadsheet-like method
for creating and editing data files.
The Data Editor provides two views of your data:
 Data View. This view displays the actual data values or
defined value labels.
 Variable View. This view displays variable definition
information, including defined variable and value labels, data
type (for example, string, date, or numeric), measurement
level(nominal, ordinal, or scale), and user-defined missing
values.
In both views, you can add, change, and delete information that
is 27,
May contained
2024 in the data file.
Yehuluemebet S.
Data view
Many of the features of Data View are similar to the features that
are found in spreadsheet applications. There are, however,
several important distinctions:
Rows are cases. Each row represents a case or an observation.
For example, each individual respondent to a questionnaire is
a case.
 Columns are variables. Each column represents a variable or
characteristic that is being measured. For example, each item
on a questionnaire is a variable.
Cells contain values. Each cell contains a single value of a
variable for a case. The cell is where the case and the variable
intersect. Cells contain only data values. Unlike spreadsheet
programs, cells in the Data Editor cannot contain formulas.

May 27, 2024 Yehuluemebet S.


Data view
The data file is rectangular. The dimensions of the data file
are determined by the number of cases and variables. You can
enter data in any cell. If you enter data in a cell outside the
boundaries of the defined data file, the data rectangle is
extended to include any rows and/or columns between that
cell and the file boundaries.
There are no “empty” cells within the boundaries of the data
file. For numeric variables, blank cells are converted to the
system-missing value. For string variables, a blank is
considered a valid value.

May 27, 2024 Yehuluemebet S.


Data view window

May 27, 2024 Yehuluemebet S.


Variable view
Click on the tab labeled Variable View
This sheet contains information about the data set that is stored
with the dataset
Variable View contains descriptions of the attributes of each
variable in the data file. In Variable View:
 Rows are variables.
Columns are variable attributes.
You can add or delete variables and modify attributes of
variables, including the following attributes: Variable name,
Data type, Number of digits or characters, Number of decimal
places, Descriptive variable and value labels, User-defined
missing values, Column width, Measurement level.
All of these attributes are saved when you save the data file.

May 27, 2024 Yehuluemebet S.


Variable view

May 27, 2024 Yehuluemebet S.


Variable View
Defining Variables
Make the Data Editor the active window.
Click the Variable View tab.
 To define new variables, enter a variable name in any blank
row.
Select the attribute(s) that you want to define or modify.

May 27, 2024 Yehuluemebet S.


Variable View
-Defining Variables
Variable Name
The first character of the variable name must be alphabetic
Each variable name must be unique; duplication is not allowed.
May have up to 8 characters, including letters, numbers, and the
symbols (@, #, _, or $).
Variable names cannot end with a period.
Variable names that end with an underscore should be avoided.
The certain key words are reversed and may not be used as variable
names, e.g. “compute”, “sum” and so forth.
Ex. Subject_ID, but not “subject-ID”, and not “Subject ID”.
Variable names cannot contain spaces

May 27, 2024 Yehuluemebet S.


Variable View
Variable Type
this column enables you to specify the type of variable.
Numeric , Comma and dot – you can enter values with any
number of decimal positions. The data editor displays only the
defined number of decimal positions
String – used to hold alphanumeric / texte values
Date – you can use slashes, dashes, spaces. Commas, or periods
as delimiters between day, month and year. ( dd/mm/yy)
Time : you can use colons, periods or spaces.

May 27, 2024 Yehuluemebet S.


Variable View
-Width
Width
Width allows you to determine the number of characters
SPSS will allow to be entered for the variable

May 27, 2024 Yehuluemebet S.


Variable View
- Decimals
Number of decimals
It has to be less than or equal to 16

May 27, 2024 Yehuluemebet S.


Variable View
-Label
You can specify the details of the variable
You can write characters with spaces up to 256
characters

May 27, 2024 Yehuluemebet S.


Variable View
- Values
 This is used and to suggest which numbers represent
which categories when the variable represents a category
 Instead of typing into the computer the full answer to
each question, codes are typed in (e.g., 1 if the respondent
is female, 2 if male).
 Codes are usually numerical, because this is what most
statistical software expects, and using only numerical
codes makes data entry faster.

May 27, 2024 Yehuluemebet S.


Variable View
-Label
Defining the value labels
 Click the cell in the values column as shown below
 For the value, and the label, you can put up to 60 characters.
 After defining the values click add and then click OK.

Click

May 27, 2024 Yehuluemebet S.


Missing Values
Defines missing values
The values are excluded from some analysis
Options:
Up to 3 discrete missing values
A range of missing values plus one discrete missing
value

May 27, 2024 Yehuluemebet S.


Missing Values
With SPSS, there are two forms of missing values: system-missing

and user defined missing.


System-missing values are those that SPSS automatically treats as

missing. The most common form of this type of value is when there
is a "blank" in the data file.
User-defined missing values are those that the user specifically

informs SPSS to treat as missing. Rather than leaving a blank in the


data file, numbers are often entered that are meant to represent data

May 27, 2024 Yehuluemebet S.


Steps to define missing values
Select the cell which is the intersection of missing value

attribute and the variable you need


Click the wizard button

In the dialog box displayed,


 You can set up to 3 discrete missing values

 range plus one discrete missing values

Finally click ok

May 27, 2024 Yehuluemebet S.


Columns and Align

Column Width
You can specify a number of characters for the column
width. Column widths can also be changed in Data View by
clicking and dragging the column borders.
Column formats affect only the display of values in the Data
Editor. Changing the column width does not change the
defined width of a variable.
Variable Alignment
Alignment controls the display of data values and/or value
labels in Data View. The default
alignment is right for numeric variables and left for string
variables. This setting affects only the display in Data View.
May 27, 2024 Yehuluemebet S.
Variable View
-Measure
Indicates the level of measurement.

The Measure of variables in the dataset is important:

There are four level of measurements


1. Nominal: objects or people are categorized according to some criterion
(gender, job category)

2. Ordinal: Categories which are ranked according to characteristics


(income- low, moderate, high), -level of satisfaction

3. Interval: contain equal distance between units of measure- but no


zero (calendar years, temperature)

4. Ratio: has an absolute zero and consistent intervals (distance, weight)

May 27, 2024 Yehuluemebet S.


Variable View
-Measure

 Since SPSS does NOT differentiate between interval and ratio levels

of measurement, both of these quantitative variable types are


lumped together as “Scale”.
 Nominal and ordinal levels of measurement ARE differentiated.
 The default for string variables is Nominal
 The default for numeric variables is Scale

May 27, 2024 Yehuluemebet S.

You might also like