Personal tools
Section Navigation > Home > Answers > Reference Manuals > Guide to Using SPSS for Windows
Navigation
Antivirus Software

McAfee Image

Download security software

Free for all university
students, faculty, and staff
personally owned computers

ASU Webmail

Email for 2008-2009 Freshmen
and new student accounts


ASU Webmail
Powered by Google


FAQ

Log in
Sign in to support to access additional resources for faculty, staff, and students.

Change Text Size

A      A      A

 
Document Actions

Guide to Using SPSS for Windows

Note: Return to reference manual view.

Guide to Using SPSS 14.0 for Windows.

1. Introduction

Information about SPSS.

SPSS release 14 provides a comprehensive system for performing statistical analyses, using either an interactive point and click method or command syntax in a batch processing mode. The majority of this document describes the interactive method of using SPSS. The SPSS Production Facility, which executes SPSS command syntax in an unattended fashion, is outlined on the last page. The interactive point and click graphical environment contains descriptive menus, dialog boxes and an extensive Help system. There is a spreadsheet-like data editor for entering and editing data, or data can be retrieved from a variety of sources: database software, spreadsheets or text files. SPSS can produce multidimensional pivot tables and high-resolution graphs: pie charts, bar charts, histograms, scatterplots, and 3-D graphs. You can browse through the output, edit it, print it or paste it into another Windows application. The SPSS modules available include: the Base system, Regression Models, Advanced Models, Tables, and Trends (for time series analyses).

2. What's New

New features of SPSS.

SPSS release 14 offers several new features as well as enhancements to current functions. Some of these new features include

  • You can have multiple data sources open at the same time, making it easier to compare data files and copy variable definition attributes from one dataset to another
  • You can import a MS-Access database file in an easier and greatly simplified procedure
  • You can create data values from value labels using the new VALUELABEL function.
  • Value labels can now contain 120 characters rather than the previous limit of 60.
  • There is more flexibility available in defining multiple response sets. This option is now available in the Data drop down list.
  • There is a new interactive Chart Builder interface that enables you to build charts and graphs from predefined gallery charts or from individual graphics elements.

To see a complete description of these new features and enhancements: start an SPSS session, click on Help and select Topics. Click on the Contents tab, and then click on the plus sign in front of + Base system, click + Overview, and finally select “What’s New in SPSS 14.0.

3. Types of windows in SPSS

Descriptions of the various windows available in SPSS.

Data Editor

A spreadsheet-like system for defining, entering, editing and displaying data. It contains two views, the Data View and the Variable View. To switch between the views, click on the tab in the lower left hand corner of your screen. Data can be typed directly into the grid or imported from a wide variety of software formats, including Excel, MSAccess, My SQL, Lotus 1-2-3, SYSTAT, dBASE, FoxPro, Paradox and any database format for which you have an ODBC driver. This window opens automatically when you start an SPSS session, and you can have multiple datasets open simultaneously.

Viewer

Displays all statistical results, tables, and charts. It provides a system for browsing results, selectively showing and hiding output, printing it, and moving presentation quality tables and charts between SPSS and word processing software, such as MS Word. This window opens automatically the first time output is generated.

Draft Viewer

Displays output as simple text rather than interactive pivot tables.

Pivot Table Editor

Provides a means for editing results displayed in pivot tables. Using this editor you can interactively manipulate the layout of a table, swap rows and columns, edit text or add color. The Pivot Table Editor is activated by double-clicking on a pivot table. When it is active, hash marks appear around the table. Click outside the table to turn off the editor. If the table is quite large, then it opens in it’s own Table Editor Window.

Chart Editor

allows you to modify high-resolution charts and plots in a separate chart window. Double click anywhere on the chart to invoke the chart editor. You can change the colors, edit text within the chart, switch the horizontal and vertical axes, rotate 3-D scatter plots, change the chart type, or export the chart to another Windows application.

Text Output Editor

Double-clicking on text output activates the text output editor. Use the Text Output Editor to modify text, change font characteristics, or copy and paste new text.

Syntax Editor

Most SPSS commands are accessible from menus and dialog boxes, but a few options are available only by using SPSS command language in a Syntax window. You can open a Syntax window (from the main menu, select File > New > Syntax) and type commands directly into the window. You can also copy syntax commands from the output log or create the syntax from choices made in a dialog box. By default, SPSS records the syntax equivalent of all commands executed during a session in a journal file, and this file can be saved for later use. See the “Journal File” item below for details. To learn about the command language options available for a procedure, click on Help and Command Syntax Reference, and then click on the desired procedure.

Script Editor

The scripting facility allows you to automate tasks in SPSS, including customizing output, opening and saving files, and running data transformations. Some sample scripts are supplied by SPSS which you can modify, or you can create your own. The sample scripts are located in: “C:\Program Files\SPSS\Scripts”.

Each window has it's own menu bar and tool bar, with selections appropriate for that window. Some menu choices, such as Analyze and Graphs, are available in all windows. Tool bars can be positioned and aligned as you choose, and you can see a brief description of each tool by placing the cursor on the tool. You can also customize toolbars to contain the features you use most often. Each window also contains a status bar at the bottom, which contains such items as an information area, filter status area, and a weight status area. You can have multiple datasets open simultaneously, but only one can be the “active dataset”. It will be designated as such by a green plus sign in the icon in the title bar, in the upper left corner. You can change the active dataset by clicking anywhere in the Data Editor window of the data source that you want to use. Only the variables in the active dataset are available for analysis.

You can have several open Syntax and output Viewer windows, but only one of each type can be the "designated" one. The "designated" window should not be confused with the "active" window. The “designated” Viewer window is the one to which new output is routed, while the “active” window is the window currently in the foreground. To change the designated window, make the selected window the active window and then click on the green plus sign in the tool bar. Once selected, the designated window will have a green plus sign in the icon in the upper left corner.

Most menu selections open dialog boxes containing variable lists and command push buttons, from which you select the variables and options needed for analysis. Some push buttons open subdialog boxes for additional options. When all selections are complete, click the "OK" button to initiate the process. If you click the "Paste" push button, command syntax is generated and pasted into a Syntax window where it can be edited and special options added before running it. The command syntax can also be saved to a file for future editing, execution, or processing with SPSS Production Facility.

4. Help

Ways to get help when using SPSS.

SPSS provides a wide variety of help options. Each window provides a Help selection in its menu bar from which you can choose "Topics", "Tutorial", “Case Studies”, "Statistics Coach", “Command Syntax Reference”, “Algorithms”, "SPSS Home Page", “About”, “License Authorization Wizard”, "Register Product", or “Check for Updates”. Clicking on “Topics” will open a window from which you can select: Contents, Index, Search or Favorites. Click on “Index” and enter a word to learn more about that topic. In addition to the “Help” option in the main menu, each dialog box provides a Help button offering context specific help. Also, you can right click on any control in a dialog box and select "What's This?" to get a description of that control. For help on terms in output pivot tables, double click the pivot table to activate the Pivot Table Editor, and then click the right mouse button on the term in question. For help in interpreting the output, use the “Results Coach”. Activate the Pivot Table Editor, click on Help in the main menu, and select “Results Coach”.

Statistics Coach

The Statistics Coach can help you select the best statistical and/or charting procedure for your data or research problem. From the main menu select Help > Statistics Coach. The system will prompt you with simple questions about your data and display visual examples to help you select the procedures best suited for your data. To use the Statistics Coach, you must first enter accurate descriptions for the data type for each variable. In the Variable View of the Data Editor window, click on “Measure” and select Scale, Ordinal or Nominal as appropriate.

Journal File

SPSS records all commands executed during a session in a journal file named “spss.jnl” by default. This includes commands generated by dialog box choices. You can edit the journal file and use the commands again a later session. You can also append or overwrite the journal file, and select the journal filename and location. To specify a folder for this journal file: click on Edit and Options. Select the General tab and under “Session Journal” browse to enter a folder and filename of your own choice.

Reference Manuals

The reference manuals for SPSS 14.0 can be ordered from the SPSS web site:

http://www.spss.com

Click on “Store” at the top of the page, and then click on “Books” and “SPSS 14.0”. User Manuals available include the following:

SPSS 14.0 Brief Guide $26.

SPSS Tables 14.0 $41.

SPSS Trends 14.0 $29.

SPSS 14.0 Manuals on CD $99.

This CD contains several manuals in PDF format, including: SPSS Base 14.0 User’s Guide, SPSS 14.0 Brief Guide, SPSS Tables 14.0, SPSS Trends 14.0, SPSS Regression Models 13.0, SPSS Advanced Models 12.0, and other manuals for SPSS modules which we do not have.

There are also some statistical procedure companion books which provide background information and examples for the SPSS Advanced and Regression modules.

5. Data Entry

Options for getting data into SPSS.
The Data Editor window contains two sub-windows or views, Data View and Variable View. The data itself is typed directly into the rows and columns of the Data View, and a description of the data (string or numeric, variable labels, value labels, etc.) is entered in the Variable View. Data can also be read from a wide variety of file types. In fact, you can read data from any database software for which you have an ODBC driver. The following material describes some of the more frequently used methods of data entry, but you should consult the on-line help or user’s guides for a complete description of the data entry features. To type data into SPSS

In the Data View part of the Data Editor window, each row contains data for one case or observation, and each column contains the value of a variable, or a piece of information about that case. For example, each row may represent an individual, and there may be columns for the age, height and weight of the individuals. The column headings in Data View are the variable names, and they should be defined in the Variable View part of the Data Editor window. In the Variable View each row contains the name and description (attributes) of one of the variables.

Start an SPSS session and select the “Type in data” button in the first window to bring up an empty Data Editor window. Click on “Variable View” in the lower left corner of the screen. In the Name column, type the names of the variables in your data set. Variable names can contain up to 64 characters, must begin with a letter, and can contain letters, digits, an underscore, a period or the symbols @, #, or $, but no spaces. For additional rules regarding variable names, check the online Help system. In addition to the variable names, you can enter the attributes: Type, Width, Decimals, Label, Value labels, Missing values, Column size, Alignment and Measure (scale, ordinal or nominal). If no changes are entered the system assigns the default attributes of an 8 digit numeric variable. You can use Copy and Paste in this window to duplicate attributes to new variables. Also, you can generate multiple new variables with the same attributes. First, type in the variable name and desired attributes for one variable. Click the row number for this variable to highlight the entire row and then click Edit > Copy. Click the empty row number beneath the last defined variable, and then click Edit > Paste Variables. In the dialog box, enter the number of variables you want to create, the prefix, and the starting number for the new variables. The new variable names will consist of the specified prefix plus a sequential number starting with the specified value. The defined attributes will be copied to all the newly created variables. Once the data definition is complete in the Variable View, click the tab in the lower left corner of the window to move to the Data View and begin entering your data in the grid. You can use the arrow keys to move around in the grid. The tab key moves across a row and will put your cursor back to column one when it’s pressed after entering data in the last defined column . Correct data entry errors by clicking on the incorrect data cell and typing the correct value. To save the data, click File > Save, and in the dialog box, browse to the folder where you want the data file to be saved and type in a file name. The SPSS system will automatically append the file name extension of “.sav” to the saved data.

To Read a Text Data File

Your text data file can be in either fixed or free field format. In fixed format, each variable's value is recorded in the same column location on the data line for each case, whereas in free field format the variables must simply be in the same order, separated by spaces, comas, tabs, semicolons or a character you specify. With comma delimited data, you can have missing data, but it is still wise to check the input data carefully to be sure the file has been read accurately.

From the main menu in the Data View of the Data Editor, select File > Read Text Data, and browse to select the desired data file. Click to open the file and initiate the Text Import Wizard, a series of six windows, which will step you through the process of defining the text file.

To Read a Microsoft Excel file

Excel 5 or later files can be read directly into SPSS using the Open File dialog box without having to use an ODBC driver. Also, columns that contain mixed data (both numeric and string data) will automatically be read as string variables without any loss of data. To read an Excel file, click on File > Open > Data, and in the Open File dialog box, change the entry in the “Files of type:” box to be Excel (*.xls). Browse to the appropriate directory, click on the desired Excel file, and click Open. In the “Opening Excel Data Source” dialog box, you should identify the worksheet you want to read and specify whether or not the first row contains variable names. Click OK and the data will be brought into the SPSS data editor. Be sure to save the data as an SPSS data set.

To Read an MS-ACCESS Database file

In the Data Editor window, click File > Open Database > New Query. In the “Database Wizard” dialog window, select “MS Access Database”, and click Next. Browse to the desired MS-Access file, and click OK. In the “Select Data” window select the table and fields you want to read by clicking and dragging items from the “Available Tables:” window to the “Retrieve Fields in this Order:” window. You can select individual fields or the entire data set. Click NEXT after making selections. If fields from more than one table have been selected, you will then be asked to define the relationships between the table items. Click NEXT to advance to the "Limit Retrieved Cases" window, where you can enter one or more criteria to specify a subset of cases to be retrieved. Click NEXT to advance to the "Define Variables" window, and enter or edit variable names as desired. Click NEXT to advance to the "Results" window. This final dialog box asks if you want to proceed and retrieve the data or paste the generated command syntax into the syntax editor for further modification. You can also save the SQL query to a file. Finally, click FINISH.

Note, the way you have defined the fields in Access will influence the field size and data type in SPSS. Therefore, take the time in Access to set up your field definitions to match the data you plan to enter. For example:

  • Access definition SPSS data type
  • integer F6
  • long integer F11
  • single or double precision F8.2
  • text or string A__ length assigned in Access

6. Sample SPSS Session

An example of SPSS usage.

The following sequence of instructions will step you through a sample SPSS session, including accessing a data set, running analyses, graphing, printing output and exporting results to Microsoft Word.

1. Read the sample data set

Initiate an SPSS session, and in the first dialog box, “SPSS for Windows”, under “Open an existing data source” click on “More files…”. Alternately, in the Data Editor window you can click File > Open > Data… to get to the Open File dialog box. In the Open File dialog box, click on "world95.sav", (C:\Program Files\SPSS\world95.sav), and then click Open. If this file name is not listed, you may need to browse to its location on drive C:\

The file “world95.sav” is a sample data set, supplied by SPSS, containing demographic and economic information for 109 countries. To learn more about the individual variables in the file, click on the Variable tab in the lower left hand corner of the window. Information on each variable includes: type, width, decimals, variable label, value labels, missing value codes, column size, alignment and measurement level.

2. Descriptive statistics

We will run a frequency distribution on a categorical variable and then compute some descriptive statistics on two ratio scale variables. In the Data Editor window click Analyze > Descriptive Statistics > Frequencies. In the Frequencies dialog box, the left hand box lists the variable labels of all the variables in the data set. Hold the mouse pointer on a line to read the entire label and the variable name. Select “Region or economic group [region]” (it’s about half way down the list). Variables can be selected either by double clicking them, or by clicking on the variable name and then clicking the right arrow ">" to copy it into the selected variables list. Note that there is a Help button for specific help about using this Frequencies dialog box. Click OK to run the Frequencies procedure. The Output Viewer window will appear, containing the requested frequency distribution. Next, we’ll get some descriptive statistics on two ratio scale variables. In either the Output Viewer window or in the Data Editor, again click Analyze > Descriptive Statistics > Frequencies. First, click Reset to clear the Frequencies dialog box, and then click on the two variables, "Average male life expectancy [lifeexpm]" and "Males who read (%) [lit_male]", and move them into the selected variables list. At the bottom of the dialog box are three buttons, Statistics, Charts, and Format. Click the Statistics button and in the Statistics dialog box select Mean, Median, Standard deviation, Minimum, Maximum and S.E mean (standard error of the mean). Click Continue to return to the Frequencies dialog box, and click Charts. In the Charts dialog box, click Histogram and "With normal curve", then click Continue. Since the two variables we selected are ratio scale items, we do not want to generate frequency tables. Therefore, click on the “Display frequency tables” box to remove the check mark. Finally, click OK in the Frequencies dialog box to initiate the analysis. This second analysis is added to the Output Viewer window.

3. Examining, Editing and Printing output

When the processing is complete, the SPSS Viewer window opens automatically. It is a split window, with the left side containing an outline of the analytical results displayed on the right side. You can browse the results, show or hide selected tables or charts, edit items, print all or part of the output, or copy output into other applications. If you click on an item in the outline, the pointer on the right hand side immediately jumps to that part of the output. In the outline on the left, double click a book icon to show or hide that item, or click the plus or minus sign to expand or collapse an entire section of output. In the right pane, double click a table to bring up the Pivot Table Editor. The table will be surrounded by hash marks to signify that the editor is active. With the table editor you can rearrange the contents of the table using Pivot Trays, transpose rows and columns, edit cell contents, or cell borders, add or edit a title, a footnote or a caption, or modify almost any detail of the table. Click outside the table to close the Pivot Table Editor. Double clicking a histogram brings up a new window, the Chart Editor window, containing the selected chart. Almost any feature of the chart can be edited, including the axes, title, color, and interval width for the bars. Right mouse click on an element of the chart to see the Properties dialog box and editing options available for that chart element. Click File > Close to close the Chart Editor window. To print the results, click File > Print. You can print all visible output, a single table or chart, or by first hiding the unwanted parts of the output, you can choose to print only selected tables and charts.

4. Producing a graph

The following steps will plot male life expectancy vs. male literacy rates. In the main menu, click Graphs > Scatter/Dot, then select Simple Scatter and click Define. From the Simple Scatterplot dialog box select "Average male life expectancy [lifeexpm]" for the Y-axis and "Males who read (%) [lit_male]" for the X-axis. Click the Titles button to enter a Title, and then click OK to generate the graph. The plot will be displayed in the Viewer window.

5.Editing the graph

Edit the graph to include a regression line. Double click anywhere in the plot to bring up the Chart Editor, and in the Chart Editor window, click on Elements and select “Fit line at Total” to bring up the Properties dialog box. Select the tab “Fit Line”, and under Fit Method, click on “Linear”. Click Apply and then close the Properties window. Other aspects of the chart, such as the axes, data point labeling, and marker color, type, and size can be edited. Click on the item to be edited and then click Edit > Properties, or right mouse click on the item and select “Properties Window” from the drop down list. To change the text of the title on one of the axes, click once to select it, and then click again to create a short red line in the middle of the text. Edit or enter new text as desired. Finally, close the chart editor window by clicking File > Close, and then print or save the chart if desired.

6. Save the output

To save the output so that it can be retrieved in a future SPSS session, click File and Save or Save As. Specify the folder in the "Save in:" box and then enter a file name. The file extension will be ".spo". The entire contents of the SPSS Output Viewer window will be saved, not just those tables and charts currently visible.

7. To export a table:

A table can be copied and pasted into another active Windows application such as Microsoft Word. First, select the table to be copied (click on its icon in the outline), and from the main menu choose Edit > Copy objects. Do not double click on the table; the Pivot Table Editor is not required. Initiate the target application, such as MS Word, and from its menu choose Edit > Paste Special and Formatted Text (RTF). Once the table has been brought into your MS Word document you will be able to resize it, but you will not be able to do additional editing.

8. To export a graph

A graph can be exported by using the copy and paste method or by saving it as a graphics file to be brought into a word processing program at a later time. To copy and paste the graph use the same procedure as that outlined above to export a table: select the chart to be copied (click on its icon in the outline) and then click Edit > Copy object. Open your MS Word application, and click on Edit > Paste Special and Formatted Text (RTF). If the graph requires editing, this should be done in SPSS, because you will have very little editing capability in the word processor beyond resizing the chart.

Alternately, SPSS gives you the ability to export a graph as a file. Click on the desired chart in the Output Viewer window, and then click File > Export. In the Export Output dialog box specify “Charts only”, and then under “Export What” click on “Selected Charts”. Select the desired File Type under Export Format: Enhanced Metafile (*.EMF), JPEG (*.JPG), Macintosh PICT (*.PCT), Portable Network Graphics file (*.PNG), Postscript (*.EPS), Tagged Image File (*.TIF), Windows Bitmap (*.BMP), or Windows Metafile (*.WMF). If you plan to bring the graph into Microsoft Word, save it as a *.WMF file. Be sure to specify a file name and location: under Export File - File Prefix, browse to the desired location and enter a file name, eg. C:\mygraphs\proj1.wmf, and click OK. After the file has been saved, it can be brought into a Microsoft Word document at any time: click on Insert > Picture >From File, and then type in the path and name of the saved SPSS *.WMF file.

9. Power Point and HTML Output

You can also export output as a Power Point or HTML file. In the Output Viewer window click on File > Export, and in the “Export Output” dialog box enter a filename and specify the export format as “Power Point” (*.ppt) or “HTML file (*.htm)”. Under “Export What”, click on “All Visitble Objects” or “Selected Object”. If you export “All Objects” your file will contain extra unwanted tables that are usually hidden. You can export the entire output document or the output document without charts. If you export the entire document to an HTML file, the charts will be exported in the currently selected chart export format (with a separate file being created for each chart) and embedded by reference in the HTLM document. Click on Help in the “Export Output” dialog box for more detailed information about this facility.

7. SPSS Production Facility

Automation of SPSS.

The SPSS Production Facility will execute an SPSS syntax file in an automated fashion. If you have analytical procedures that need to be run frequently and require tedious repetitive tasks, the Production mode may be useful. A syntax file can be created, saved and executed repeatedly as needed. Macro symbols can be defined and then used to help simplify and customize analyses.

To run an SPSS Production Job

  • Create a command syntax file using the Syntax window of SPSS, or a text editor such as Notepad and save this file. Do not use MS Word to create the syntax file.
  • Exit from the SPSS Windows version if it is loaded. You can not run SPSS Production Facility if interactive SPSS is running.
  • Start the SPSS 14.0 Production Mode Facility by clicking on its icon in your Programs folder.
  • In the SPSSJob1 dialog box specify the syntax files you want to use and the folder for output. Click on “Add” to browse for the necessary syntax files. In the “Folder for output” window, browse to the desired folder. Click on the buttons "Export Options" or User Prompts" as needed.
  • Save the production job file: in the SPSS Production Facilities window, click File > Save and enter the location and filename. Production job files will have an extension of " .spp".
  • Run the production job file: click Run > Production Job, in the main menu. The Production Facility will be minimized while the job is running, and will automatically be restored when the job is finished. Exit from the SPSS Production Facility when the job is complete.
  • The output will be in an SPSS Viewer file, with a filename the same as the production job file, and a filename extension of " .spo ", located in the subdirectory you specified as the “Folder for output”. Close out the SPSS Production Facility and initiate an interactive SPSS session. Read the .spo file into an output Viewer window, where you can view, edit, and print the results.
 

© 2007 Appalachian State University Boone, NC 28608 / 828-262-2000