
Introduction to SPSS
Download: Spss Data Text Data | Evaluation

Objectives: This is the first of the SPSS short course series. The series is designed for beginning users who want to get started with the program and experienced users who want to refresh the basics of the program. After this course, you should be able to:
1. Understand the file structure of SPSS.
2. Be familiar with data access via SPSS.
3. Manage data sets in SPSS.
4. Perform simple statistical analysis and graphing procedures.
5. Perform statistical analysis with the General Linear Model procedure of SPSS and
be familiar with the output.
Topics for this session:
I. What is SPSS?
II. Who Can Use SPSS for Windows?
III. SPSS Windows and Files
IV. Editing Options
V. Getting Data into SPSS
VI. Saving Data in SPSS
SPSS stands for the "Statistical Package for the Social Sciences." It is composed of two inter-related facets, the statistical package itself and SPSS language, a system of syntax used to execute commands and procedures. Likewise, there are two approaches to using SPSS: (a) via the Graphical User Interface (GUI), a point-and-click approach already familiar to Windows users and (b) via the use of SPSS programming syntax. Most users will find a combination of these approaches most effective in carrying out their data analyses. SPSS is available in multiple computing environments. At the University of North Texas, we have obtained the licenses of the software for different operating systems including Windows (98, Me, XP, NT 4.0 or 2000), Mac OSX, and UNIX. In this series, we will focus on SPSS for Windows, which is a complete data analysis program with many capabilities and applications. The only limitation to SPSS for Windows is the hardware that it is run on. The requirements for PCs and Macs are:
| Windows | Mac |
|---|---|
| Pentium-class processor 100MB hard drive space 64MB RAM minimum SVGA monitor |
PowerMacintosh G3 233MHz or faster (350MHz
recommended) 250MB free hard disk space for full installation (150MB for application only), including 3MB on System disk 192MB RAM (256MB recommended) Color monitor, 800x600 resolution or higher (1024x768 recommended) Mac OS X 10.1.2 and Mac OS X 10.2 |
II. Who can use SPSS for Windows?
SPSS software is distributed through the university's site license. UNT has a site license that allows students to use the software in any general access labs on campus. Full-time faculty and staff can request SPSS installation on their machines on campus or at home. For students who want to install the software on their home machines, versions of the software are available for sale at the UNT bookstore at discounted academic prices. There are two versions currently available, SPSS Base and SPSS Grad Pack; the Grad Pack offers much more in terms of data analyses options. Both of these versions do not have expiration dates, so they are good for as long as you would like to use them.
Current prices at UNT Bookstore: Grad Pack for Win and Mac ~$190; Student Version ~$90
1. The Data Window
When you first open SPSS for Windows, the first thing you will see is the data window. The data window has a spreadsheet-like interface, much like Excel.

The data window contains your SPSS system files and displays your data in spreadsheet format. You can directly enter data into SPSS here, and many data management commands are only available from this screen (i.e., the Data and Transform Menus). The rows are considered to be observational units (e.g., the subjects), and the columns are considered to be variables for the observational units. You can cut, paste, and delete rows (observational units) and columns (variables) as desired from this window. SPSS system files are stored with the *.sav extension.
2. The Output Window

The output window displays the output from statistical analyses and any charts you have run. In addition, the window along the left side of the table contains a running log of the analyses you have conducted. Previous versions of SPSS had ASCII-style output. Newer versions of SPSS are different. SPSS treats the data from each table present in the output window as a separate object. These objects can be copied to the clipboard and pasted to other applications such as a word processor. Output objects can be exported as text files, HTML files, or in the case of charts, as *.gif and *.jpg files. The table can be edited by double-clicking on the section of the table that you would like to edit. Furthermore, they can be opened as a pivot table and edited from the pivot table window so that one may adjust the look of the table. SPSS output files are stored with the *.spo extension. The following figure shows an example of an SPSS pivot table:

3. The Syntax Window

There are two approaches to working in SPSS, using a point-and-click approach, and using SPSS syntax to program commands and routines. The SPSS syntax window is basically a large text editor that reads SPSS programming statements. The syntax window is a very useful record-keeping tool. As I will demonstrate shortly, when using the point-and-click approach, all commands and procedures are stored "in the background." This information can then be pasted to the syntax window, using the "Paste" option found in the GUI interface (i.e., the point-and-click approach). Having this information saved in the syntax window can save a researcher abundant grief if printouts of output are lost. In addition, you can place comments in the syntax window to indicate what it is that you are doing. For example, the figure above has a line of asterisks followed by "Imputing missing values for case 15 CBCL." This is just a note I made to myself so that if I were to not work with this file for a long time, I could come back to it and understand what it is that I was wanting to do. The syntax can be run directly from the syntax window, and thus several commands and procedures can be run at once. To run a group of procedures, highlight the group that you want to run and then select the Run Current icon, the triangle. I usually remember this by the icon that looks like a play button on a tape recorder (remember those things?). Asterisks can also be used to "comment out" portions of syntax if you do not want to run these procedures in the current analysis. SPSS syntax files are stored with the *.sps extension.
There are several default options in SPSS that you may find useful to change. You can edit these options by going to the Edit menu and selecting Options. You will get a dialog box that looks like this:

First, the Session Journal file keeps track of all work that you have done in SPSS, writing the syntax to the file specified in the options. In this figure, the session journal is stored in 'C:\WINDOWS\TEMP\spss.jnl'. You can change the location of your journal file by selecting "Browse" and changing the file path. By default, SPSS is set to overwrite the journal file each time you reopen SPSS. I have found it useful to change this option to Append; therefore, each time you reopen SPSS, the syntax will be added to the end of the file instead of overwriting. The only problem with this is that your spss.jnl file will become very large, and you will need to purge it every now and then.
The second default option that I find useful to change are the Variable Lists options. These are set to display the variable labels that you have assigned to the variables and to list variables in alphabetical order when using the GUI interface to run statistical analyses and graphics. To be descriptive, variable labels often need to be fairly long, and when this is the case, reading the labels when using the GUI interface can become unwieldy. Therefore, I like to change this option from "Display Labels" to "Display Names" (e.g. the variable label may be 'parent's highest level of education' but the variable name be 'pared'). You can always "hover" over the names to display their labels. Also, I usually find it easier to find variables in the GUI dialog boxes when I have them sorted in the order in which they come in the data file rather than sorting them alphabetically. Therefore, I change the option from "Alphabetical" to "File" variable lists.
There are also options that I find useful to change from the Viewer tag. By default, this dialog box will look like this:

Don't forget there are page setup options that can be set in the Viewer (output) mode that may make printing more easy if manipulated, just like you would with any text document. While in the Viewer, just click File/Page setup and you can change the layout, margins etc. of the printed page.
There are three main ways to get data into SPSS: (a) creating a new SPSS data file, (b) opening existing SPSS data files, and (c) importing data from another source such as an ASCII file, an Excel spreadsheet, etc.
1. Creating new SPSS data files
Data can be directly entered into SPSS similar to an Excel spreadsheet. You may also cut and paste data from other applications (e.g. Excel, S-Plus) into SPSS. However, if you are going to enter data directly, you will need to name and define your variables. Please download the file below for a short tutorial in how to do this procedure. To download the file, click on the link below and select "Save File". Select the directory that you want to download the file to, and select okay. Otherwise you may select "Open" rather than save. After downloading the video, you can play it with Windows Media Player or other video player software that will play *.wmv files.
Direct Data Entry Video (Note: with this and the following video it might be best to maximize your viewer or go full screen to see more detail)
2. Opening existing SPSS system files
Opening existing SPSS files is a fairly straightforward procedure, similar to opening other Windows files. Select "Open" from the File menu, and you will find a dialog box that looks similar to the figure below:

As I mentioned previously, SPSS system files are stored with the *.sav extension. By default, SPSS assumes that you want to enter an SPSS system file. You can then move to the directory in which the data file you wish to open is stored and open the file.
3. Importing data from an ASCII file
If you have the luxury of having someone else enter the data for you, it is conceivable that they will enter the data in ASCII or text format. In order to use the data in SPSS, the data must be converted to a file format that SPSS can recognize, namely something in *.sav format. SPSS can read in ASCII data, which can then be saved in *.sav format. The following video demonstrates this procedure for SPSS 11.5. It is a large file (> 2MB) and may take awhile to download depending on your internet connection.
Reading ASCII Data in SPSS 11.5
4. Importing data from other file formats
SPSS allows the user to open data directly into SPSS from many different file formats. For example, SPSS will directly open Excel, SAS, Lotus, and *.dbf (database) files. All the user needs to do is to go to the File Menu, select "Open", "Data", select the correct file type from the "Files of Type" drop down menu, and navigate to the file you wish to open.
Saving data in SPSS is very similar to other Windows applications. Select "Save as" from the File Menu, move to the directory in which you want to save the file, and give the file any name you desire. SPSS allows you to give your files descriptive names, without having an eight character restriction. The default file type in which the data file will be saved is *.sav. If you wish to save it as another file type (i.e., Excel), simply change the file type in the "Save as Type" drop down menu. If you have simply added to or changed your data file and wish to save your changes, you can select "Save" from the File Menu, or click on the icon that looks like a floppy disk.
Congratulations, you have finished the first of two courses in the SPSS series. In the next course, we will discuss data manipulation as well as introduce SPSS syntax.
Last updated: 01/16/06 by Mike Clark