Sunteți pe pagina 1din 17

INTRODUCTION TO SPSS

Introduction. This material is appropriate for SPSS Windows Version 13. Before
moving ahead to solve problems using SPSS, it is useful to first consider some features
and procedures of SPSS that you might want to use regardless of the problem you are
solving. We will try to be brief because we know this kind of material can be boring, and
we know you can’t wait to experience the excitement and fun that accompanies
analyzing data with SPSS. Nonetheless, this is the best place to talk about these
common elements. If it turns out that you want to learn about SPSS in more detail than
presented here, I recommend reading L. A. Kirkpatrick and B. C. Feeney, A Simple
Guide to SPSS for Windows for Version 12.0 & 13.0, Wadsworth, Belmont, CA, 2006. If
you have a question concerning something I have not covered, it is also worth
consulting the Help function that SPSS offers on the menu bar at the top right of the two
windows it displays, the Data Editor window and the Viewer window.

In much of the material that follows, you will be learning how to use SPSS by interacting
directly with SPSS opened on your own computer. There are two ways for you to do
this. The first is to print the instructional material and refer to it as you interact with
SPSS on your computer. In this method, you will always be in SPSS, ready to input to it
as the instructional material you have on hard copy directs. The instructional material
will be displayed on screen by the web browser in Microsoft Word files. To print the
instructional material displayed on screen, simply click File > Print as you would to
print any Word file. The second method assumes that you have both SPSS and the
SPSS instruction active on your computer, and that you toggle between the two. The
way to toggle is to press Alt+Tab once (hold the Alt key down, press Tab once, then
release both keys). Pressing Alt+Tab once causes the computer to revert to the
previously used application. Thus if you are currently in the active SPSS application
and had just previously been running the SPSS instructional application, when you
press Alt-Tab once, the computer will switch back to the SPSS instructional application,
and vice versa.

Basic Steps in Analyzing Data. Using SPSS makes data analysis very easy. All that
you need to do is:

Enter the data into SPSS. The two most common methods are to enter the data
by typing it directly into the Data Editor; or to open a previously saved SPSS data
file that resides on your computer into the Data Editor. For this instructional
material, we have introduced a third method. We have saved all of the SPSS data
files on our web server. The third method allows you to download the data file from
our web server for any example or problem used in this instruction directly into the
Data Editor.

Select a procedure. Select a statistical analysis or graphing procedure from the


menus at the top of the Data Editor or Viewer to analyze the data or to construct a
graph.

1
Interact with one or more dialog box(es). Selecting a procedure produces one
of more dialog boxes. Input from you to the dialog box(es) fills in the appropriate
details for the procedure to correctly act on your data.

Run the procedure and view the results. Once the details are entered in the
dialog box(es), clicking OK gives SPSS the go-ahead and causes the procedure to
be carried out. The results are displayed in the Viewer.

SPSS Windows. As mentioned previously, SPSS has two windows, the Data Editor
window and the Viewer window. The Data Editor window displays the Data Editor. The
Viewer window displays the output from the Data Editor. You can move from one to the
other by clicking Window on the menu bar at the top of either window and then clicking
either SPSS Data Editor or SPSS Viewer as appropriate.

Data Editor. When you first open SPSS, the Data Editor will appear on screen (you
will be in the Data Editor window). The Data Editor is where you enter, edit, save and
print the data. The Data Editor also allows you to select and run procedures for
analyzing and graphing the data. The results of analyzing or graphing the data are
output from the Data Editor to the Viewer. The Data Editor is presented at start-up
because the first thing you will do to solve a problem or analyze the data from an
experiment with SPSS is to enter the data and specify variable information, such as the
variable(s) name(s). Once the data is entered, analysis or graphing can be carried out
and the results sent to the Viewer for your consideration.

The Data Editor has two possible views, the Data View and the Variable View. When
you first open SPSS, the screen will present either the Data View or the Variable View.
Let’s discuss the Data View first.

Data View. Figure Intro.1 shows the Data Editor displaying the Data View. The
Data View is composed of a data table and a menu bar for performing various
procedures and for getting help if desired. When you first open SPSS or obtain a
new data table, the table will be blank. Note the menu bar at the top of the figure
and the blank data table. There is a tool bar under the menu bar that allows
procedures to be selected by clicking icons instead of using the menu bar. Most of
our discussion will proceed via menus rather than using the tool bar.

2
Figure Intro.1. The Data View at start-up.

Figure Intro.2 shows the Data View of an untitled Data Editor in which I have
entered the scores of 10.00, 12.00, 15.00, 23.00, 18.00, 31.00, 40.00,16.00, 28.00,
and 36.00 for a variable named X, and 7.00, 9.00, 4.00, 14.00, 21.00, 15.00,
10.00,13.00, 18.00, and 5.00 for the variable named Y. I will show you how to
enter data and name variables a little latter in this section.

From this figure, you can see that the Data View shows a table where each column
pertains to a variable. In columns that contain data, each column displays the
variable name and under the variable name, the values for that variable. These
variables and values could be ones from an experiment you have conducted or
from a homework problem. At the top of the screen, there is a menu bar that
permits data entry, editing, saving and printing, procedure selection (transforming
the data, analyzing the data, graphing the data, etc), and getting help should you
have questions. We will discuss some of these functions a little later in this general
section, and the rest as appropriate in conjunction with data from specific
experiments or problems. I hope you will like and be excited by how easily, quickly,
accurately and esthetically you can accomplish these functions using SPSS.

3
Figure Intro.2. The Data View showing two variables, X and Y, and the values of each
variable.

Variable View. The Variable View of the Data Editor is shown in Figure Intro.3. It
is obtained by clicking the Variable View tab at the bottom left of the Data View.
Clicking the Data View tab when the screen is displaying the Variable View will
produce the Data View. Like the Data View, the Variable View displays a table;
only in this table each row represents a variable, giving its name and other
important information about the variable. As with the Data View table, when you
open SPSS or obtain a new data table, the table presented in the Variable View is
blank. When you enter numeric data into the Data View, SPSS gives the data a
variable name and assumes the variable is a numeric variable. You can also give
the variables names of your own choosing. Generally, it is better to name the
variables yourself. We will explain why in a later section. In the table displayed in
Figure Intro.3, I have entered the names of two variables, X, and Y. The remaining
entries shown are the default entries that SPSS gives to each numeric variable.

4
Figure Intro.3. The Variable View showing the names of two variables, X and Y, along
with other information concerning each variable.

Entering Data by Typing Directly into the Data Editor. Data is entered via the Data
Editor, Data View. Let’s assume that you have the following IQ scores that you desire
to enter.

IQ: 100, 105, 118, 120, 123.

We will further assume that you have just opened SPSS, that you have a blank Data
Editor, Data View on screen, and the highlighted cell is the upper left cell (intersection of
row 1and the 1st column). Now, please open SPSS on your computer, and verify that
the display is as assumed. Next enter the data into your Data Editor as instructed
below.

Type 100 in the


highlighted cell.

Press Enter. Notice that 100.00 is entered in the cell, SPSS gives
the variable the name VAR00001, and the cursor
moves to row 2. The default for numeric variables is 2
decimal places; so SPSS automatically adds .00 to the

5
score of 100 that you entered. Note that the score
value that you typed into the cell is not actually entered
into the cell until you press Enter.
Type 105>Press Enter.

Type 118>Press Enter.

Type 120>Press Enter.

Type 123>Press Enter.

The display on your computer should look like that shown in Figure Intro.4.

Figure Intro.4. Five scores entered into the Data Editor

When you enter data into the Data Editor, SPSS automatically gives the variable a
name. The first variable gets the name, VAR00001. The next variable would get the
name VAR00002, etc. As mentioned earlier, it is often better to assign your own name.
Assigning your own name often makes the output more meaningful and helps navigate
dialog boxes when there are multiple variables. Let’s now assign our own name by
changing VAR00001 to IQ. To do so:

Click the Variable View tab in This displays the Variable View on screen with
the lower left corner. the cell containing the name VAR00001

6
highlighted.

Type IQ in the highlighted cell.

Press Enter. IQ is entered as the variable name, replacing


VAR00001.

The display on your computer should now look like Figure Intro.5.

Figure Intro.5. Variable View with IQ entered as the variable name.

Note that when you change the name of a variable in the Variable View screen, that
name change is carried through in the Data View table as well. Figure Intro.6 shows the
Data View. Note the name of the variable is now IQ. Compare your Data View with
Figure Intro.6 by

Clicking the Data View tab. Clicking the Data View tab produces the Data View.

7
Figure Intro.6. Data View showing the scores with IQ as the variable name.

Variable names. Variable names must begin with a letter. The rest of the
characters can be any letter, any digit, a period, or the symbols _, @, #, or $.
Variable names cannot exceed 64 characters and cannot end with a period.
Typically, variable names do not exceed 8-10 characters.

Saving Data Files. It is a good idea when you have finished entering the data and
naming the variable to save the data file. This is because any changes to data files
made in a session, including initial data input, only last as long as the session, unless
you save the file. Let’s assume you have just entered the data shown in Figure Intro.6
and the variable has been named IQ, and that you are in the Data View. Let’s assume
further that we wish to save this file under the name, IQexp (exp standing for
experiment). You don’t need to add the extension .sav because SPSS does this
automatically. To save this file on your computer with the name IQexp, do the following:

Click File on the menu bar at the This produces a drop-down menu.
top of the screen.

Click Save on the drop-down This produces the Save Data As dialog box
menu. with the cursor located in the File name: box.
This dialog box is shown in Figure Intro.7.

8
Note that the folders and files that are
displayed in the large box contain material
already saved, and can vary widely from
computer to computer.

Type IQexp in the File name: box.

Click the Save button. SPSS saves the file, adding the extension
.sav. (If you were modifying a previously
saved file, SPSS would overwrite the previous
file.) You are then returned to the Data View
with the name of the data file, IQexp.sav
entered in the title bar at the top left of the
screen. This is shown below in Figure Intro.8.

Figure Intro.7. : Save Data As dialog box.

9
Figure Intro.8. Data View showing the file name IQexp.sav in the title bar at the top left
of the screen.

The default for file type on the Save Data As dialog box is appropriate for saving SPSS
data files in a format such that SPSS will read them. However, SPSS allows saving
data in many other formats to be read by other applications such as Excel, etc., so be
sure the Save as type: box has entered in it SPSS (*.sav) before clicking the Save
button. This is the default, and is the correct extension for our use.

Printing a Data File. There are occasions when you may want to obtain hard copy of a
data file. For instance, your instructor might want you to hand copies of the data files as
part of a homework assignment. Let’s assume you want to print the data file
IQexp.sav, that it is currently loaded into the Data Editor and you are in the Data View.
To print this file,

Click File. This produces a drop-down menu.

Select Print…. This produces the Print dialog box.

Click OK on the Print dialog box. SPSS sends the file IQexp.sav to your
printer which then prints it.

10
Obtaining a New (Blank) Data Editor. When you have finished analyzing the data for
one problem or experiment, and you want to move on to another problem, it will be
necessary for you to enter the data of the new problem. If the Data Editor already
contains a data file and you are going to type the new data directly into the Data Editor,
it is useful to first obtain a new or blank Data Editor into which you can enter the new
data. To illustrate how to do this, we will assume that you are in the Data Editor,
displaying the Data View and you have a saved data file already entered in the data
table. To obtain a new (blank) Data Editor,

Click File. This produces a drop-down menu.

Select New. This produces another drop-down menu.

Click Data. SPSS displays a new (blank) Data Editor.

Entering Data by Opening Saved Data Files that are Stored on Your Computer.
We have already discussed entering Data by directly typing it into the Data Editor.
Another way to enter data is by opening a saved data file stored on your computer into
the Data Editor. To illustrate how to do so, let’s assume you have a blank Data Editor
on screen. As you now know, this can be accomplished by obtaining a new Data Editor.
It also occurs when you first open SPSS. Let’s further assume that you desire to enter
the saved data file, IQexp.sav and that this file is stored on your computer. To do so,

Click File on the menu bar at This produces a drop-down menu.


the top of the screen.

Select Open on the drop-down This also produces a drop-down menu.


menu.

Click Data…. This produces the Open File dialog box shown
below in Figure Intro.9. Be sure the Look in:
box displays the folder that contains the SPSS
data file you want to open. If not, browse until
you have the correct folder. Note, the files
shown in the Open File dialog box will vary
greatly from computer to computer, and with
the folder that is displayed in the Look in: box.

Click IQexp located in the IQexp appears in the File name: box. Note,
large rectangular box of the SPSS does not include the extension .sav in
Open File dialog box. its directory for any of the saved files.
rectangular box of the Open
dialog box. SPSS loads the data file IQexp.sav into the
Data Editor. Your Data Editor should now look
Click the Open button on the like that shown in Figure Intro.10.

11
Open File dialog box.
box.

Figure Intro.9. Open File dialog box.

12
Figure Intro.10. The Data Editor after opening the file IQexp.sav.

In the fourth step of the previous sequence, instead of clicking IQexp, you could have
directly typed IQexp in the File name: box. Another alternative is to double click IQexp.
If you chose this alternative, SPSS loads IQexp into the Data Editor, bypassing the
“Click the open button” step.

Note that if the new data is already saved in an SPSS data file, you don’t need to first
obtain a new Data Editor before opening the saved file. You can just open the saved
file from Data Editor containing the old data file, and SPSS will overwrite it. If the Data
Editor contains data that is not saved, or altered data in a previously saved file, before
overwriting the data, SPSS will ask you if you want to save it.

Downloading from the Web, the Saved Data File for the Example or Problem that
You Are Solving. When the problem or example you are solving is displayed on
screen by the browser, at the appropriate place in the solution, the display will provide
you with a link that you can click to download the saved data file for that problem or
example directly into the SPSS Data Editor residing on your computer. If SPSS is not
running, SPSS will be activated and the Data Editor will appear on screen with the
saved data file loaded into it. If SPSS is already running, but not displayed on screen,
the display will shift to SPSS, showing the Data Editor with the saved data file loaded

13
into it. When this occurs, you should return to the instructional material and continue
with the example or problem solution.

Downloading all of the Saved Data Files from the Web at One Time using Zipped
files. This is an optional step. If you chose to do this, it is a one time procedure. Once
completed, you will have all the saved data files residing on your computer, located in
the folder you have chosen. Thereafter, any time you want to open one of these saved
data files for an example or problem you are solving with SPSS, you will follow the
procedure given in the section titled, “Entering Data by Opening Saved Data Files that
are Stored on Your Computer.” To download all the saved data files from the web,
click Download all SPSS files located on the Book Companion Site and follow the
ensuing instructions.

Analyzing Data. Let’s assume that you want to compute the mean, standard deviation,
and range of the scores contained in the data file IQexp.sav. The first thing you need
to do is load IQexp.sav into the Data Editor. You already know how to do this, so let’s
also assume that your computer screen is showing the Data Editor/Data View and that it
contains IQexp.sav. To compute the mean, standard deviation and range of scores in
this file,

Click Analyze on the menu bar at This produces a drop-down menu.


the top of the screen.

Select Descriptive Statistics. This produces another drop-down menu.

Click Descriptives…. This produces the Descriptives dialog


box.

Click the ► button in the middle of This moves IQ from the large box on the
the dialog box. left into the Variable(s) box on the right. If
the data had multiple variables, they would
be listed in the large box on the left and
you would select the variable(s) that you
wanted analyzed first before clicking the ►
button. SPSS would then move all
selected variables to the Variable(s) box
on the right. SPSS analyses are only
carried out on the variables located in the
Variable(s) box.

Click the Options button at the This produces the Descriptions: Options
bottom right of the dialog box. dialog box.

Click on all boxes with  in them to The  entries tell SPSS which statistics to
remove all default  entries. compute.

14
Click in the boxes to the left of This produces a  in those boxes and tells
Mean, Std deviation, and Range. SPSS to compute the mean, standard
deviation, and range of the IQ scores when
given the OK to do so.

Click Continue. This returns you to the Descriptions


dialog box.

Click OK. SPSS then analyzes the data and displays


the results in the SPSS Viewer. Pretty
nifty, eh what!

The results for this problem show that the Range = 23.00, Mean = 113.2000, and Std.
Deviation (Standard Deviation) = 10.08464. The Descriptive Statistics table also
shows that N = 5. These results are shown below in Figure Intro.11.

Figure Intro.11. SPSS Viewer showing the results of the analysis.

SPSS Viewer. All graphs and the results of all statistical analyses are displayed in the
Viewer. Results from the first analysis will be displayed at the top of the large part of
the window. Results from the next analysis will be displayed below the results from the
first analysis and so forth. Figure Intro.12 shows the results of two successive analyses
displayed in the Viewer. The analysis performed on VAR00001 was conducted first

15
Figure Intro.12. The results of two successive analyses shown on the Viewer.

and the analysis on VAR00002 second. From this discussion, it should be obvious that
the results of the most recent analysis will always be the bottommost output on the
Viewer window. SPSS does not erase previous output before displaying current output!
When you do several analyses in one session, the output screen can get confusing.
Sometimes it is desirable to clear the output screen of prior output or even part of the
current output when some of the output is not needed. This is where the outline part on
left side of the Viewer is useful. If you click on an entry in the outline, like Title, the
entry Title is selected, and the corresponding section of the output in the large window
is surrounded by a box telling you what is in the Title section. You can now delete this
entire section by pressing the Del (the delete key) on the keyboard. This applies to any
of the outline entries. If you want to eliminate the entire output for a particular analysis,
just click the first entry in the outline section for that analysis, e.g., Descriptives. Doing
so will put boxes around all of the output for that analysis. Then hit Del and the entire
output for that analysis will be deleted. By judicious selection, you can edit the Viewer
so that just what you want is left displayed on the screen. This can be particularly
useful when printing output for homework assignments and in keeping the Viewer
output simple and meaningful.

Printing Output from the Viewer. To print output from the Viewer,

Click File on the menu bar at This produces a drop-down menu.


the top of the Viewer.

Click Print…. This produces the Print dialog box.

Click OK on the dialog box. This sends all of the output on the Viewer to your

16
printer which your printer then prints.

It is possible to print selected output using the Print dialog box, but we recommend
doing the editing of the Viewer in SPSS and then printing the entire Viewer screen.

Exiting from SPSS. There are several ways to exit from SPSS. One way is to click
File on the menu bar of either the Data Editor or Viewer. Then click Exit on the drop-
down menu. Another way is to click the (close) button in the upper right corner of
X
either screen. If you haven’t saved your work (data, analyses, graphs, or output) you
will be prompted about whether you want to save it. Answer the dialog box(es) as
appropriate. After doing so, SPSS will close. If you have saved your work before
exiting, when you click Exit or click the button, SPSS will immediately close.
X

17

S-ar putea să vă placă și