Working With Data Editor
Working With Data Editor
Science
Minilik Tsega
Biometrician (M.Sc)
EIAR
01/29/24 1
Data Editor Window
The Data Editor window opens
automatically when you start SPSS
session.
The most important components of the
Data Editor window are menus, toolbar,
and status bar.
The components are displayed in the
picture below:
01/29/24 2
01/29/24 3
Editing User Preferences
SPSS allows you to customize many
aspects of the program to suit your
preferences.
By selecting Options under the Edit menu,
you can change such features as how your
variables are displayed in output, the
format of charts, where page breaks occur
in your output, as well as the font used
etc.
01/29/24 4
Below is the dialog box for option:
01/29/24 5
Reading Data Files
The following are some types of formats which
can be read into SPSS
SPSS (*.sav). SPSS format
01/29/24 6
To read data files, click on File in the menu
bar, and then on Open.
The Open File dialog box is displayed as
shown below:
01/29/24 7
Reading SPSS ,Excel and SAS Data
Files
To read these type of data files :
click on File in the menu bar, then
click on Open then data.
Open the directory under which you saved
your data
Change the file type to your data file type
Point the arrow to the data file you wish to
open and click on it.
Click OK.
01/29/24 8
Reading Text Files
SPSS for Windows can also read raw data
files that are in text format.
Text data files are usually identified by the
".txt" extension.
These data files do not contain any
additional information about the file.
01/29/24 9
Reading A Tab-Delimited Data File
To read in plain text, you simply need to go
to File: Open data then select Tab-
Delimited from the option box "Files of
Type," and locate the file.
01/29/24 10
Gender Age Systolic
F 59 170
M 35 130
M 46 136
F 43 960
To read a text data file, click on File, then
on Read Text Data. The Open File dialog
box opens. Select your file and click OK.
The Text Open Wizard dialog box opens.
01/29/24 11
01/29/24 12
Steps
The Text Open Wizard uses six steps to open any
text file. In the first step you can apply a
predefined format (previously saved in the text
wizard). As this is not the case in our data file, we
check No button in the step
01/29/24 13
Second Step
At this step you are requested
how your variables are arranged (Delimited,
Fixed Width)
If the first row contains variable name or not
(Yes, No)
01/29/24 14
Step Three
At this step you are asked to specify:
The first case of the data begins on which line number
The number of lines representing the case
The number of cases you want to import
01/29/24 15
Step Four
At this step you will requested to modify about
break line of cases and others
01/29/24 16
Step Five
At this step you will be asked to state
specifications for variable's selected in the
data preview i.e. variable name and data
format
01/29/24 17
Step Six
The final Step in which you will conclude
the over all activity by clicking finish
Button
01/29/24 18
Working with the Data
Editor
The Data Editor window can be displayed in one
of the two views: Data View or Variable View.
The Data View displays the contents of the data
file in the form of a spreadsheet.
The Variable View defines all variables in the
data file.
Switching from one view to the other can be
done by clicking the appropriate tab (Data View
or Variable View) at the bottom of the Data
Editor window. (see the picture underneath).
01/29/24 19
01/29/24 20
Data Editor Menus
The menu bar provides easy access to
most SPSS features. It consists of ten
drop-down menus:
01/29/24 21
Data Editor Toolbar
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 etc.
01/29/24 22
The Data View window is a grid,
whose rows represent subjects (or cases) and
whose columns contain values of the
variables (gender, salary, age etc.) for each
subject.
Each cell of the grid, therefore, will usually
contain the score of one particular subject on
one particular variable.
01/29/24 23
01/29/24 24
Status Bar
The status bar at the bottom of each SPSS
window tells what SPSS is currently doing.
In particular, for each procedure you run,
a case counter indicates the number of cases
processed so far.
filter status: messages about the selection of
specified subsets of the data set
weight on indicates that a weight variable is being
used to weight cases for analysis.
SPSS Processor is ready appears in the Status Bar,
tells you SPSS is ready to receive your instructions.
01/29/24 25
Variable view
The Variable view contains descriptions of the
attributes of each variable in the data file.
In the variable view, Rows are variables and
columns are variable attributes.
In this table you can add or delete variables and
modify attributes of variables including variable
name, data type, number of digits, ....
01/29/24 26
01/29/24 27
Variables
The variable name must begin with a letter and
cannot end with a period.
The length of the name cannot exceed 8
characters but not in the latest versions.
Variable names that end with an underscore
should be avoided.
Blanks and special characters can not be used (!,
?,” and *)
To define a variable click the Variable View tab
at the bottom of the Data Editor window. This
will obtain the Variable View window.
01/29/24 28
Enter the new variable name in the column
Name in any blank row. For example, enter the
name gender in the first row. After entering the
name, the default attributes (Type, Width,...)
are automatically assigned. Then if you click on
the Type column, the variable type sub dialog
box appears
01/29/24 29
Variable Type
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 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.
01/29/24 30
Variable Label
Although variable names can only be only
8 characters long (earlier versions),
variable labels can be up to 256
characters long and these descriptive
labels are displayed in output.
01/29/24 31
Value Label
You can assign descriptive value labels for each
value of a variable. It can be up to 60
characters long.
To assign a label:
enter the value in the value text box
enter the label in the label text box then
click on Add
Repeat these steps until you define labels for all
values
Click ok
01/29/24 32
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
01/29/24 33
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
01/29/24 34
01/29/24 35
01/29/24 36