This action might not be possible to undo. Are you sure you want to continue?

Welcome to Scribd! Start your free trial and access books, documents and more.Find out more

5 User’s Guide

®

For more information about SPSS® software products, please visit our Web site at http://www.spss.com or contact SPSS Inc. 233 South Wacker Drive, 11th Floor Chicago, IL 60606-6412 Tel: (312) 651-3000 Fax: (312) 651-3668 SPSS is a registered trademark and the other product names are the trademarks of SPSS Inc. for its proprietary computer software. No material describing such software may be produced or distributed without the written permission of the owners of the trademark and license rights in the software and the copyrights in the published materials. The SOFTWARE and documentation are provided with RESTRICTED RIGHTS. Use, duplication, or disclosure by the Government is subject to restrictions as set forth in subdivision (c)(1)(ii) of The Rights in Technical Data and Computer Software clause at 52.227-7013. Contractor/manufacturer is SPSS Inc., 233 South Wacker Drive, 11th Floor, Chicago, IL 60606-6412. General notice: Other product names mentioned herein are used for identification purposes only and may be trademarks of their respective companies. TableLook is a trademark of SPSS Inc. Windows is a registered trademark of Microsoft Corporation. DataDirect, DataDirect Connect, INTERSOLV, and SequeLink are registered trademarks of MERANT Solutions Inc. Portions of this product were created using LEADTOOLS © 1991-2000, LEAD Technologies, Inc. ALL RIGHTS RESERVED. LEAD, LEADTOOLS, and LEADVIEW are registered trademarks of LEAD Technologies, Inc. Portions of this product were based on the work of the FreeType Team (http://www.freetype.org). SPSS® Base 11.5 User’s Guide Copyright © 2002 by SPSS Inc. All rights reserved. Printed in the United States of America. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, electronic, mechanical, photocopying, recording, or otherwise, without the prior written permission of the publisher. 1234567890 05 04 03 02

ISBN 1-56827-304-5

Preface

SPSS® 11.5 is a comprehensive system for analyzing data. SPSS can take data from almost any type of file and use them to generate tabulated reports, charts, and plots of distributions and trends, descriptive statistics, and complex statistical analyses. SPSS makes statistical analysis accessible for the casual user and convenient for the experienced user. The Data Editor offers a simple and efficient spreadsheet-like facility for entering data and browsing the working data file. High-resolution, presentationquality charts and plots are integral parts of the Base system. Much of the output from the Base system and Tables option takes the form of flexible pivot tables that you can modify quickly and copy directly into other applications. The Viewer makes it easy to organize and manage your tables and charts using a familiar tree structure. When you have questions about an item in a dialog box, a statistic in your output, or the steps needed to accomplish a task, help is only a click or two away. With the Draft Viewer, you can create simple text output instead of interactive pivot tables. See the overview (Chapter 1) for a list of new features and an introduction to the Base system. This manual, the SPSS Base 11.5 User’s Guide, documents the graphical user interface of SPSS for Windows. Complete information about using interactive graphics can be found in SPSS Interactive Graphics 10.0, which is compatible with release 11.5 of SPSS. Examples using the statistical procedures found in SPSS Base 11.5 are provided in the Help system, installed with the software. Algorithms used in the statistical procedures are available on the product CD-ROM. Beneath the menus and dialog boxes, SPSS uses a command language that can be used to create and run production jobs. Dialog boxes can “paste” commands into a syntax window, where they can be modified and saved; a few features of the system can be accessed only via command syntax. Complete command syntax is documented in the SPSS 11.5 Syntax Reference Guide, which is included on the product CD-ROM and is available for purchase separately in print. The Help system contains brief syntax diagrams in addition to full help on the graphical user interface.

iii

SPSS Options

The SPSS family of products includes add-on enhancements to the SPSS Base system, which are available on several computer platforms. Contact your local SPSS office or sales representative about availability of the following options:

n SPSS Regression Models™ provides techniques for analyzing data that do not fit

traditional linear statistical models. It includes procedures for probit analysis, logistic regression, weight estimation, two-stage least-squares regression, and general nonlinear regression.

n SPSS Advanced Models™ focuses on techniques often used in sophisticated

experimental and biomedical research. It includes procedures for general linear models (GLM), linear mixed models, variance components analysis, loglinear analysis, ordinal regression, actuarial life tables, Kaplan-Meier survival analysis, and basic and extended Cox regression.

n SPSS Tables™ creates a variety of presentation-quality tabular reports, including

**complex stub-and-banner tables and displays of multiple-response data.
**

n SPSS Trends™ performs comprehensive forecasting and time series analyses with

**multiple curve-fitting models, smoothing models, and methods for estimating autoregressive functions.
**

n SPSS Categories® performs optimal scaling procedures, including correspondence

analysis.

n SPSS Conjoint™ performs conjoint analysis. n SPSS Exact Tests™ calculates exact p values for statistical tests when small or very

**unevenly distributed samples could make the usual tests inaccurate.
**

n SPSS Missing Value Analysis™ describes patterns of missing data, estimates means

**and other statistics, and imputes values for missing observations.
**

n SPSS Maps™ turns your geographically distributed data into high-quality maps with

symbols, colors, bar charts, pie charts, and combinations of themes to present not only what is happening but where it is happening.

iv

Compatibility

The SPSS Base 11.5 system is designed to operate on computer systems running Windows 98, Windows 2000, Windows Me, or Windows NT 4.0.

Serial Numbers

Your serial number is your identification number with SPSS Inc. You will need this serial number when you contact SPSS Inc. for information regarding support, payment, or an upgraded system. The serial number was provided with your Base system. Before using the system, please copy this number to the registration card.

Registration Card

Don’t put it off: fill out and send us your registration card. Until we receive your registration card, you have an unregistered system. Even if you have previously sent a card to us, please fill out and return the card enclosed in your Base system package. Registering your system entitles you to:

n Technical support services n New product announcements and upgrade announcements

Customer Service

If you have any questions concerning your shipment or account, contact your local office, listed on page vii. Please have your serial number ready for identification when calling.

Training Seminars

SPSS Inc. provides both public and onsite training seminars for SPSS. All seminars feature hands-on workshops. SPSS seminars will be offered in major U.S. and European cities on a regular basis. For more information on these seminars, call your local office, listed on page vii.

v

Technical Support

The services of SPSS Technical Support are available to registered customers of SPSS. Customers may contact Technical Support for assistance in using SPSS products or for installation help for one of the supported hardware environments. To reach Technical Support, see the SPSS Web site at http://www.spss.com, or call your local office, listed on page vii. Be prepared to identify yourself, your organization, and the serial number of your system.

Additional Publications

Except for academic course adoptions, additional copies of SPSS product manuals may be purchased directly from SPSS Inc. Visit our Web site at http://www.spss.com/estore, or contact your local SPSS office, listed on page vii. SPSS product manuals may also be purchased from Prentice Hall, the exclusive distributor of SPSS publications. To order, fill out and mail the Publications order form included with your system, or call 800-947-7700. If you represent a bookstore or have an account with Prentice Hall, call 800-382-3419. In Canada, call 800-567-3800. Outside of North America, contact your local Prentice Hall office. Statistical introductions to procedures in the Base, Regression Models, and Advanced Models written by Marija Norusis are planned to be available from Prentice Hall. Check with the publisher or visit the SPSS Web site for announcements regarding availability.

v

**Tell Us Your Thoughts
**

Your comments are important. Please let us know about your experiences with SPSS products. We especially like to hear about new and interesting applications using the SPSS system. Please send e-mail to suggest@spss.com, or write to SPSS Inc., Attn: Director of Product Planning, 233 South Wacker Drive, 11th Floor, Chicago, IL 60606-6412.

Contacting SPSS

If you would like to be on our mailing list, contact one of our offices, listed on page vii, or visit our Web site at http://www.spss.com. We will send you a copy of our newsletter and let you know about SPSS Inc. activities in your area.

vi

SPSS Inc. Chicago, Illinois, U.S.A. Tel: 1.312.651.3000 or 1.800.543.2185 www.spss.com/corpinfo Customer Service: 1.800.521.1337 Sales: 1.800.543.2185 sales@spss.com Training: 1.800.543.6607 Technical Support: 1.312.651.3410 support@spss.com SPSS Federal Systems Tel: 1.703.740.2400 or 1.800.860.5762 www.spss.com SPSS Andino Tel: +57.1.635.8585 www.spss.com/la SPSS Argentina SA Tel: +5411.4371.5031 www.spss.com/la SPSS Asia Pacific Pte. Ltd. Tel: +65.245.9110 www.spss.com SPSS Australasia Pty. Ltd. Tel: +61.2.9954.5660 www.spss.com SPSS Belgium Tel: +32.163.170.70 www.spss.com SPSS Benelux BV Tel: +31.183.651777 www.spss.com SPSS Brasil Ltda. Tel: +55.11.5505.3644 www.spss.com SPSS Chile Tel: +56.2.233.7499 www.spss.com/la SPSS Czech Republic Tel: +420.2.24813839 www.spss.cz

SPSS Denmark Tel: +45.45.46.02.00 www.spss.com SPSS East Africa Tel: +254 2 577 262 www.spss.com SPSS Finland Oy Tel: +358.9.4355.920 www.spss.com SPSS France SARL Tel: +01.55.35.27.00 www.spss.com SPSS Germany Tel: +49.89.4890740 www.spss.com SPSS BI Greece Tel: +30.1.6971950 www.spss.com SPSS Hong Kong Ltd. Tel: +852.2.811.9662 www.spss.com SPSS Iberica, S.L.U. Tel: +34.902.123.606 www.spss.com SPSS Ireland Tel: +353.1.415.0234 www.spss.com SPSS BI Israel Tel: +972.3.6166616 www.spss.com SPSS Italia srl Tel: +800.437300 www.spss.it SPSS Japan Inc. Tel: +81.3.5466.5511 www.spss.co.jp SPSS Korea DataSolution Co. Tel: +82.2.563.0014 www.spss.co.kr SPSS Latin America Tel: +1.312.651.3539 www.spss.com SPSS Malaysia Sdn Bhd Tel: +603.6203.2300 www.spss.com

SPSS Mexico SA de CV Tel: +52.5.682.87.68 www.spss.com SPSS Miami Tel: 1.305.627.5700 www.spss.com SPSS Norway AS Tel: +47.22.99.25.50 www.spss.com SPSS Polska Tel: +48.12.6369680 www.spss.pl SPSS Russia Tel: +7.095.125.0069 www.spss.com SPSS San Bruno Tel: 1.650.794.2692 www.spss.com SPSS Schweiz AG Tel: +41.1.266.90.30 www.spss.com SPSS BI (Singapore) Pte. Ltd. Tel: +65.346.2061 www.spss.com SPSS South Africa Tel: +27.21.7120929 www.spss.com SPSS South Asia Tel: +91.80.2088069 www.spss.com SPSS Sweden AB Tel: +46.8.506.105.50 www.spss.com SPSS Taiwan Corp. Taipei, Republic of China Tel: +886.2.25771100 www.sinter.com.tw/spss/main SPSS (Thailand) Co., Ltd. Tel: +66.2.260.7070 www.spss.com SPSS UK Ltd. Tel: +44.1483.719200 www.spss.com

vii

Contents

1 Overview 1

What’s New in SPSS 11.5? . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 Designated versus Active Window . . . . . . . . . . . . . . . . . . . 5 Menus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 Toolbars . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 Showing and Hiding Toolbars . . . . . . . . . . . . . . . . . . . . . . 7 Moving Toolbars . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 Status Bar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 Showing and Hiding the Status Bar . . . . . . . . . . . . . . . . . . . 9 Dialog Boxes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 Variable Names and Variable Labels in Dialog Box Lists . Dialog Box Pushbuttons. . . . . . . . . . . . . . . . . . . . Subdialog Boxes . . . . . . . . . . . . . . . . . . . . . . . . Selecting Variables . . . . . . . . . . . . . . . . . . . . . . Getting Information about Variables in Dialog Boxes . . . Getting Information about Dialog Box Controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10 .11 .12 .12 .13 .13

Basic Steps in Data Analysis . . . . . . . . . . . . . . . . . . . . . . . . .14 Statistics Coach . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .15 Finding Out More about SPSS . . . . . . . . . . . . . . . . . . . . . . . . .15

2 Getting Help

17

Using the Help Table of Contents . . . . . . . . . . . . . . . . . . . . . . .18 Using the Help Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .19 Getting Help on Dialog Box Controls . . . . . . . . . . . . . . . . . . . . .20

ix

Getting Help on Output Terms . . . . . . . . . . . . . . . . . . . . . . . . 20 Using Case Studies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 Copying Help Text from a Pop-Up Window . . . . . . . . . . . . . . . . . 21

3 Data Files

Data File Types . . . . . . . . . . . . . . . . . . . . Opening File Options . . . . . . . . . . . . . . . . . How the Data Editor Reads Excel 5 or Later Files. How the Data Editor Reads Older Excel Files and Other Spreadsheets . . . . . . . . . . . . . . . . . How the Data Editor Reads dBASE Files. . . . . . Selecting a Data Source . . . Database Login . . . . . . . . Selecting Data Fields. . . . . Creating a Parameter Query. Defining Variables . . . . . . Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

23

. . . . . . . . . . 24 . . . . . . . . . . 25 . . . . . . . . . . 25 . . . . . . . . . . 25 . . . . . . . . . . 26 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 30 30 37 39 40 42 42 43 44 46 47 48 49 51

Opening a Data File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

Reading Database Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

Reading Text Data Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 To Read Text Data Files . . . . . . . . Text Wizard Step 1 . . . . . . . . . . . Text Wizard Step 2 . . . . . . . . . . . Text Wizard Step 3: Delimited Files. . Text Wizard Step 3: Fixed-Width Files Text Wizard Step 4: Delimited Files. . Text Wizard Step 4: Fixed-Width Files Text Wizard Step 5 . . . . . . . . . . . Text Wizard Step 6 . . . . . . . . . . .

File Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 Obtaining Data File Information . . . . . . . . . . . . . . . . . . . . . 52

x

Saving Data Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .52 Saving Data Files in Excel Format . Saving Data Files in SAS Format . . Saving Data Files in Other Formats Saving Data: Data File Types . . . . Saving Subsets of Variables . . . . Saving File Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .53 .54 .55 .56 .58 .59

Virtual Active File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .59 Creating a Data Cache . . . . . . . . . . . . . . . . . . . . . . . . . .60

**4 Distributed Analysis Mode
**

Server Login . . . . . . . . . . . . . . . . . . . . . . . . . . Opening Data Files from a Remote Server . . . . . . . . . Saving Data Files from a Remote Server . . . . . . . . . . Data File Access in Local and Distributed Analysis Mode Availability of Procedures in Distributed Analysis Mode . Using UNC Path Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

63

.65 .68 .69 .70 .72 .72

Distributed versus Local Analysis. . . . . . . . . . . . . . . . . . . . . . .63

5 Data Editor

75

Data View . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .76 Variable View . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .77 Displaying or Defining Variable Attributes Variable Names . . . . . . . . . . . . . . . Variable Measurement Level. . . . . . . . Variable Type. . . . . . . . . . . . . . . . . Variable Labels. . . . . . . . . . . . . . . . Value Labels . . . . . . . . . . . . . . . . . Missing Values . . . . . . . . . . . . . . . . Column Width . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .78 .78 .79 .81 .83 .83 .84 .85

xi

Variable Alignment . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85 Applying Variable Definition Attributes to Multiple Variables. . . . 85 Entering Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87 Entering Numeric Data. . . . . . . . . . . . Entering Non-Numeric Data. . . . . . . . . Using Value Labels for Data Entry . . . . . Data Value Restrictions in the Data Editor. Replacing or Modifying Data Values . . . . Cutting, Copying, and Pasting Data Values Inserting New Cases . . . . . . . . . . . . . Inserting New Variables . . . . . . . . . . . Changing Data Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88 88 89 89 90 90 91 92 93

Editing Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90

Go to Case. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93 Finding a Case in the Data Editor . . . . . . . . . . . . . . . . . . . . 93 Case Selection Status in the Data Editor . . . . . . . . . . . . . . . . . . 94 Data Editor Display Options . . . . . . . . . . . . . . . . . . . . . . . . . . 94 Data Editor Printing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95 Printing Data Editor Contents . . . . . . . . . . . . . . . . . . . . . . 95

6 Data Preparation

To Copy Data Properties . . . . . . . . . Selecting Source and Target Variables Choosing Variable Properties to Copy . Copying Data Set (File) Properties . . . Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

97

. 99 100 102 104 106 107 109 111 112

Copying Data Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . 98

Defining Variable Properties . . . . . . . . . . . . . . . . . . . . . . . . 107 To Define Variable Properties. . . . . . . . . . . . . . Defining Value Labels and Other Variable Properties Suggest Measurement Level . . . . . . . . . . . . . . Copying Variable Properties. . . . . . . . . . . . . . .

xii

. . . . . . . . . . . . . .7 Data Transformations 115 Compute Variable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122 Recode into Same Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134 Replace Missing Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132 Define Dates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143 xiii . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127 Rank Cases: Types. . . . . . . . . . . . . . . 142 Transpose . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131 Time Series Data Transformations . . . . . . . . . . . . . . . . . . . . . . . 128 Rank Cases: Ties . . . . . . . . . . . . . . . . . . 137 8 File Handling and File Transformations 141 Sort Cases . . . . . . . . . . . . . . . 119 Random Number Seed . . . . . . . . 118 Functions . 118 Missing Values in Functions . . . . . . . . . . . 142 To Sort Cases. . . . . . . . 143 To Transpose Variables and Cases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122 Recode into Different Variables . . . . . 119 Count Occurrences of Values within Cases . . . . . . . . . . . . . . . . 129 Categorize Variables . . . . . . . . . . . . . . . . . . . 132 Create Time Series . . . . . . . . . . . . . . 121 Recoding Values . . . . . . . . . . . . . . . . . . . . . 143 Merging Data Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130 Automatic Recode . . . . . . . . 117 Compute Variable: Type and Label . . . . . . . . . . . . . . . . . . . . . 125 Rank Cases. . . 120 Count Values within Cases: Values to Count . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115 Compute Variable: If Cases . . .

. . . 165 . . . . 158 To Weight Cases . . 147 Add Variables. . . . . . . . . . . . . . . . . . . . . . . . . . 147 To Merge Files with the Same Cases but Different Variables. . . . . . 159 Restructuring Data . . . . . . . . . . . . . . . . . . . .Add Cases. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160 . . . . . . . . . . . . . . . . . . . . . . . . Restructure Data Wizard (Variables to Cases): Create Index Variables. 149 Add Variables: Rename . . . . . . . . . . . . . . . . . . . . . . . . 151 Aggregate Data: Variable Name and Label . . . Restructure Data Wizard (Variables to Cases): Select Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160 To Restructure Data . . . . . . . . . . . . . . . . . . . . . . . . . 173 . . . . . . . 152 Split File . 154 Select Cases . . . . . . . . . . . . . . Restructure Data Wizard: Select Type . . . . . . . . . . . 150 To Aggregate a Data File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149 Aggregate Data. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169 . . . 171 . . . Restructure Data Wizard (Variables to Cases): Options . . . . . . . . . . . . Select Cases: Random Sample Select Cases: Range . . . . . . . . . . . . . 145 Add Cases: Rename . . . . . . . . . . . . . . . . . . . . . . . . . Restructure Data Wizard (Variables to Cases): Number of Variable Groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166 . . . . Select Cases: If . . . 146 Add Cases: Dictionary Information . . . . . . 174 xiv . . . . . . . . . . . . . . . . 151 Aggregate Data: Aggregate Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153 To Split a Data File for Analysis . . . Restructure Data Wizard (Variables to Cases): Create Multiple Index Variables . . Restructure Data Wizard (Variables to Cases): Create One Index Variable. . . . . . . . . . 155 156 156 157 Weight Cases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144 To Merge Data Files with the Same Variables and Different Cases . . . . . . . . . . . . . . . 154 To Select a Subset of Cases. . . . .

. . . . . . . . . . . . . . . . . . . . . . 201 . . . . . . . 194 . . . . . . . . . . . . . . . . . 194 . . . . . . 200 . . . . . . . . Copying and Pasting Results into Another Application . . . . . . and Copying Output Changing Alignment . . . . 204 xv . . . . . . . . . . . . . . . 188 . 183 Using Output in Other Applications . . . . . . . . . . . . . . . . . . . . 193 . . . . . Chart Size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183 . . . . . . . . . 186 . . . . . . 181 9 Working with Output Using the Draft Viewer . . . . 176 . . . . 192 . . . . . . . . . . . . . Embedding a Table in Another Application . . . . . . . . . . . . . . . . Copying and Pasting Multiple Items into Another Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Deleting. . . . 187 . . . . . . . . . . . . . . . . . . . . . . . 185 . . . . . . . . . . . . . . . . . . . . 194 . . . . . 179 . . . . . . Restructure Data Wizard (Cases to Variables): Sort Data Restructure Data Wizard (Cases to Variables): Options . . . . . . . 185 . . . Word/RTF. . . . . . Showing and Hiding Results . . . . . . . . . . . Viewer Outline . . . . 192 . . . . and Excel Options Text Options . . . . 195 Pasting Objects from Other Applications into the Viewer . . . . . . . . . 195 Viewer . . . . . . . Pasting a Pivot Table as Text. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191 Copying a Table or Chart . . . . JPEG Chart Export Options . . . . . . . . . . . . 203 . . . . . . . . . . . . . . . 177 . . . . . . . . . . . . . . Moving. 199 . 195 Paste Special. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202 . 196 Exporting Output . . . . Pasting a Pivot Table or Chart as a Picture (Metafile) . . . . . . . BMP and PICT Chart Export Options PNG and TIFF Chart Export Options . . . . . . . . . . . . Restructure Data Wizard: Finish . . . . . . . . . . . . . . . . . . . . Pasting a Pivot Table as a Table (RTF) . . . . 196 Export Output . . . . 203 . . . . . . . . . . . . . . . 198 . . . . . . . . . Pasting Objects into the Viewer . . . HTML. . . . . . . . . .Restructure Data Wizard (Cases to Variables): Select Variables . . . . . . . . . . . . . . . . . . EPS Chart Export Options .

. . . 206 Page Setup . . . . . . . . . . . . .WMF Chart Export Options . . . . 206 Print Preview . . . . 214 Controlling Draft Output Format . . . . . . . . . . 231 Showing and Hiding Cells . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219 To Change Fonts in Draft Viewer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228 Bookmarks . . . . . 212 Save With Password Option. . . . . . . . . . . . . . . 212 10 Draft Viewer 213 Draft Viewer Output . . . . . . . . . . . 208 Saving Output. . . . . . . . . . . . . . . . . . . . . . . 219 Printing Draft Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223 Working with Layers . . . . 213 To Create Draft Output . . . . . . . . . . . . . . . . . . . . . . . . . 221 To Save Draft Output as Text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212 Saving a Viewer Document . . . . . . . . . . . . . . . . . . . . 205 Printing Output and Charts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221 11 Pivot Tables 223 Manipulating a Pivot Table . . . . . . . . . . . . . . . . . . . . . 221 Saving Draft Viewer Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220 Draft Viewer Print Preview . . . . . . . . . . . . . . 215 To Set Draft Viewer Options. . . . . . . . . . . . . . 205 Viewer Printing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233 Editing Results . . . . . . . . . 220 To View Draft Viewer Print Preview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205 Setting Chart Export Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219 Fonts in Draft Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234 xvi . . .

. . . 254 12 Working with Command Syntax 257 Command Syntax Rules . . . . . . . . . . 237 . . . . . . Footnote Marker . . . . 266 To Obtain Frequencies and Statistics. . . . . . . . . . . 259 Using Syntax from the Output Log. . . . . . 251 . . . . . . . . . . . . . . . . . . . 250 . . . . . . . . . . . . . . 269 Frequencies Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . 270 xvii . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Changing the Appearance of Tables . 263 13 Frequencies 265 Sample Output . . . . . . . . . . . . . . . . . . . . . . . . 244 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 268 Frequencies Charts . . . . . . . . . . . . . . . . . Selecting Rows and Columns in Pivot Tables Modifying Pivot Table Results . . . . . . 252 Printing Pivot Tables . . . . . . . . 253 Controlling Table Breaks for Wide and Long Tables . 263 Execute Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 260 Using Syntax from the Journal File . . . . . . . . . . . . . . . . . . . . . . . . 267 Frequencies Statistics. . . 259 To Paste Command Syntax from a Dialog Box . . . . . . . . . . . . . . . . . . . . . . . . . . . 257 Creating Command Syntax from Dialog Boxes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Cell Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Font . . Set Data Cell Widths. . . . . . . . . . . . . . . . . 261 To Run Command Syntax. . . . . 245 . . . . . . . . . . . . . . . . 246 . . . 235 . . . . Table Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . 272 Descriptives Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 284 Crosstabs Layers . . . . . . . . . 273 15 Explore 275 Sample Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285 286 286 288 288 17 Summarize 289 Sample Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 279 Explore Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277 Explore Statistics . . . . . . . . . . . . . . . . . . . . . 290 Summarize Options . . . . . 276 To Explore Your Data . . . . . . . . . . . Crosstabs Table Format . . . . . . . . . . . . . . . . . . 291 Summarize Statistics . . . . . . . . . . . . . . . . . Crosstabs Clustered Bar Charts Crosstabs Statistics . .14 Descriptives 271 Sample Output . . . 272 To Obtain Descriptive Statistics . . . . . . . . . . . . . 284 To Obtain Crosstabulations . . . . . . . . . . . . . . . . . . . . . . . . . . 278 Explore Plots . . . . . . . . . . . . . . . . . . . . . . . 281 16 Crosstabs 283 Sample Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 290 To Obtain Case Summaries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Crosstabs Cell Display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 292 xviii . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . 307 Sample Output . . . . . . . . . . . . . . . . . . . 295 Means Options . . . . . . . . . . . . . . . . . . . . . . . . . . . 311 To Obtain a One-Sample T Test . . . . . . . . . . . . . . . . 309 Paired-Samples T Test Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 305 Independent-Samples T Test Define Groups . . . . . . . . . . . . 303 Sample Output . . . . 304 To Obtain an Independent-Samples T Test . . . . . . . . . . . . . . . 298 To Obtain OLAP Cubes . . . . . . . . . . . . . . . . . . . . . . . . . . . . 302 20 T Tests 303 Independent-Samples T Test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 310 One-Sample T Test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 296 19 OLAP Cubes 297 Sample Output . . . . . . . . . . . . . . . . . . 312 xix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 301 OLAP Cubes Title. . . . . . . . . . . . 294 To Obtain Means . . . . . . . . . . . . . . 306 Independent-Samples T Test Options . . . . . . . . . . . . . . . 310 Sample Output . . . . 299 OLAP Cubes Statistics. . 307 Paired-Samples T Test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .18 Means 293 Sample Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312 One-Sample T Test Options. . . . . . . . . . . . . . . 300 OLAP Cubes Differences . . . . . . . 308 To Obtain a Paired-Samples T Test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . GLM Univariate Post Hoc Multiple Comparisons for Observed Means . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 327 . . . . 320 22 GLM Univariate Analysis 323 Sample Output . 332 335 336 337 23 Bivariate Correlations 339 Sample Output . . . . . . . . . . . . . . . UNIANOVA Command Additional Features . . . . . . . . . . . . . . . .21 One-Way Analysis of Variance 315 Sample Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 316 To Obtain a One-Way Analysis of Variance. . . 340 To Obtain Bivariate Correlations . . . . . . . . . . . . . . . . . . . . . . . . GLM Univariate Profile Plots . . . 319 One-Way ANOVA Options . . . . . . . . . . . . . . . . . . 331 . 325 To Obtain a GLM Univariate Analysis . . 341 Bivariate Correlations Options . . . 326 GLM Univariate Model . GLM Univariate Save . . . . . 342 CORRELATIONS and NONPAR CORR Command Additional Features. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . GLM Univariate Contrasts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 343 xx . . . . . . . . . . . . . . . . . . . . . . . 317 One-Way ANOVA Contrasts. . . . . . . . . . 318 One-Way ANOVA Post Hoc Tests . . . . . . . . . . . . . . . . . . . . . . . . 329 . . . . . . . . . . GLM Univariate Options . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 360 . . . .24 Partial Correlations 345 Sample Output . 347 Partial Correlations Options . . . . . . . . . . . . . . . 362 27 Curve Estimation 363 Sample Output . Linear Regression Options . . . . . . . . . 358 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 346 To Obtain Partial Correlations . . . . . . . . . . . . . . . . . . . . . 364 To Obtain a Curve Estimation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Linear Regression Plots . 358 . . . . Linear Regression Statistics . . . . 359 . . . . . . . . . . . . . . . . 352 26 Linear Regression 353 Sample Output . . . . . 350 Distances Dissimilarity Measures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 354 To Obtain a Linear Regression Analysis . . . 367 xxi . . . . . . . . . . . . . . . . . 366 Curve Estimation Save . . . . . . . . . . . . . Linear Regression Save . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 365 Curve Estimation Models . . . . . . . . . . . . . . . 348 25 Distances 349 To Obtain a Distance Matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 351 Distances Similarity Measures . . . . . . . . . . . 356 Linear Regression Variable Selection Methods Linear Regression Set Rule . . . . . . . . . . . . . . . . . . . . . . . . . 357 . . . . . . . . . .

. . . . . . . . . . . . . . 372 372 373 373 374 375 29 Factor Analysis 377 Sample Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 387 To Specify Factor Analysis Options . . . . . . . . . . . . . . . . . . 386 To Specify Factor Score Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 385 To Specify Rotation Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Discriminant Analysis Stepwise Method Discriminant Analysis Classification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 370 To Obtain a Discriminant Analysis . . . . . . . Discriminant Analysis Statistics . Discriminant Analysis Select Cases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 371 Discriminant Analysis Define Range . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 386 Factor Analysis Options . . . . . 382 Factor Analysis Descriptives . . . 379 To Obtain a Factor Analysis. . . . . . . . . . . . . . . . . . . . . . . 384 Factor Analysis Extraction. . . . . . . . 387 xxii . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 385 Factor Analysis Rotation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .28 Discriminant Analysis 369 Sample Output . . . . . . . . . . . . . . . . . . . . . . . . . 383 To Specify Descriptive Statistics and Correlation Coefficients . . . . . . . . 384 To Specify Extraction Options . . . . . . . 386 Factor Analysis Scores . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 382 Factor Analysis Select Cases . . . . Discriminant Analysis Save . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 408 33 K-Means Cluster Analysis 409 Sample Output . . . . . . 398 32 Hierarchical Cluster Analysis 401 Sample Output . . . . . . . . 414 . . . . . . . Hierarchical Cluster Analysis Plots . . . . . . . . . . . . . . 415 . . . . . . . . . . 402 To Obtain a Hierarchical Cluster Analysis . . . . 397 TwoStep Cluster Analysis Output . . . . . . . . . . . . . . . . . . 415 xxiii . . . . . . . . . . . . . 408 . . . . . . . . . . . . . . . . . . .30 Choosing a Procedure for Clustering 31 TwoStep Cluster Analysis 389 391 To Obtain a TwoStep Cluster Analysis . 406 . . . . . . . . . . . . . . . . . . . . K-Means Cluster Analysis Options . . 410 To Obtain a K-Means Cluster Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K-Means Cluster Analysis Save . . . . . . . . . . 413 K-Means Cluster Analysis Efficiency K-Means Cluster Analysis Iterate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Hierarchical Cluster Analysis Statistics. . 405 Hierarchical Cluster Analysis Method . . . . . . . . . . . . . . . . . . . . . . 414 . . . . . . . . 393 TwoStep Cluster Analysis Options. . . . . . . . . . . . . . . . . . . . 394 TwoStep Cluster Analysis Plots . Hierarchical Cluster Analysis Save New Variables . . . . . . . . . . . . . . . . . 407 . . . . . .

. . . . . . . . . . 436 xxiv . . . . . . . . . . . . 426 To Obtain a Runs Test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 430 To Obtain a One-Sample Kolmogorov-Smirnov Test. . . . . . . . . . . . 433 To Obtain Two-Independent-Samples Tests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 434 Two-Independent-Samples Tests Define Groups . . . . . . . . . . . . . . . . . . . . . . . . . . . 427 Runs Test Cut Point. . 432 Sample Output . . . . . . . . . 422 Sample Output . . . . . . . . . . . . . 431 NPAR TESTS Command Additional Features (One-Sample Kolmogorov-Smirnov Test) . . . . . . . . . . . . . . 425 Sample Output . . . . . . . . . . . . . . . 421 Chi-Square Test Options . . . . . . . . . . . . . . . . . . . . . 434 Two-Independent-Samples Test Types . . . . . . . . . . 425 Runs Test . . . . . . . . . . . . 421 NPAR TESTS Command Additional Features (Chi-Square Test) . . . . . 424 NPAR TESTS Command Additional Features (Binomial Test) . . . . .34 Nonparametric Tests 417 Chi-Square Test . . . . . . . . . . . . . . . . . . . 435 Two-Independent-Samples Tests Options . . . . . . . . . . . . . . . . 420 Chi-Square Test Expected Range and Expected Values. . . . . . . . . . . . . . . . . . . . 423 To Obtain a Binomial Test . . . . . . 432 Two-Independent-Samples Tests . . . . . . . . . . . . . 427 Runs Test Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 422 Binomial Test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 428 One-Sample Kolmogorov-Smirnov Test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 419 To Obtain a Chi-Square Test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 429 Sample Output . . . . . 430 One-Sample Kolmogorov-Smirnov Test Options . 418 Sample Output . . . . . . . . 424 Binomial Test Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 428 NPAR TESTS Command Additional Features (Runs Test) . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . 450 Sample Output . . . . . . . . . 451 Multiple Response Crosstabs . . . . . . . . . . . . . . . 452 xxv . . . . . . . . 446 NPAR TESTS Command Additional Features (K Related Samples) . . . . . 438 . 444 Tests for Several Related Samples . . . . . . . . . . . . . . . . . . . 451 To Obtain Multiple Response Frequencies. . . . . . . . . . . . . . . 441 To Obtain Two-Related-Samples Tests. . . . . . . . . . . 439 . . . . . . . 442 Two-Related-Samples Tests Options . . . . . . . . . . . . . . . . . . . . . 444 Sample Output . . . . . . . 437 To Obtain Tests for Several Independent Samples . 449 Multiple Response Frequencies. . . . . . . . 444 To Obtain Tests for Several Related Samples . . . . . . . . . . . . . . . . . .NPAR TESTS Command Additional Features (Two Independent Samples) . . . . . . 440 Sample Output . . . . . . 446 35 Multiple Response Analysis 447 Multiple Response Define Sets . . . . . . 438 Several-Independent-Samples Test Types . . . . . . . . . . . 440 Two-Related-Samples Tests. . . . . . . . . . . . 436 Tests for Several Independent Samples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 445 Tests for Several Related Samples Test Types . . . . . . . . . . . . . . . . . . Tests for Several Independent Samples Options . . . . . . . . . . . . . . . Tests for Several Independent Samples Define Range . . . . . 439 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 443 NPAR TESTS Command Additional Features (Two Related Samples) . . . . . . . . 448 To Define Multiple Response Sets . . . . . . . . . . . . . . . . . . . . . . . . . . . NPAR TESTS Command Additional Features (K Independent Samples) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 442 Two-Related-Samples Test Types . . . . . . . . . 446 Tests for Several Related Samples Statistics . . . . . . . . . . . . . 437 Sample Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . Report Summary Lines . . . . . . . . . . . . . . . . . . . . . . . . . . . . Report Column Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Report Options . . . . . . . . . . . . . . . . . .Sample Output . . . . . . . . . . . . . . . . . . . . . . . . . . Report Break Options . . . . . . . . . . . . . . . . . . . Report Options for Summaries in Columns . . 457 . . . . . . . . . . . . . . . . . . . . . . . . . Total Summary Column . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Report Column Format . . . REPORT Command Additional Features . . . . . . . . . . . . . . . . . . . . Report Summary Lines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 456 36 Reporting Results Sample Output . . . . . . . . . . . . . . . . . . To Obtain a Summary Report: Summaries in Rows. . . . . . . . . . . . Report Break Options for Summaries in Columns . . . . . . . . . . . . . . . 454 Multiple Response Crosstabs Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxvi . . 458 459 460 461 462 462 463 464 466 466 467 468 469 469 470 470 471 Report Summaries in Rows . . . . . . . . . . . . . Report Layout . . . . . . . 465 Sample Output . . . . . . . . . . . . . . . . . . . . . . . . . . 455 MULT RESPONSE Command Additional Features . . . . . . . . . . . . . . . . . . 453 To Obtain Multiple Response Crosstabs . . . . . . . . . . . To Obtain a Summary Report: Summaries in Columns . . . . . . . . Report Titles . . . Report Layout for Summaries in Columns . . 454 Multiple Response Crosstabs Define Variable Ranges . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 457 Report Summaries in Columns . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Subtitles. 476 RELIABILITY Command Additional Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 494 Chart Definition Global Options . Multidimensional Scaling Create Measure. . 491 Modifying the Chart . . . . . . . . . . . . . . . . . . 479 . 496 Options . . . . . . . . . . . 481 . . . . . . . . . . 474 To Obtain a Reliability Analysis . . . . . . . . . . . . . . . . . . . 485 To Obtain a Multidimensional Scaling Analysis . . . . . . . . . . . . . Multidimensional Scaling Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 477 38 Multidimensional Scaling Multidimensional Scaling Shape of Data . . . . . . . . . 491 Creating the Chart . . . 480 39 Ratio Statistics 487 To Obtain Ratio Statistics . . . . . . . . . . . . . . . . 482 . . . . . . . .37 Reliability Analysis 473 Sample Output . . . . . 475 Reliability Analysis Statistics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 495 Titles. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 483 . . . . . . . 489 40 Overview of the Chart Facility 491 Creating and Modifying a Chart . . . . . . . . . . . . . Multidimensional Scaling Model. . . . . . 500 xxvii . . . and Footnotes. . . . . . . . . 484 . . . . . 488 Ratio Statistics . . . . 497 Chart Templates . . . . . . . . . . . . . . Multidimensional Scaling Command Additional Features . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . 519 Chart Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 520 Interactive Chart Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 522 Data Options . . . . . . . . . . . . . . . . . . . 521 Pivot Table Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 514 Viewer Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 505 ROC Curve Options . . . . . . . . . . . . . . 524 Currency Options. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 511 43 Options 513 General Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 508 Variable Sets . . . 516 Draft Viewer Options. . . . . . . . . . . . . . 506 42 Utilities 507 Variable Information . . . . . . . . . 517 Output Label Options. . . .41 ROC Curves 503 Sample Output . . . . . . . . . . . . . 527 xxviii . . . . . . . . . . . . . . . . . . . . . 509 Use Sets . . . . . . . . . . . . . . . . . . . . 525 To Create Custom Currency Formats. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 508 To Define Variable Sets . 504 Obtaining an ROC Curve . . . . . . . . . . . . . . . 526 Script Options. . . . . . . . . . . . . . . . . . . . . . . . . 510 Reordering Target Variable Lists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 526 To Specify Global Procedure File and Autoscript File . . . . . . . . . . . . . . . . . . . . 507 To Obtain Variable Information . . . . . . . . . . . . . . . . .

. 547 Running Production Jobs from a Command Line . . . . . . . . . . . . 545 Format Control for Production Jobs. . . . . . . . . . . . . 556 Script Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 552 Autoscripts. . . . . . . . . . . . . . . . . 542 Production Macro Prompting . 556 xxix . . . . . . . . . . . . . . . . . . . 540 User Prompts . . . . . . .44 Customizing Menus and Toolbars 529 Menu Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 530 To Customize Toolbars . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 555 To Edit a Script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 548 Publish to Web . . . 538 Export Options . . . . . . . . . . . . . . . . 545 Creating a Custom Default TableLook . . . . . . . . . . . . . . . . 544 Changing Production Options . . . . . . . . . . . . . . . . . . . 547 Controlling Pivot Table Format with Command Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . 550 46 Scripting Facility 551 To Run a Script . . 553 Creating and Editing Scripts . . . . . . . . . 531 45 Production Facility 537 Syntax Rules for the Production Facility . . . . . . . . . . . 529 Customizing Toolbars . . . . . . . . . . . . . . . . . . 529 To Add Items to the Menus . . . . . . . . . . . . . . . . . . . . . 544 Production Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 546 Setting Options for Production Jobs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 549 SmartViewer Web Server Login . . . .

. . . . . . 571 To Add a New Procedure in a Script . . . . . 586 To Use a Different File or Location for Custom HTML Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . The Object Browser . . . . . . . . . . . . 586 Index xxx 589 . . . . 560 How Scripts Work . . . . . . . . 582 Appendix A Database Access Administrator Appendix B Customizing HTML Documents 583 585 To Add Customized HTML Code to Exported Output Documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 572 Adding a Description to a Script . . . . . . . . . 564 Declaring Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 574 Dialog Monitor Functions (DialogFunc) . . . . . . . . . . . 578 To Step through a Script . . . . . . . . . . . . . . . . . 571 Global Procedures . . 579 Script Files and Syntax Files . . . . . . . . . . . . . . . . . . . . 580 Running Command Syntax from a Script. . . . . . . . . . . . . . . . . . . 580 Running a Script from Command Syntax. . . . . . . . . . . . . . . . . . . . .Starter Scripts. . . . . . . . . . . . . . . . . . . . . . . . . . . . 585 Content and Format of the Text File for Customized HTML . . . . . . . . . . . . . . . . . . . . . . . . . . . . 578 The Debugging Pane . Getting Automation Objects . . . . 575 Debugging Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 558 Creating Autoscripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 573 Scripting Custom Dialog Boxes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 573 To Create a Custom Dialog Box . . 565 566 568 570 Procedures . . . . . . . . . . . . . . . . . Properties and Methods . . . . . . . . . . . . . . . . . . .

Viewer. Multidimensional pivot tables. and displaying data. 1 . scatterplots. The Viewer makes it easy to browse your results. Explore your tables by rearranging rows. Compare groups easily by splitting your table so that only one group is displayed at a time. Retrieve information from databases by using the Database Wizard instead of complicated SQL queries. selectively show and hide output. Your results come alive with multidimensional pivot tables. High-resolution. 3-D graphics. Uncover important findings that can get lost in standard reports. histograms. SPSS for Windows provides: Data Editor. and layers. A versatile spreadsheet-like system for defining. and move presentation-quality tables and charts between SPSS and other applications. entering. bar charts. columns. using descriptive menus and simple dialog boxes to do most of the work for you. High-resolution graphics.Chapter 1 Overview SPSS for Windows provides a powerful statistical analysis and data management system in a graphical environment. Database access. Most tasks can be accomplished simply by pointing and clicking the mouse. and more are included as standard features in SPSS. full-color pie charts. change the display order results. In addition to the simple point-and-click interface for statistical analysis. editing.

aggregate. or export tables and charts in HTML format for Internet and intranet distribution. Copy Data Properties is available on the Data menu in the Data Editor window. Detailed tutorials provide a comprehensive overview. see “Copying Data Properties” in the chapter Data Preparation.5? There are a number of new features in SPSS 11. For more information. Online Help. You can now export entire Viewer documents or selected output objects in Word/RTF format and Excel format (charts are not included in Excel format). see “Saving Data: Data File Types” in the chapter Data Files. and SAS Transport file format. New data definition tools. see “Defining Variable Properties” in the chapter Data Preparation. and provides an auto-label feature. What’s New in SPSS 11. You can also use variables in the working data file as templates for other variables in the working data file. and more. combine categories.2 Chapter 1 Data transformations. You can now save data files in SAS version 6. Transformation features help get your data ready for analysis. identifies unlabeled values. and transpose files. For more information. 0 = Male. SAS version 7. 1 = Female. Expanded support for SAS format data files. n Define Variable Properties (also available on the Data menu in the Data Editor window) scans your data and lists all unique data values for any selected variables. merge. Expanded output export capabilities. and Case Studies provide hands-on examples of how to use statistical procedures and interpret the results. For more information. You can easily subset data.5. see “Export Output” in the chapter Working with Output. . split. add. the Statistics Coach helps you find the procedures that you need. This is particularly useful for categorical variables that use numeric codes to represent categories—for example. context-sensitive Help topics in dialog boxes guide you through specific tasks. pop-up definitions in pivot table results explain statistical terms. Electronic distribution. For more information. Send e-mail reports to others with the click of a button. Two new features make defining data faster and easier: n The Copy Data Properties wizard provides the ability to use an external SPSS data file as a template for defining file and variable properties in the working data file.

New Custom Tables option. you will discover that almost everything is new in this release. This new clustering procedure offers the following features not available in the other SPSS clustering procedures: n Automatic selection of the best number of clusters. TwoStep Cluster Analysis. For more information. n Ability to analyze large data files with a single clustering procedure. including: n A simple. If you have used the Tables option in the past. in addition to measures for choosing between cluster models. n A single. You can now produce pivot table output in different languages and switch languages during the same session. n Ability to save the cluster model to an external XML file. see the chapter TwoStep Cluster Analysis. drag-and-drop table builder interface that allows you to preview your table as you select variables and options. unified table builder interface instead of multiple menu choices and dialog boxes for different types of tables. . n Custom control over category display order and ability to selectively show or hide categories. It is only available if you have purchased the Tables add-on option. For more information. n Subtotals for subsets of categories of a categorical variable. see “General Options” in the chapter Options. then read that file and update the cluster model using newer data. n Ability to create cluster models simultaneously based on categorical and continuous variables.3 Overview Multiple output languages. Note: Custom Tables is not included in the SPSS Base system.

Pivot Table Editor. Output displayed in pivot tables can be modified in many ways with the Pivot Table Editor. color. Chart Editor. swap data in rows and columns. You can create new data files or modify existing ones with the Data Editor. style. A Viewer window opens automatically the first time you run a procedure that generates output. Viewer. The Data Editor window opens automatically when you start an SPSS session. tables. Script Editor. and even change the chart type. and charts are displayed in the Viewer. You can edit text. You can display output as simple text (instead of interactive pivot tables) in the Draft Viewer. You can edit the output and change font characteristics (type. Use the Script Editor to create and modify basic scripts. select different type fonts or sizes. Syntax Editor. You can save these commands in a file for use in subsequent SPSS sessions. create multidimensional tables. Text output not displayed in pivot tables can be modified with the Text Output Editor. switch the horizontal and vertical axes. You can paste your dialog box choices into a syntax window. You can edit the output and save it for later use. You can then edit the command syntax to use special features of SPSS not available through dialog boxes. You can have only one data file open at a time. .4 Chapter 1 Windows There are a number of different types of windows in SPSS: Data Editor. size). Draft Viewer. All statistical results. You can modify high-resolution charts and plots in chart windows. Text Output Editor. You can change the colors. Scripting and OLE automation allow you to customize and automate many tasks in SPSS. This window displays the contents of the data file. where your selections appear in the form of command syntax. and selectively hide and show results. add color. rotate 3-D scatterplots.

command syntax is pasted into the designated Syntax Editor window. If you open a new Syntax Editor or Viewer window. . You can change the designated windows at any time. If you have more than one open Syntax Editor window.5 Overview Figure 1-1 Data Editor and Viewer Designated versus Active Window If you have more than one open Viewer window. that window automatically becomes the active window and the designated window. If you have overlapping windows. The designated windows are indicated by an exclamation point (!) in the status bar. The designated window should not be confused with the active window. the active window appears in the foreground. output is routed to the designated Viewer window. which is the currently selected window.

6 Chapter 1 Changing the Designated Window Make the window that you want to designate the active window (click anywhere in the window). ToolTips provide a brief description of each tool when you put the mouse pointer on the tool. Each window in SPSS has its own menu bar with menu selections appropriate for that window type. The Analyze and Graphs menus are available on all windows. Click the Designate Window tool on the toolbar (the one with the exclamation point). Some windows have more than one toolbar. making it easy to generate new output without having to switch windows. Toolbars Each SPSS window has its own toolbar that provides quick. or From the menus choose: Utilities Designate Window Figure 1-2 Designate Window tool Menus Many of the tasks that you want to perform with SPSS start with menu selections. easy access to common tasks. Figure 1-3 Toolbar with ToolTip Help .

n Dragging the toolbar to the top or bottom of the window attaches the toolbar horizontally. Drag the toolbar to where you want it. right. or bottom of the window. floating toolbar. n Customize toolbars to contain the features that you use most often. . n Display toolbars vertically or horizontally. n Display toolbars as floating palettes anywhere inside or outside of the window.. including scripts. attached to the left.7 Overview You can control the display of toolbars in several ways: n Show or hide toolbars. n Dragging the toolbar to the left or right side of the window attaches a toolbar vertically to that side. top. select the toolbars that you want to show (or hide).. Showing and Hiding Toolbars From the menus choose: View Toolbars. In the Show Toolbars dialog box. Moving Toolbars Click anywhere in the toolbar outside of the toolbar buttons. n Dragging the toolbar anywhere other than the window borders creates a detached.

. the message Filter on indicates that some type of case filtering is currently in effect and not all cases in the data file are included in the analysis. For each procedure or command that you run. the number of iterations is displayed.8 Chapter 1 Figure 1-4 Floating toolbars Status Bar The status bar at the bottom of each SPSS window provides the following information: Command status. For statistical procedures that require iterative processing. Filter status. a case counter indicates the number of cases processed so far. If you have selected a random sample or a subset of cases for analysis.

Target variable list(s). For information on individual controls in a dialog box. click the control with the right mouse button. A list of variables in the working data file. such as run the procedure. Showing and Hiding the Status Bar From the menus choose: View Status Bar Dialog Boxes Most menu selections open dialog boxes. based on the values of one or more grouping variables. Split File status. . The message Split File on indicates that the data file has been split into separate groups for analysis. display Help. such as dependent and independent variable lists. You use dialog boxes to select variables and options for analysis. or open a subdialog box to make additional specifications.9 Overview Weight status. Each main dialog box for statistical procedures and charts has several basic components: Source variable list. Use of short string and long string variables is restricted in many procedures. Buttons that instruct the program to perform an action. The message Weight on indicates that a weight variable is being used to weight cases for analysis. Only variable types allowed by the selected procedure are displayed in the source list. Command pushbuttons. One or more lists indicating the variables that you have chosen for the analysis.

n If no variable label is defined. use Variable View in the Data Editor. variable labels often provide more descriptive information. n For long labels. n To define or modify variable labels. n To control the display of variable names or labels.10 Chapter 1 Figure 1-5 Dialog box controls Variable Names and Variable Labels in Dialog Box Lists You can display either variable names or variable labels in dialog box lists. n For data imported from database sources. position the mouse pointer over the label in the list to view the entire label. field names are used as variable labels. choose Options from the Edit menu in any window. the variable name is displayed. Since variable names are limited to eight characters. .

11 Overview Figure 1-6 Variable labels displayed in a dialog box Dialog Box Pushbuttons There are five standard command pushbuttons in most dialog boxes: OK. You can then customize the commands with additional features not available from dialog boxes. dialog box settings are persistent. . This takes you to a standard Microsoft Help window that contains information about the current dialog box. Reset. You can also get help on individual dialog box controls by clicking the control with the right mouse button. Paste. Generates command syntax from the dialog box selections and pastes the syntax into a syntax window. Deselects any variables in the selected variable list(s) and resets all specifications in the dialog box and any subdialog boxes to the default state. Context-sensitive Help. After you select your variables and choose any additional specifications. click OK to run the procedure. Within a session. Cancel. Runs the procedure. Cancels any changes in the dialog box settings since the last time it was opened and closes the dialog box. This also closes the dialog box. Help. A dialog box retains your last set of specifications until you override them.

. pushbuttons with an ellipsis (. then Ctrl-click the next variable. use the Ctrl-click method. n To select all variables in the list. and so on. you can double-click individual variables to move them from the source list to the target list.12 Chapter 1 Subdialog Boxes Since most procedures provide a great deal of flexibility. you simply highlight it on the source variable list and click the right arrow button next to the target variable list.. You can also select multiple variables: n To select multiple variables that are grouped together on the variable list. Selecting Variables To select a single variable. click the first one and then Shift-click the last one in the group. press Ctrl-A.. If there is only one target variable list. Additional specifications are made in subdialog boxes.) after the name indicate that a subdialog box will be displayed. The main dialog box usually contains the minimum information required to run a procedure. Click the first variable. not all of the possible choices can be contained in a single dialog box. n To select multiple variables that are not grouped together on the variable list. In the main dialog box.

. A pop-up window displays information about the control. Select What’s This? on the pop-up context menu. Right-click anywhere in the list. Select Variable Information in the pop-up context menu. Figure 1-7 Variable information with the right mouse button Getting Information about Dialog Box Controls Right-click the control you want to know about.13 Overview Getting Information about Variables in Dialog Boxes Left-click a variable in a list to select it.

All you have to do is: Get your data into SPSS. The variables in the data file are displayed in a dialog box for the procedure. Select a procedure from the menus to calculate statistics or to create a chart. Results are displayed in the Viewer. . Select a procedure. Select the variables for the analysis. database. read a spreadsheet.14 Chapter 1 Figure 1-8 Right mouse button “What’s This?” pop-up Help for dialog box controls Basic Steps in Data Analysis Analyzing data with SPSS is easy. or enter your data directly in the Data Editor. or text data file. Run the procedure and look at the results. You can open a previously saved SPSS data file.

commonly used statistical techniques. and visual examples that help you select the basic statistical and charting features that are best suited for your data. from the menus in any SPSS window choose: Help Statistics Coach The Statistics Coach covers only a selected subset of procedures in the SPSS Base system. Finding Out More about SPSS For a comprehensive overview of SPSS basics. see the online tutorial. To use the Statistics Coach.15 Overview Statistics Coach If you are unfamiliar with SPSS or with the statistical procedures available in SPSS. the Statistics Coach can help you get started by prompting you with simple questions. It is designed to provide general assistance for many of the basic. nontechnical language. From any SPSS menu choose: Help Tutorial .

.

which you can use to find specific Help topics. Dialog box Help buttons. Case Studies. Most dialog boxes have a Help button that takes you directly to a Help topic for that dialog box. Tutorial. If you did not install the SPSS Syntax Reference Guide when you 17 . Every window has a Help menu on the menu bar. Select Tutorial on the Help menu in any window to access the online introductory tutorial.Chapter 2 Getting Help Online Help is provided in several ways: Help menu. Right-click on terms in an activated pivot table in the Viewer and select What’s This? from the context menu to display definitions of the terms. CD-ROM Syntax Reference Guide. The Case Studies item on the Help menu in the Viewer window provides hands-on examples of how to create various types of statistical analyses and how to interpret the results. The sample data files used in the examples are also provided so you can work through the examples to see exactly how the results were produced. The SPSS Syntax Reference Guide is available from the Help menu. Right-click on any control in a dialog box and select What’s This? from the context menu to display a description of the control and directions for its use. Pivot table context menu Help. Detailed syntax reference information is available online with the CD-ROM version. Topics provides access to the Contents and Index tabs. The Help topic provides general information and links to related topics. Dialog box context menu Help. Tutorial provides access to the introductory tutorial.

Using the Help Table of Contents In any window. and the SPSS Syntax Reference Guide requires Adobe Acrobat. Double-click items with a book icon to expand or collapse the contents. in the Setup program select Custom for the type of installation and then select Syntax Guide.18 Chapter 2 installed this software. from the menus choose: Help Topics Click the Contents tab. Note: The Help system requires Internet Explorer 5 or later. Click an item to go to that Help topic. you will need the CD-ROM to access it. (It is not available with some versions. Installable versions of both are provided on the CD.) To install the SPSS Syntax Reference Guide. Figure 2-1 Help window with Contents tab displayed .

The Help index uses incremental search to find the text that you enter and selects the closest match in the index. Double-click the topic that you want. Figure 2-2 Index tab and incremental search .19 Getting Help Using the Help Index In any window. Enter a term to search for in the index. from the menus choose: Help Topics Click the Index tab.

General information about a dialog box is available from the Help button in the dialog box.20 Chapter 2 Getting Help on Dialog Box Controls Right-click on the dialog box control that you want information about. Figure 2-3 Dialog box control Help with right mouse button Getting Help on Output Terms Double-click the pivot table to activate it. A description of the control and how to use it is displayed in a pop-up window. Choose What’s This? from the context menu. Choose What’s This? from the pop-up context menu. A definition of the term is displayed in a pop-up window. Right-click on the term that you want to be explained. .

Choose Case Studies from the pop-up context menu. Choose Copy from the context menu. The entire text of the pop-up window is copied. . Copying Help Text from a Pop-Up Window Right-click anywhere in the pop-up window.21 Getting Help Figure 2-4 Activated pivot table glossary Help with right mouse button Using Case Studies Right-click on a pivot table in the Viewer window.

.

To Open Data Files From the menus choose: File Open Data. Click Open. and tab-delimited files without converting the files to an intermediate format or entering data definition information. and this software is designed to handle many of them. including: n Spreadsheets created with Lotus 1-2-3 and Excel n Database files created with dBASE and various SQL formats n Tab-delimited and other types of ASCII text files n Data files in SPSS format created on other operating systems n SYSTAT data files n SAS data files Opening a Data File In addition to files saved in SPSS format. dBASE.Chapter 3 Data Files Data files come in a wide variety of formats. Lotus 1-2-3. In the Open File dialog box. 23 . you can open Excel. select the file that you want to open...

SPSS/PC+.0. ASCII text file. or 1A of Lotus. Opens dBASE-format files for either dBASE IV. HP. n Specify a range of cells to read for spreadsheet files. SAS Transport. Text. UNIX. SAS version 6 for UNIX (Sun. you can: n Read variable names from the first row for spreadsheet and tab-delimited files. or dBASE II. SYSTAT. and also the DOS product SPSS/PC+. Data File Types SPSS. short extension. . Opens data files saved in SPSS format. Opens SPSS/PC+ data files. a format used by some spreadsheet applications. long extension. Opens data files saved in SPSS portable format. SAS v6 for UNIX. SAS version 7-8 for Windows. dBASE. SAS version 6.08 for Windows and OS2. SYLK. Opens data files saved in 1-2-3 format for release 3. SAS transport file. SAS version 7-8 for Windows. SAS Short File Name. including SPSS for Windows. Each case is a record. Lotus 1-2-3. Opens data files saved in SYLK (symbolic link) format. Variable and value labels and missing-value specifications are lost when you save a file in this format. IBM). dBASE III or III PLUS.24 Chapter 3 Optionally. Macintosh. SAS v6 for Windows. Opens SYSTAT data files. SAS Long File Name. 2.0. n Specify a sheet within an Excel file to read (Excel 5 or later). Opens Excel files. Saving a file in portable format takes considerably longer than saving the file in SPSS format. SPSS Portable. Excel.

default variable names are assigned. For spreadsheets. blank cells are converted to the system-missing value. Each column is a variable. For string variables. non-unique names are converted to unique ones. Use the same method for specifying cell ranges as you would with the spreadsheet application. and blank cells are treated as valid string values. date and numeric). the Data Editor reads the first worksheet. the name is modified to create a unique variable name. a blank is a valid string value. Blank cells. they are truncated. Variable names. To read a different worksheet. If the names are longer than eight characters. select the worksheet from the drop-down list. For spreadsheet data files. you can read variable names from the first row of the file or the first row of the defined range. The data type and width for each variable is determined by the data type and width in the Excel file. For numeric variables. How the Data Editor Reads Older Excel Files and Other Spreadsheets The following rules apply to reading Excel files prior to version 5 and other spreadsheet data: Data type and width. Range. the data type is set to string. If the first eight characters do not create a unique variable name. names longer than eight characters are truncated. The data type and width for each variable are determined by the column width and data type of the first data cell in the column. Worksheet. If you do not read variable names from the Excel file. Excel 5 or later files can contain multiple worksheets. By default.25 Data Files Opening File Options Read variable names. and the original names are used as variable labels. you can also read a range of cells. indicated by a period. If the column contains more than one data type (for example. Values of other types . How the Data Editor Reads Excel 5 or Later Files The following rules apply to reading Excel 5 or later files: Data type and width. and all values are read as valid string values. If you read the first row of the Excel file (or the first row of the specified range) as variable names.

the column letters (A. D_R.) are used for variable names for Excel and Lotus files. The following general rules apply to dBASE files: n Field names are automatically translated to variable names. Reading Database Files You can read data from any database format for which you have a database driver. How the Data Editor Reads dBASE Files Database files are logically very similar to SPSS-format data files. a blank is a valid string value. If you do not read variable names from the spreadsheet.. In local analysis mode. C2. the field is dropped. For numeric variables. B. For string variables.). the global default data type for the spreadsheet (usually numeric) is used.. blank cells are converted to the system-missing value. . The software creates a new string variable. For more information about distributed analysis.26 Chapter 3 are converted to the system-missing value. If the first eight characters of the field name do not produce a unique name. n Records marked for deletion but not actually purged are included. the necessary drivers must be installed on your local computer. C3. . see Chapter 4. n Field names should comply with variable naming conventions for SPSS format. which contains an asterisk for cases marked for deletion. If the first data cell in the column is blank. n Colons used in dBASE field names are translated to underscores. For SYLK files and Excel files saved in R1C1 display format.. . indicated by a period. the drivers must be installed on the remote server.. In distributed analysis mode (available with the server version). and blank cells are treated as valid string values. C. Blank cells. Field names longer than eight characters are truncated. the software uses the column number preceded by the letter C for variable names (C1. Variable names.

27 Data Files

**To Read Database Files
**

From the menus choose: File Open Database New Query… Select the data source. Depending on the data source, you may need to select the database file and/or enter a

**login name, password, and other information.
**

Select the table(s) and fields. Specify any relationships between your tables.

**Optionally, you can:
**

n Specify any selection criteria for your data. n Add a prompt for user input to create a parameter query. n Define any variable attributes. n Save the query you have constructed before running it.

**To Edit a Saved Database Query
**

From the menus choose: File Open Database Edit Query… Select the query file (*.spq) that you want to edit. Follow the instructions for creating a new query.

28 Chapter 3

**To Read Database Files with a Saved Query
**

From the menus choose: File Open Database Run Query… Select the query file (*.spq) that you want to run. Depending on the database file, you may need to enter a login name and password. If the query has an embedded prompt, you may need to enter other information (for

example, the quarter for which you want to retrieve sales figures).

**Selecting a Data Source
**

Use the first dialog box to select the type of data source to read into the software. After you have chosen the file type, the Database Wizard may prompt you for the path to your data file. If you do not have any data sources configured, or if you want to add a new data source, click Add Data Source. In distributed analysis mode (available with the server version), this button is not available. To add data sources in distributed analysis mode, see your system administrator.

Data sources. A data source consists of two essential pieces of information: the driver that will be used to access the data and the location of the database that you want to access. To specify data sources, you must have the appropriate drivers installed. For local analysis mode, you can install drivers from the CD-ROM for this product:

n SPSS Data Access Pack. Installs drivers for a variety of database formats. Available

**on the AutoPlay menu.
**

n Microsoft Data Access Pack. Installs drivers for Microsoft products, including Microsoft Access. To install the Microsoft Data Access Pack, double-click Microsoft Data Access Pack in the Microsoft Data Access Pack folder on the CD-ROM.

29 Data Files

Figure 3-1 Database Wizard dialog box

Example. Let’s say you have a Microsoft Access 7.0 database that contains data about your employees and about the regions in which they work, and you want to import that data. Select the MS Access 7.0 Database icon, and click Next to proceed. You will see the Select Database dialog box. Specify the path to your database and click OK.

30 Chapter 3

Database Login

If your database requires a password, the Database Wizard will prompt you for one before it can open the data source.

Figure 3-2 Login dialog box

**Selecting Data Fields
**

This dialog box controls which tables and fields are read into the software. Database fields (columns) are read as variables. If a table has any field(s) selected, all of its fields will be visible in the following Database Wizard windows, but only those fields selected in this dialog box will be imported as variables. This enables you to create table joins and to specify criteria using fields that you are not importing.

31 Data Files

Figure 3-3 Select Data dialog box

Displaying field names. To list the fields in a table, click the plus sign (+) to the left of a table name. To hide the fields, click the minus sign (–) to the left of a table name. To add a field. Double-click any field in the Available Tables list, or drag it to the Retrieve Fields in This Order list. Fields can be reordered by dragging and dropping them within the selected fields list. To remove a field. Double-click any field in the Retrieve Fields in This Order list, or drag it to the Available Tables list. Sort field names. If selected, the Database Wizard will display your available fields in alphabetical order. Example. Assume that you want to import from a database with two tables, Employees and Regions. The Employees table contains information about your company’s employees, including the region they work in, their job category, and their annual sales.

32 Chapter 3

Employees are each assigned a region code (REGION), while those who do not have a home region get the special code of 0. The Regions table holds a large amount of data about the areas in which your company operates and prospective markets. It uses a region code (REGION) to identify the area and provides the average per capita income for the area, among other things. To relate each employee’s sales to the average income in the region, you would select the following fields from the Employees table: ID, REGION, and SALES. Then, select the following fields from the Regions table: REGION and AVGINC. Click Next to proceed.

**Creating a Relationship between Tables
**

This dialog box allows you to define the relationships between the tables. If fields from more than one table are selected, you must define at least one join.

Figure 3-4 Specify Relationships dialog box

33 Data Files

Establishing relationships. To create a relationship, drag a field from any table onto the field to which you want to join it. The Database Wizard will draw a join line between the two fields, indicating their relationship. These fields must be of the same data type. Auto Join Tables. Attempts to automatically join tables based on primary/foreign keys or matching field names and data type. Specifying join types. If outer joins are supported by your driver, you can specify either inner joins, left outer joins, or right outer joins. To select the type of join, click the join line between the fields, and the software will display the Relationship Properties dialog box.

You can also use the icons in the upper right corner of the dialog box to choose the type of join.

Relationship Properties

This dialog box allows you to specify which type of relationship joins your tables.

Figure 3-5 Relationship Properties dialog box

Inner joins. An inner join includes only rows where the related fields are equal. Example. Continuing with our data, suppose that you want to import data only for those employees who work in a fixed region and only for those regions in which your company operates. In this case, you would use an inner join, which would exclude traveling employees and would filter out information about prospective regions in which you do not currently have a presence.

34 Chapter 3

Completing this would give you a data set that contains the variables ID, REGION, SALES95, and AVGINC for each employee who worked in a fixed region.

Figure 3-6 Creating an inner join

Outer joins. A left outer join includes all records from the table on the left and only those records from the table on the right in which the related fields are equal. In a right outer join, this relationship is switched, so that the software imports all records from the table on the right and only those records from the table on the left in which the related fields are equal. Example. If you wanted to import data only for those employees who worked in fixed regions (a subset of the Employees table) but needed information about all of the regions, a right outer join would be appropriate. This results in a data set that contains the variables ID, REGION, SALES95, and AVGINC for each employee who worked in a fixed region, plus data on the remaining regions in which your company does not currently operate.

35 Data Files

Figure 3-7 Creating a right outer join

**Limiting Retrieved Cases
**

The Limit Retrieved Cases dialog box allows you to specify the criteria to select subsets of cases (rows). Limiting cases generally consists of filling the criteria grid with one or more criteria. Criteria consist of two expressions and some relation between them. They return a value of true, false, or missing for each case.

n If the result is true, the case is selected. n If the result is false or missing, the case is not selected. n Most criteria use one or more of the six relational operators (<, >, <=, >=, =, and <>). n Expressions can include field names, constants, arithmetic operators, numeric and

other functions, and logical variables. You can use fields that you do not plan to import as variables.

36 Chapter 3

Figure 3-8 Limit Retrieved Cases dialog box

**To build your criteria, you need at least two expressions and a relation to connect them.
**

To build an expression, put your cursor in an Expression cell. You can type field

names, constants, arithmetic operators, numeric and other functions, and logical variables. Other methods of putting a field into a criteria cell include double-clicking the field in the Fields list, dragging the field from the Fields list, or selecting a field from the drop-down menu that is available in any active Expression cell.

The two expressions are usually connected by a relational operator, such as = or >. To

choose the relation, put your cursor in the Relation cell and either type the operator or select it from the drop-down menu.

37 Data Files

To modify our earlier example to retrieve data only about employees who fit into job categories 1 or 3, create two criteria in the criteria grid, and prefix the second criteria with the connector OR. Criteria 1: ’EmployeeSales’.’JOBCAT’ = 1 Criteria 2: ’EmployeeSales’.’JOBCAT’ = 3

Functions. A selection of built-in arithmetic, logical, string, date, and time SQL functions are provided. You can select a function from the list and drag it into the expression, or you can enter any valid SQL function. See your database documentation for valid SQL functions. Use Random Sampling. Selects a random sample of cases from the data source. For large data sources, you may want to limit the number of cases to a small, representative sample. This can significantly reduce the time that it takes to run procedures. Native random sampling, if available for the data source, is faster than SPSS random sampling, since SPSS random sampling must still read the entire data source to extract a random sample. Prompt for Value. You can embed a prompt in your query to create a parameter query. When users run the query, they will be asked to enter information specified here. You might want to do this if you need to see different views of the same data. For example, you may want to run the same query to see sales figures for different fiscal quarters. Place your cursor in any Expression cell, and click Prompt for Value to create a prompt.

**Creating a Parameter Query
**

Use the Prompt for Value dialog box to create a dialog box that solicits information from users each time someone runs your query. It is useful if you want to query the same data source using different criteria.

38 Chapter 3

Figure 3-9 Prompt for Value dialog box

To build a prompt, you need to enter a prompt string and a default value. The prompt string is displayed each time a user runs your query. It should specify the kind of information to enter, and, if the user is not selecting from a list, it should give hints about how the input should be formatted. For example, “Enter a Quarter (Q1, Q2, Q3, …):”.

Allow user to select value from list. If this is selected, you can limit the user to the values you place here, which are separated by carriage returns. Data type. Specify the data type here, either number, string, or date.

**The final result looks like this:
**

Figure 3-10 User-defined prompt dialog box

Click any cell to edit the variable name. n If the name of the database field does not form a valid. The original values are retained as value labels for the new variables.39 Data Files Defining Variables Variable names and labels. The complete database field (column) name is used as the variable label. unique variable name. Unless you modify the variable name. it is used as the variable name. Check the Value Labels box for a string variable if you want to automatically convert it to a numeric variable. String values are converted to consecutive integer values based on alphabetic order of the original values. . unique variable name. the software creates a unique name. the Database Wizard assigns variable names to each column from the database in one of two ways: n If the name of the database field (or the first eight characters) forms a valid. Converting strings to numeric values.

Copying and pasting the Select statement from the Results window will not paste the necessary command syntax.40 Chapter 3 Figure 3-11 Define Variables dialog box Results The Results dialog box displays the SQL Select statement for your query. n Select Paste it into the syntax editor for further modification to paste complete GET DATA syntax into a syntax window. the changes to the Select statement will be lost. but if you click the Back button to make changes in previous steps. . n You can save the query for future use with Save query to a file. n You can edit the SQL Select statement before you run the query.

you can also specify other characters as delimiters between values.41 Data Files Figure 3-12 Results dialog box Reading Text Data Files The Text Wizard can read text data files formatted in a variety of ways: n Tab-delimited files n Space-delimited files n Comma-delimited files n Fixed-field format files For delimited files. . and you can specify multiple delimiters.

Follow the steps in the Text Wizard to define how to read the data file.42 Chapter 3 To Read Text Data Files From the menus choose: File Read Text Data Select the text file in the Open dialog box. Text Wizard Step 1 Figure 3-13 Text Wizard Step 1 .

. The arrangement of variables defines the method used to differentiate one variable from the next. You can apply a predefined format (previously saved from the Text Wizard) or follow the steps in the Text Wizard to specify how the data should be read. A variable is similar to a field in a database. Text Wizard Step 2 Figure 3-14 Text Wizard Step 2 This step provides information about variables.43 Data Files The text file is displayed in a preview window. each item in a questionnaire is a variable. the Text Wizard needs to know how to determine where the data value for one variable ends and the data value for the next variable begins. How are your variables arranged? To read your data properly. For example.

they are truncated. If the labels are longer than eight characters. The column location determines which variable is being read. data values may appear to run together without even spaces separating them. or other characters are used to separate variables. the name is modified to create a unique variable name. you can use these labels as variable names. No delimiter is required between variables.44 Chapter 3 n Delimited. In fact. tabs. If the first eight characters do not create a unique variable name. n Fixed width. commas. Text Wizard Step 3: Delimited Files Figure 3-15 Text Wizard Step 3 for delimited files . in many text data files generated by computer programs. The variables are recorded in the same order for each case but not necessarily in the same column locations. Spaces. Are variable names included at the top of your file? If the first row of the data file contains descriptive labels for each variable. Each variable is recorded in the same column location on the same record (line) for each case in the data file.

The more cases there are in the data file. The specified number of variables for each case tells the Text Wizard where to stop reading one case and start reading the next. Since the random sampling routine makes an independent pseudo-random decision for each case. For example. Each case must contain data values (or missing values indicated by delimiters) for all variables. the percentage of cases selected can only approximate the specified percentage. the closer the percentage of cases selected is to the specified percentage. The first case of data begins on which line number? Indicates the first line of the data file that contains data values. the number of variables for each case is determined by the line with the greatest number of data values. Each line contains only one case. Cases with fewer data values are assigned missing values for the additional variables. each respondent to a questionnaire is a case. A case is similar to a record in a database. It is fairly common for each case to be contained on a single line (row). or the data file will be read incorrectly. How many cases do you want to import? You can import all cases in the data file. regardless of the number of lines. and cases can start in the middle of one line and be continued on the next line.45 Data Files This step provides information about cases. the first n cases (n is a number you specify). n Each line represents a case. n A specific number of variables represents a case. or a random sample of a specified percentage. even though this can be a very long line for data files with a large number of variables. If not all lines contain the same number of data values. The Text Wizard determines the end of each case based on the number of values read. Multiple cases can be contained on the same line. . this will not be line 1. If the top line(s) of the data file contain descriptive labels or other text that does not represent data values. How are your cases represented? Controls how the Text Wizard determines where each case ends and the next one begins.

A case is similar to a record in a database. If the top line(s) of the data file contain descriptive labels or other text that does not represent data values. For example. this will not be line 1. the first n cases (n is a number you specify). The first case of data begins on which line number? Indicates the first line of the data file that contains data values. Since the random sampling routine makes an independent pseudo-random decision for . How many lines represent a case? Controls how the Text Wizard determines where each case ends and the next one begins. each respondent to questionnaire is a case. You need to specify the number of lines for each case to read the data correctly. or a random sample of a specified percentage.46 Chapter 3 Text Wizard Step 3: Fixed-Width Files Figure 3-16 Text Wizard Step 3 for fixed-width files This step provides information about cases. Each variable is defined by its line number within the case and its column location. How many cases do you want to import? You can import all cases in the data file.

47 Data Files each case. the closer the percentage of cases selected is to the specified percentage. the percentage of cases selected can only approximate the specified percentage. The more cases there are in the data file. Multiple. Which delimiters appear between variables? Indicates the characters or symbols that separate data values. You can select any combination of spaces. commas. consecutive delimiters without intervening data values are treated as missing values. . or other characters. tabs. Text Wizard Step 4: Delimited Files Figure 3-17 Text Wizard Step 4 for delimited files This step displays the Text Wizard’s best guess on how to read the data file and allows you to modify how the Text Wizard will read variables from the data file. semicolons.

. For example. Text Wizard Step 4: Fixed-Width Files Figure 3-18 Text Wizard Step 4 for fixed-width files This step displays the Text Wizard’s best guess on how to read the data file and allows you to modify how the Text Wizard will read variables from the data file.48 Chapter 3 What is the text qualifier? Characters used to enclose values that contain delimiter characters. CSV-format data files exported from Excel use a double quotation mark (") as a text qualifier. Vertical lines in the preview window indicate where the Text Wizard currently thinks each variable begins in the file. if a comma is the delimiter. enclosing the entire value. values that contain commas will be read incorrectly unless there is a text qualifier enclosing the value. The text qualifier appears at both the beginning and the end of the value. preventing the commas in the value from being interpreted as delimiters between values.

If multiple lines are used for each case. . Text Wizard Step 5 Figure 3-19 Text Wizard Step 5 This steps controls the variable name and the data format that the Text Wizard will use to read each variable and which variables will be included in the final data file. Note: For computer-generated data files that produce a continuous stream of data values with no intervening spaces or other distinguishing characteristics. it may be difficult to determine where each variable begins. select each line from the drop-down list and modify the variable break lines as necessary. Such data files usually rely on a data definition file or some other written description that specifies the line and column location for each variable.49 Data Files Insert. and delete variable break lines as necessary to separate variables. move.

the Text Wizard sets the number of characters to the longest string value encountered for the selected variable(s). or they can be fully spelled out. you can specify the number of characters in the value. Text Wizard Data Formatting Options Formatting options for reading variables with the Text Wizard include: Do not import. Numeric. For fixed-width files. Months can be represented in digits. Select a date format from the list. the number of characters in string values is defined by the placement of variable break lines in step 4. Valid values include numbers that use a comma as a decimal indicator and periods as thousands separators. Variable names cannot exceed eight characters. yyyy/mm/dd. Roman numerals. a leading plus or minus sign. Dollar. mm/dd/yyyy. hh:mm:ss. cannot start with a number or the pound sign (#). or three-letter abbreviations. Select a variable in the preview window and then select a format from the drop-down list. For delimited files.yyyy. and a decimal indicator.50 Chapter 3 Variable name. Comma. String. Valid values include virtually any keyboard characters and embedded blanks. Date/Time. dd. and a variety of other date and time formats. Select a variable in the preview window and then enter a variable name. Valid values are numbers with an optional leading dollar sign and optional commas as thousands separators. Valid values include dates of the general format dd-mm-yyyy.mm. Valid values include numbers that use a period as a decimal indicator and commas as thousands separators. By default. and cannot contain spaces. the Text Wizard will automatically modify variable names that are longer than eight characters or are not unique. If you read variable names from the data file. Shift-click to select multiple contiguous variables or Ctrl-click to select multiple noncontiguous variables. Valid values include numbers. up to a maximum of 255. Dot. . You can overwrite the default variable names with your own variable names. Omit the selected variable(s) from the imported data file. Data format.

. Text Wizard Step 6 Figure 3-20 Text Wizard Step 6 This is the final step of the Text Wizard.51 Data Files Note: Values that contain invalid characters for the selected format will be treated as missing. You can then customize and/or save the syntax for use in other sessions or in production jobs. You can also paste the syntax generated by the Text Wizard into a syntax window. You can save your specifications in a file for use when importing similar text data files. Values that contain any of the specified delimiters will be treated as multiple values.

from the menus choose: File Display Data Info. The Data Editor provides one way to view the variable definition information. including: n Variable names n Variable formats n Descriptive variable and value labels This information is stored in the dictionary portion of the data file. From the menus choose: File Save The modified data file is saved. .52 Chapter 3 File Information A data file contains much more than raw data.. Make the Data Editor the active window (click anywhere in the window to make it active).. from the menus choose: Utilities File Info For other data files. Select a file from the Display Data Info dialog box. Saving Data Files Any changes that you make in a data file last only for the duration of the current session—unless you explicitly save the changes. You can also display complete dictionary information for the working data file or any other data file. It also contains any variable definition information. The data file information is displayed in the Viewer. Obtaining Data File Information For the working data file. overwriting the previous version of the file.

an option is provided to include value labels instead of values. If your data exceed these limits. 0.00. d-mmm-yyyy hh:mm:ss General . The Excel application cannot open an Excel file from a newer version of the application.536 records.. n Because all Excel files are limited to 256 columns of data.##0. n When exporting to Excel 97 and later.384 records.53 Data Files Saving Data Files in Excel Format You can save your data in one of three Microsoft Excel file formats. #. is not included in exported Excel files.0 document..0 cannot open an Excel 2000 document. For example. Excel 5.0 and Excel 5.00. These limitations include: n Variable information. However..##0. or rows of data.00. SPSS Variable Type Excel Data Format Numeric Comma Dollar Date Time String 0. The choice of format depends on the version of Excel that will be used to open the data.. Variable Types The following table shows the variable type matching between the original data in SPSS and the exported data in Excel. $#... n Excel 4.00. There are a few limitations to the Excel file format that don’t exist in SPSS.. such as missing values and variable labels. a warning message is displayed and the data are truncated to the maximum size allowed by Excel. only the first 256 variables are included in the exported file. #.##0_). Excel 97-2000 files allow 65...0/95 files are limited to 16. Excel 2000 can easily read an Excel 5.

value CYLINDER /* Number of Cylinders */ 3 = ’3 Cylinders’ 4 = ’4 Cylinders’ 5 = ’5 Cylinders’ 6 = ’6 Cylinders’ 8 = ’8 Cylinders’ . If no variable label exists in the SPSS data. when the value labels for the cars. These illegal characters are replaced with an underscore when the data are exported. Save Value Labels You have the option of saving the values and value labels associated with your data file to a SAS syntax file. SPSS variable labels are mapped to the SAS variable labels. #. n SPSS variable labels containing more than 40 characters are truncated when exported to a SAS v6 file. whereas SPSS allows numerous system-missing values. . value ORIGIN /* Country of Origin */ 1 = ’American’ 2 = ’European’ 3 = ’Japanese’ . the variable name is mapped to the SAS variable label. For example.sav data file are exported. such as @. all system-missing values in SPSS are mapped to a single system-missing value in the SAS file. As a result.54 Chapter 3 Saving Data Files in SAS Format Special handling is given to various aspects of your data when saved as a SAS file. n Where they exist. proc format library = library . n SAS allows only one value for system-missing. and $. These cases include: n Certain characters that are allowed in SPSS variable names are not valid in SAS. the generated syntax file contains: libname library ’d:\spss\’ .

.. Variable Types The following table shows the variable type matching between the original data in SPSS and the exported data in SAS: SPSS Variable Type SAS Variable Type SAS Data Format Numeric Comma Dot Scientific Notation Date Date (Time) Dollar Custom Currency String Numeric Numeric Numeric Numeric Numeric Numeric Numeric Numeric Character 12 12 12 12 (Date) for example. From the menus choose: File Save As. FILTER__ FILTER__. . . format format format quit... This feature is not supported for the SAS transport file. CYLINDER CYLINDER. modify cars.. ORIGIN ORIGIN. Time18 12 12 $8 Saving Data Files in Other Formats Make the Data Editor the active window (click anywhere in the window to make it active).55 Data Files value FILTER__ /* cylrec = 1 | cylrec = 2 (FILTER) */ 0 = ’Not Selected’ 1 = ’Selected’ .. MMDDYY10. proc datasets library = library ..

0 format can be read by SPSS 7. Fixed ASCII (*. To save value labels to a SAS syntax file (active only when a SAS file type is selected): Click Save value labels into a . Data files saved in SPSS 7.sav). Tab-delimited (*. SPSS 7.sys). Macintosh or UNIX). There are no tabs or spaces between variable fields. only the first 500 will be saved.5.sav). . To write variable names to the first row of a spreadsheet or tab-delimited data file: Click Write variable names to spreadsheet in the Save Data As dialog box.dat). ASCII text files with values separated by tabs. If the data file contains more than 500 variables. Data files saved in SPSS format cannot be read by versions of the software prior to version 7.0 (*.dat). ASCII text file in fixed format. using the default write formats for all variables. Enter a filename for the new data file. additional user-missing values will be recoded into the first defined user-missing value.por). SPSS Portable (*. SPSS 7. SPSS format. Saving Data: Data File Types You can save data in the following formats: SPSS (*.0 for Windows format. SPSS portable format that can be read by versions of SPSS on other operating systems (for example. SPSS/PC+ (*. For variables with more than one defined user-missing value. SPSS/PC+ format.sas file in the Save Data As dialog box.56 Chapter 3 Select a file type from the drop-down list.0 and earlier versions of SPSS for Windows but do not include defined multiple response sets or Data Entry for Windows information. To save value labels instead of data values in Excel 97 format: Click Save value labels where defined instead of data values in the Save Data As dialog box.

sas7bdat).dbf). The maximum number of variables that you can save is 256. SAS v6 file format for UNIX (Sun. dBASE IV (*. IBM).0 (*. Microsoft Excel 97/2000/XP spreadsheet file. SAS v7+ Windows short extension (*. . SYLK (*. Lotus 1-2-3 spreadsheet file. Excel 97 and later (*.xls).0. Symbolic link format for Microsoft Excel and Multiplan spreadsheet files.0 (*. SAS v6 for Alpha/OSF (*.wks). SAS v6 file format for Alpha/OSF (DEC UNIX). dBASE IV format. release 1A.384.slk). HP. The maximum number of variables is 256. release 3.536. and the maximum number of rows is 16. The maximum number of variables is 256. SAS v8 for UNIX.xls).384.57 Data Files Excel 2. dBASE II (*. release 2.ssd04).0/95 (*. Lotus 1-2-3 spreadsheet file.0. SAS version 7–8 for Windows short filename format. dBASE III (*.xls). Lotus 1-2-3 spreadsheet file. The maximum number of variables that you can save is 256. dBASE III format. dBASE II format. SAS v6 for Windows (*. SAS v7+ for UNIX (*. SAS transport file.0/95 spreadsheet file. Microsoft Excel 2.wk1). The maximum number of variables that you can save is 256.0 (*. 1-2-3 Release 2. Excel 5.wk3). 1-2-3 Release 3.0 (*.ssd01).xpt). SAS version 7–8 for Windows long filename format. The maximum number of variables that you can save is 256. Microsoft Excel 5.1 spreadsheet file. 1-2-3 Release 1.1–4.sd7).ssd01).dbf). and the maximum number of rows is 65.dbf). SAS v7+ Windows long extension (*. and the maximum number of rows is 16. SAS v6 for UNIX (*. SAS v6 file format for Windows/OS2. The maximum number of variables is 256. SAS Transport (*.sd2).

.. Deselect the variables that you don’t want to save. Select SPSS (*. Click Variables. the Save Data As Variables dialog box allows you to select the variables that you want to be saved in the new data file. By default.sav) from the list of file types.58 Chapter 3 Saving Subsets of Variables Figure 3-21 Save Data As Variables dialog box For data saved as an SPSS data file. all variables will be saved. Select the variables that you want to save. or click Drop All and then select the variables that you want to save. From the menus choose: File Save As. To Save a Subset of Variables Make the Data Editor the active window (click anywhere in the window to make it active)..

sav'. For most analysis and charting procedures. Figure 3-22 Temporary disk space requirements COMPUTE v6 = … RECODE v4… SORT CASES BY… or CACHE v6 zpre 16 26 36 46 56 66 1 2 3 4 5 6 v1 11 21 31 41 51 61 v1 11 21 31 41 51 61 v2 12 22 32 42 52 62 v2 12 22 32 42 52 62 v3 13 23 33 43 53 63 v3 13 23 33 43 53 63 v4 14 24 34 44 54 64 v4 14 24 34 44 54 64 v5 15 25 35 45 55 65 v5 15 25 35 45 55 65 v6 zpre 16 26 36 46 56 66 1 2 3 4 5 6 Action GET FILE = 'v1-5. Virtual Active File The virtual active file enables you to work with large data files without requiring equally large (or larger) amounts of temporary disk space. the original data source is re-read each time you run a different procedure. Procedures that modify the data require a certain amount of temporary disk space to keep track of the changes. and some actions always require enough disk space for at least one entire copy of the data file. Frequencies. Crosstabs. FREQUENCIES… v1 11 v2 12 22 32 42 52 62 v3 13 23 33 43 53 63 v4 14 24 34 44 54 64 v5 15 25 35 45 55 65 v1 11 21 31 41 51 61 v2 12 22 32 42 52 62 REGRESSION… /SAVE ZPRED. Explore) .59 Data Files Saving File Options For spreadsheet and tab-delimited files. v3 13 23 33 43 53 63 v4 14 24 v4 14 24 34 44 54 64 v5 15 25 35 45 55 65 Virtual Active File 21 31 41 51 61 Data Stored in Temporary Disk Space v6 zpre 16 26 36 46 56 66 1 2 3 4 5 6 v6 zpre 16 26 36 46 56 66 1 2 3 4 5 6 None 34 44 54 64 Actions that don’t require any temporary disk space include: n Reading SPSS data files n Merging two or more SPSS data files n Reading database tables with the Database Wizard n Merging an SPSS data file with a database table n Running procedures that read data (for example. you can write variable names to the first row of the file.

Report Summaries in Rows/Columns) n Reading data with GET TRANSLATE or DATA LIST commands n Using the Cache Data facility or the CACHE command n Launching other applications from SPSS that read the data file (for example. the absence of a temporary copy of the “active” file means that the original data source has to be re-read for each procedure.60 Chapter 3 Actions that create one or more columns of data in temporary disk space include: n Computing new variables n Recoding existing variables n Running procedures that create or modify variables (for example. . this means the SQL query that reads the information from the database must be re-executed for any command or procedure that needs to read the data. Creating a Data Cache Although the virtual active file can vastly reduce the amount of temporary disk space required. saving predicted values in Linear Regression) Actions that create an entire copy of the data file in temporary disk space include: n Reading Excel files n Reading text data files with the Text Wizard n Running procedures that sort data (for example. DecisionTime). Split File. Since virtually all statistical analysis procedures and charting procedures need to read the data. without creating an entire copy of the data file in temporary disk space. and the dialog box interface for these procedures will automatically sort the data file. the SQL query is re-executed for each procedure you run. AnswerTree. Both commands. The SPLIT FILE and REPORT commands in command syntax do not sort the data file and therefore do not create a copy of the data file. Note: The GET DATA command provides functionality comparable to DATA LIST. resulting in a complete copy of the data file. require sorted data for proper operation. however. which can result in a significant increase in processing time if you run a large number of procedures. Sort Cases. For data tables read from a database source.

To Create a Data Cache From the menus choose: File Cache Data Click OK or Cache Now. n For large data sources. Cache Now is useful primarily for two reasons: n A data source is “locked” and can’t be updated by anyone until you end your session. scrolling through the contents of the Data view in the Data Editor will be much faster if you cache the data.61 Data Files If you have sufficient disk space on the computer performing the analysis (either your local computer or a remote server). Cache Now creates a data cache immediately. The data cache is a temporary copy of the complete data table. . which shouldn’t be necessary under most circumstances. you can eliminate multiple SQL queries and improve processing time by creating a data cache of the active file. open a different data source. or cache the data. which is usually what you want since it doesn’t require an extra data pass. OK creates a data cache the next time the program reads the data (for example. the next time you run a statistical procedure).

.

Since remote servers used for distributed analysis are typically more powerful and faster than your local computer. such as reading data.Chapter 4 Distributed Analysis Mode Distributed analysis mode allows you to use a computer other than your local (or desktop) computer to do memory-intensive work for you. It has no effect on tasks related to editing output. Distributed versus Local Analysis Following are some guidelines that you might find useful for choosing distributed or local analysis mode: Database access. appropriate use of distributed analysis mode can significantly reduce computer processing time. transforming data. Any task that seems to take a long time in local analysis mode might be a good candidate for distributed analysis. Distributed analysis with a remote server can be useful if your work involves: n Large data files. particularly data read from database sources. Note: Distributed analysis is available only if you have both a local version and access to a licensed server version of the software installed on a remote server. n Memory-intensive tasks. such as manipulating pivot tables or modifying charts. computing new variables. and calculating statistics. Distributed analysis affects only data-related tasks. Jobs that perform database queries may run faster in distributed mode if the server has superior access to the database or if the server is running on the same machine as the database engine. If the necessary database access software is 63 .

Text results have low overhead. Text output. significantly increasing the time it takes to save your results. Pivot tables. This is particularly true for the OLAP Cubes procedure and tables that contain individual case data. Commands that perform a lot of computation and produce small output results (for example. such as scatterplots. For large data files or database tables.64 Chapter 4 available only on the server. The degree of improvement depends largely on the computing power of the remote server. The more text that is produced. Large pivot tables may take longer to create in distributed mode. and tend to transmit quickly. Interactive graphics. require raw data on your local computer. you will be able to access the database only in distributed mode. Since it is possible to save raw data with interactive graphics (an optional setting). such as those available in the Summarize procedure. Ratio of computation to output. Small jobs. this can result in slower performance in distributed mode because the data have to be sent from the remote server to your local computer. this can result in large amounts of data being transferred from the remote server to your local computer. regression residual plots. however. few and small pivot tables. . the slower it will be in distributed mode because this text is produced on the remote server and copied to your local computer for display. or if your network administrator does not permit you to download large data tables. and sequence charts. few or simple charts) have the most to gain from running in distributed mode. Other charts are based on summarized or aggregated data and should perform adequately because the aggregation is performed on the server. brief text results. Jobs that run quickly in local mode will almost always run slower in distributed mode because of inherent client/server overhead. Case-oriented charts. Charts.

modify. . You can select a default server and save the user ID. and password associated with any server. user ID. Remote servers usually require a user ID and a password. domain name. Figure 4-1 Server Login dialog box You can add. or delete remote servers in the list. and other connection information. passwords. This can be either your local computer or a remote server.65 Distributed Analysis Mode Server Login The Server Login dialog box allows you to select the computer that you want to use to process commands and run procedures. You are automatically connected to the default server when you start a new session. and a domain name may also be necessary. domain names. Contact your system administrator for information about available servers.

Switch. To Select.. domain name. . hqdev001) or a unique IP address assigned to a computer (example. and password provided by your administrator. Description. To select a default server: In the server list.123. port numbers for the servers. A server “name” can be an alphanumeric name assigned to a computer (for example.66 Chapter 4 Adding and Editing Server Login Settings Use the Server Login Settings dialog box to add or edit connection information for remote servers for use in distributed analysis mode. The port number is the port that the server software uses for communications. Name.. Figure 4-2 Add Server dialog box Contact your system administrator for a list of available servers. check the box next to the server that you want to use.456. Port Number.78). Enter an optional description to display in the servers list. and additional connection information. or Add Servers From the menus choose: File Switch Server. 202. Enter the user ID.

Click Edit to open the Server Login Settings dialog box. To switch to another server: Select the server from the list. . domain name. and password (if necessary). Note: When you switch servers during a session.67 Distributed Analysis Mode Note: You are automatically connected to the default server when you start a new session. all open windows are closed. Enter the connection information and optional settings and click OK. Enter the changes and click OK. You will be prompted to save changes before the windows are closed. To edit a server: Get the revised connection information from your administrator. Enter your user ID. Click Add to open the Server Login Settings dialog box. To add a server: Get the server connection information from your administrator.

n You will not have access to files on your local computer in distributed analysis mode unless you specify the drive as a shared device or the folders containing your data files as shared folders. you are running Windows and the server is running UNIX). the Open Remote File dialog box replaces the standard Open File dialog box. you can start multiple sessions. and drives is dependent on what is available on or from the remote server. n If the server is running a different operating system (for example.68 Chapter 4 Opening Data Files from a Remote Server Figure 4-3 Open Remote File dialog box In distributed analysis mode. n The list of available files. folders. . Only one data file can be open at a time. The current server name is indicated at the top of the dialog box. If you want to have multiple data files open at the same time. you probably won’t have access to local data files in distributed analysis mode even if they are in shared folders. The current data file is automatically closed when a new data file is opened.

Depending on the type of data file that you want to open.. The list of available folders and drives is dependent on what is available on or from the remote server. or File Open Database or File Read Text Data Saving Data Files from a Remote Server Figure 4-4 Save Remote File dialog box In distributed analysis mode.. You will not have access to folders on your local computer unless you specify the drive . the Save Remote File dialog box replaces the standard Save File dialog box.69 Distributed Analysis Mode To Open Data Files from a Remote Server If you aren’t already connected to the remote server. from the menus choose: File Open Data. log in to the remote server. The current server name is indicated at the top of the dialog box.

Local analysis mode. and drives represents the view from the perspective of the remote server computer. If the server is running a different operating system (for example. Permissions for shared folders must include the ability to write to the folder if you want to save data files in a local folder. Although you may see familiar folder names such as Program Files and drives such as C. the view of data files.” the view of data files. folders. When you use your local computer as your “server. and drives for both your local computer and the network is based on the computer you are currently using to process commands and run procedures—which is not necessarily the computer in front of you—where you select those commands and procedures and see the results. folders. and drives that you see in the file access dialog box (for opening data files) is similar to what you see in other applications or in the Windows Explorer. Distributed analysis mode.. you probably won’t have access to local data files in distributed analysis mode even if they are in shared folders. they are the folders and drives on the remote server. folders (directories).. From the menus choose: File Save (or Save As. . these are not the folders and drives on your computer. To Save Data Files from a Remote Server Make the Data Editor the active window. you are running Windows and the server is running UNIX).) Data File Access in Local and Distributed Analysis Mode The view of data files.70 Chapter 4 as a shared device and the folders as shared folders. You can see all of the data files and folders on your computer and any files and folders on mounted network drives that you would normally see. When you use another computer as a “remote server” to run commands and procedures.

Distributed analysis mode is not the same as accessing data files that reside on another computer on your network. if you are running Windows and the server is running UNIX). . If the title of the dialog box contains the word Remote (as in Open Remote File). or if the text Remote Server: [server name] appears at the top of the dialog box.71 Distributed Analysis Mode Figure 4-5 Local and remote views Local View Remote View In distributed analysis mode. you’re using distributed analysis mode. In local mode. you access other network devices from the remote server. If the server is running a different operating system (for example. In distributed mode. you will not have access to data files on your local computer unless you specify the drive as a shared device or the folders containing your data files as shared folders. If you’re not sure if you’re using local analysis mode or distributed analysis mode. look at the title bar in the dialog box for accessing data files. you probably won’t have access to local data files in distributed analysis mode even if they are in shared folders. You can access data files on other network devices in local analysis mode or in distributed analysis mode. you access other devices from your local computer.

and script files). and you cannot use procedures installed on your local version that are not also installed on the remote server. this means that a path specification such as c:\mydocs\mydata. this will result in an error in command syntax. it points to a directory and file on the remote server’s hard drive. and then click Shared As. only procedures installed on both your local version and the version on the remote server are available. switching from your local computer to a remote server will result in the removal of the affected procedures from the menus. syntax files. If the directory and/or file don’t exist on the remote server. Open Database. and the corresponding command syntax will result in errors. For all other file types (for example. relative path specifications for data files are relative to the current server in distributed analysis mode. the local view is always used. On the File menu. not relative to your local computer. and Apply Data Dictionary). Switching back to local mode will restore all affected procedures. it is possible that you may have optional components installed locally that aren’t available on the remote server.sav’. see the Help for your operating system. Using UNC Path Specifications With the Windows NT server version of SPSS. Open Data. To Set Sharing Permissions for a Drive or Folder In My Computer. In practical terms. If this is the case. Availability of Procedures in Distributed Analysis Mode In distributed analysis mode. Viewer files. While the latter situation may be unlikely. Save Data. For more information about sharing drives and folders. . You cannot use procedures installed on the server that are not also installed on your local version.72 Chapter 4 Note: This affects only dialog boxes for accessing data files (for example. Click the Sharing tab. as in: GET FILE=’c:\mydocs\mydata. click Properties. click the folder (directory) or drive that you want to share.sav does not point to a directory and file on your C drive.

125. you can use universal naming convention (UNC) specifications when accessing data files with command syntax. you can use its IP address. relative paths are not allowed. n Sharename is the folder (directory) on that computer that is designated as a shared folder.sav’. On UNIX platforms.53\public\july\sales.sav’.125. n Path is any additional folder (subdirectory) path below the shared folder. For example: GET FILE=’\\hqdev001\public\july\sales.sav’ is not valid. GET FILE=’sales. . The general form of a UNC specification is: \\servername\sharename\path\filename n Servername is the name of the computer that contains the data file. UNIX servers. this includes data files on your local computer. you can access data files only from devices and folders designated as shared. When you use distributed analysis mode. For example. you must specify the entire path. n Filename is the name of the data file. Even with UNC path specifications. as in: GET FILE=’/bin/data/spss/sales. and all directory paths must be absolute paths that start at the root of the server. If the computer doesn’t have a name assigned to it. there is no equivalent of the UNC path. if the data file is located in /bin/spss/data and the current directory is also /bin/spss/data.sav’. as in: GET FILE=’\\204.73 Distributed Analysis Mode If you are using the Windows NT server version of SPSS.

.

Chapter 5 Data Editor The Data Editor provides a convenient. ordinal. The Data Editor window opens automatically when you start a session. measurement scale (nominal. The Data Editor provides two views of your data: n Data view. and delete information contained in the data file. change. or scale). date. you can add. Displays variable definition information. data type (for example. and numeric). Displays the actual data values or defined value labels. string. In both views. n Variable view. and user-defined missing values. 75 . including defined variable and value labels. spreadsheet-like method for creating and editing data files.

the data rectangle is extended to include any rows and/or columns between that cell and the file boundaries. There are. Each column represents a variable or characteristic being measured. . The cell is the intersection of the case and the variable. each individual respondent to a questionnaire is a case. Cells contain only data values. Each row represents a case or an observation.76 Chapter 5 Data View Figure 5-1 Data view Many of the features of the Data view are similar to those found in spreadsheet applications. cells in the Data Editor cannot contain formulas. Each cell contains a single value of a variable for a case. For string variables. Unlike spreadsheet programs. For numeric variables. several important distinctions: n Rows are cases. If you enter data in a cell outside the boundaries of the defined data file. For example. a blank is considered a valid value. n Columns are variables. n Cells contain values. blank cells are converted to the system-missing value. For example. each item on a questionnaire is a variable. however. You can enter data in any cell. n The data file is rectangular. There are no “empty” cells within the boundaries of the data file. The dimensions of the data file are determined by the number of cases and variables.

n Columns are variable attributes. including: n Variable name n Data type n Number of digits or characters n Number of decimal places n Descriptive variable and value labels n User-defined missing values n Column width n Measurement level .77 Data Editor Variable View Figure 5-2 Variable view The Variable view contains descriptions of the attributes of each variable in the data file. In the Variable view: n Rows are variables. You can add or delete variables and modify attributes of variables.

and provides an auto-label feature. Displaying or Defining Variable Attributes Make the Data Editor the active window. enter a variable name in any blank row. there are two other methods for defining variable properties: n The Copy Data Properties wizard provides the ability to use an external SPSS data file as a template for defining file and variable properties in the working data file.78 Chapter 5 In addition to defining variable properties in the Variable view. or the symbols @. n Variable names that end with an underscore should be avoided (to avoid conflict with variables automatically created by some procedures). or click the Variable View tab. n Variable names cannot end with a period. The remaining characters can be any letter. 1 = Female. n Define Variable Properties (also available on the Data menu in the Data Editor window) scans your data and lists all unique data values for any selected variables. 0 = Male. a period. To define new variables. or $. #. Copy Data Properties is available on the Data menu in the Data Editor window. _. Double-click a variable name at the top of the column in the Data view. Select the attribute(s) that you want to define or modify. Variable Names The following rules apply to variable names: n The name must begin with a letter. You can also use variables in the working data file as templates for other variables in the working data file. n The length of the name cannot exceed eight characters. any digit. identifies unlabeled values. . This is particularly useful for categorical variables that use numeric codes to represent categories—for example.

’. Nominal. . Note: For ordinal string variables. low. 3 = high). agree. the order of the categories is interpreted as high. high.79 Data Editor n Blanks and special characters (for example. Variable Measurement Level You can specify the level of measurement as scale (numeric data on an interval or ratio scale).) n SPSS-format data files used with AnswerTree. For example. medium— which is not the correct order. Measurement specification is relevant only for: n Custom Tables procedure and chart procedures that identify variables as scale or categorical. 1 = Male. ?. 2 = Female. Variable names are not case sensitive. (Custom Tables is available only in the Tables add-on component. Ordinal. duplication is not allowed. Nominal and ordinal data can be either string (alphanumeric) or numeric. and *) cannot be used. Data values represent categories with no intrinsic order—for example. 1 = low. Data values represent categories with some intrinsic order (for example. it is more reliable to use numeric codes to represent ordinal data. the alphabetic order of string values is assumed to reflect the true order of the categories. strongly agree. high. for a string variable with the values of low. You can select one of three measurement levels: Scale. Nominal and ordinal are both treated as categorical. disagree. Scale variables must be numeric. medium. !. 2 = medium. ordinal. In general. Ordinal variables can be either string (alphanumeric) or numeric values that represent distinct categories (for example. Data values are numeric values on an interval or ratio scale—for example. low. and newvar are all considered identical. The names NEWVAR. n Each variable name must be unique. job category or company division. age or income. strongly disagree). medium. or nominal. Nominal variables can be either string (alphanumeric) or numeric values that represent distinct categories—for example. NewVar.

the following rules apply: n String (alphanumeric) variables are set to nominal. The default number of unique values is 24. To change the specified value. change the interactive chart options (from the Edit menu. n Numeric variables without defined value labels but less than a specified number of unique values are set to ordinal. . n String and numeric variables with defined value labels are set to ordinal. n Numeric variables without defined value labels and more than a specified number of unique values are set to scale.80 Chapter 5 Figure 5-3 Scale and categorical variables in a chart procedure For SPSS-format data files created in earlier versions of SPSS products. choose Options and click the Interactive tab).

Values are displayed in standard numeric format. Dot. The Data Editor accepts numeric values in standard format or in scientific notation. The Data Editor accepts numeric values for dot variables with or without dots.23D2.23E2. For some data types. A numeric variable whose values are displayed with commas delimiting every three places. and with the period as a decimal delimiter. A numeric variable whose values are displayed with periods delimiting every three places. .81 Data Editor Variable Type Variable Type specifies the data type for each variable. 1. Comma. A numeric variable whose values are displayed with an imbedded E and a signed power-of-ten exponent.23E+2. The Data Editor accepts numeric values for such variables with or without an exponent. for others. The contents of the Variable Type dialog box depend on the data type selected. and even 1. and with the comma as a decimal delimiter. 1. 123. The Data Editor accepts numeric values for comma variables with or without commas.23+2. or in scientific notation. 1. or by the sign alone—for example. You can use Variable Type to change the data type. Figure 5-4 Variable Type dialog box The available data types are as follows: Numeric. By default. or in scientific notation. you can simply select a format from a scrollable list of examples. The exponent can be preceded either by E or D with an optional sign. all new variables are assumed to be numeric. Scientific notation. A variable whose values are numbers. there are text boxes for width and number of decimals.

Defined custom currency characters cannot be used in data entry but are displayed in the Data Editor. n For date formats. comma. However. dashes. Select the data type in the Variable Type dialog box. and year values. commas. . hyphens. you can use slashes. and you can enter numbers. spaces. Also known as an alphanumeric variable. You can enter dates with slashes. threeletter abbreviations. choose Options and click the Data tab). Uppercase and lowercase letters are considered distinct. commas. or complete names for month values. and it rounds values with more decimals. They can contain any characters up to the defined length. and dot formats. A numeric variable whose values are displayed in one of several calendar-date or clock-time formats. and hence not used in calculations. Input versus Display Formats Depending on the format. or blank spaces as delimiters. Following are some general guidelines: n For numeric. Dates of the general format dd-mmm-yy are displayed with dashes as delimiters and three-letter abbreviations for the month. A numeric variable whose values are displayed in one of the custom currency formats that you have defined in the Currency tab of the Options dialog box. you can enter values with any number of decimal positions (up to 16). Values of a string variable are not numeric. month. or periods as delimiters between day. the display of values in the Data view may differ from the actual value as entered and stored internally. Defining Variable Type Click the button in the Type cell for the variable that you want to define. all values are right-padded to the maximum width. n For string variables. Internally. Dates of the general format dd/mm/yy and mm/dd/yy are displayed with slashes for delimiters and numbers for the month. The Data view displays only the defined number of decimal places. a value of ’No’ is stored internally as ’No ’ and is not equivalent to ’ No ’. The century range for 2-digit year values is determined by your Options settings (from the Edit menu. String. Select a format from the list. For a string variable with a width of 4.82 Chapter 5 Date. periods. the complete value is used in all computations. and the entire value is stored internally. Custom currency.

Internally. minutes. times are stored as the number of seconds from October 14. Value labels can be up to 60 characters long. Value Labels You can assign descriptive value labels for each value of a variable. The century range for dates with two-digit years is determined by your Options settings (from the Edit menu. Variable Labels Although variable names can be only 8 characters long. 1582. choose Options and click the Data tab). and seconds. periods.83 Data Editor dates are stored as the number of seconds from October 14. variable labels can be up to 256 characters long. This is particularly useful if your data file uses numeric codes to represent non-numeric categories (for example. n For time formats. Value labels are not available for long string variables (string variables longer than 8 characters). you can use colons. and these descriptive labels are displayed in output. codes of 1 and 2 for male and female). Times are displayed with colons as delimiters. 1582. Figure 5-5 Value Labels dialog box . or spaces as delimiters between hours.

Data values specified as user-missing are flagged for special treatment and are excluded from most calculations. n You cannot define missing values for long string variables (string variables longer than eight characters). are considered valid values unless you explicitly define them as missing. To define null or blank values as missing for a string variable. enter a single space in one of the fields for Discrete missing values. a range of missing values. Click Add to enter the value label. All string values. or a range plus one discrete value. Missing Values Missing Values defines specified data values as user-missing.84 Chapter 5 Specifying Value Labels Click the button in the Values cell for the variable that you want to define. n Ranges can be specified only for numeric variables. including null or blank values. you might want to distinguish between data missing because a respondent refused to answer and data missing because the question didn’t apply to that respondent. Figure 5-6 Missing Values dialog box n You can enter up to three discrete (individual) missing values. For example. enter the value and a label. Missing values for string variables. . For each value. It is often useful to know why information is missing.

n Copy all of the attributes from one variable and paste them to one or more other variables. you can copy one or more attributes and apply them to one or more variables. All string values. asterisks (*) are displayed in the Data view.85 Data Editor Defining Missing Values Click the button in the Missing cell for the variable that you want to define. Column widths can also be changed in the Data view by clicking and dragging the column borders. including null or blank values. Changing the column width does not change the defined width of a variable. value labels) and paste it to the same attribute cell(s) for one or more variables. enter a single space in one of the fields for Discrete missing values. Column Width You can specify a number of characters for the column width. To define null or blank values as missing for a string variable. You can: n Copy a single attribute (for example. If the defined and actual width of a value are wider than the column. The default alignment is right for numeric variables and left for string variables. Applying Variable Definition Attributes to Multiple Variables Once you have defined variable definition attributes for a variable. n Create multiple new variables with all the attributes of a copied variable. are considered valid values unless you explicitly define them as missing. Variable Alignment Alignment controls the display of data values and/or value labels in the Data view. Enter the values or range of values that represent missing data. . Column formats affect only the display of values in the Data Editor. This setting affects only the display in the Data view. Basic copy and paste operations are used to apply variable definition attributes.

select the attribute cell that you want to apply to other variables.86 Chapter 5 Applying Variable Definition Attributes to Other Variables To apply individual attributes from a defined variable: In the Variable view. From the menus choose: Edit Copy Select the row number(s) for the variable(s) to which you want to apply the attributes. From the menus choose: Edit Paste If you paste the attribute to blank rows. To apply all attributes from a defined variable: In the Variable view. You can select multiple target variables. new variables are created with default attributes for all but the selected attribute. You can select multiple target variables. From the menus choose: Edit Paste . From the menus choose: Edit Copy Select the attribute cell(s) to which you want to apply the attribute. The entire row is highlighted. select the row number for the variable with the attributes that you want to use.

. n Data values are not recorded until you press Enter or select another cell. The entire row is highlighted. Entering Data You can enter data directly in the Data Editor in the Data view.87 Data Editor Generating Multiple New Variables with the Same Attributes In the Variable view. n When you select a cell and enter a data value. for selected areas or for individual cells. From the menus choose: Edit Copy Click the empty row number beneath the last defined variable in the data file. you must define the variable type first. the value is displayed in the cell editor at the top of the Data Editor. click the row number for the variable with the attributes that you want to use for the new variable. Enter the number of variables that you want to create. n The active cell is highlighted. The new variable names will consist of the specified prefix plus a sequential number starting with the specified number. From the menus choose: Edit Paste Variables. n To enter anything other than simple numeric data. . You can enter data by case or by variable. You can enter data in any order. Enter a prefix and starting number for the new variables.. n The variable name and row number of the active cell are displayed in the top left corner of the Data Editor.

88 Chapter 5 If you enter a value in an empty column. The value is displayed in the cell editor at the top of the Data Editor. Entering Non-Numeric Data Double-click a variable name at the top of the column in the Data view or click the Variable View tab. Figure 5-7 Working data file in the Data view Entering Numeric Data Select a cell in the Data view. Press Enter or select another cell to record the value. . the Data Editor automatically creates a new variable and assigns a variable name. Enter the data value.

Select a value label from the drop-down list. Double-click the row number or click the Data View tab.) . integer values that exceed the defined width can be entered. characters beyond the defined width are not allowed. Data Value Restrictions in the Data Editor The defined variable type and width determine the type of value that can be entered in the cell in the Data view. Using Value Labels for Data Entry If value labels aren’t currently displayed in the Data view. Note: This works only if you have defined value labels for the variable.89 Data Editor Click the button in the Type cell for the variable. from the menus choose: View Value Labels Click on the cell in which you want to enter the value. n If you type a character not allowed by the defined variable type. Enter the data in the column for the newly defined variable. n For numeric variables. but the Data Editor displays either scientific notation or asterisks in the cell to indicate that the value is wider than the defined width. Click OK. To display the value in the cell. Select the data type in the Variable Type dialog box. change the defined width of the variable. the Data Editor beeps and does not enter the character. (Note: Changing the column width does not affect the variable width. The value is entered and the value label is displayed in the cell. n For string variables.

Cutting. the system-missing value is inserted in the target cell. Press Enter (or move to another cell) to record the new value. n Add and delete cases. you can modify data values in the Data view in many ways. Copying. n Cut. and paste individual cell values or groups of values in the Data Editor.90 Chapter 5 Editing Data With the Data Editor. Replacing or Modifying Data Values To delete the old value and enter a new value: In the Data view. double-click the cell. . n Change the order of variables. the Data Editor attempts to convert the value. n Move or copy the values for a single variable (column) to multiple variables. n Move or copy the values for a single case (row) to multiple cases. and Pasting Data Values You can cut. copy. The cell value is displayed in the cell editor. n Move or copy a single cell value to a group of cells. You can: n Change data values. copy. Data Conversion for Pasted Values in the Data Editor If the defined variable types of the source and target cells are not the same. and paste data values. n Add and delete variables. n Move or copy a group of cell values to another group of cells. Edit the value directly in the cell or in the cell editor. You can: n Move or copy a single cell value to another cell. If no conversion is possible.

1582. . Values that exceed the defined string variable width are truncated. the displayed dollar sign becomes part of the string value. dollar. numeric values less than 86. converting dates to numeric values can yield some extremely large numbers. For example. Date and time values are converted to a number of seconds if the target cell is one of the numeric formats (for example. dollar. Inserting New Cases between Existing Cases In the Data view. Numeric values are converted to dates or times if the value represents a number of seconds that can produce a valid date or time. From the menus choose: Data Insert Cases A new row is inserted for the case and all variables receive the system-missing value. but it is converted to systemmissing if the format type of the target cell is one of the month-day-year formats. or comma) and date formats are converted to strings if they are pasted into a string variable cell. For example. dot. or comma). You can also insert new cases between existing cases. numeric. For dates. The string value is the numeric value as displayed in the cell. For example. select any cell in the case (row) below the position where you want to insert the new case. The Data Editor inserts the system-missing value for all the other variables for that case. Numeric into Date or Time. the blank rows also become new cases with the system-missing value for all variables. Inserting New Cases Entering data in a cell on a blank row automatically creates a new case. Numeric (for example. Since dates are stored internally as the number of seconds since October 14. numeric.600.908. If there are any blank rows between the new case and the existing cases. dot. String values that contain acceptable characters for the numeric or date format of the target cell are converted to the equivalent numeric or date value. for a dollar format variable. Date into Numeric. the date 10/29/91 is converted to a numeric value of 12. String into Numeric or Date.073. a string value of 25/12/91 is converted to a valid date if the format type of the target cell is one of the day-month-year formats.400 are converted to the system-missing value.91 Data Editor Numeric or Date into String.

. Inserting New Variables between Existing Variables Select any cell in the variable to the right of (Data view) or below (Variable view) the position where you want to insert the new variable. Moving Variables Click the variable name in the Data view or the row number for the variable in the Variable view to select the variable. From the menus choose: Data Insert Variable A new variable is inserted with the system-missing value for all cases. The Data Editor inserts the system-missing value for all cases for the new variable. Drag and drop the variable to the new location. If there are any empty columns in the Data view or empty rows in the Variable view between the new variable and the existing variables. drop it on the variable row below where you want to place the variable. In the Variable view. in the Data view drop the variable on the variable column to the right of where you want to place the variable. If you want to place the variable between two existing variables. these also become new variables with the systemmissing value for all cases.92 Chapter 5 Inserting New Variables Entering data in an empty column in the Data view or in an empty row in the Variable view automatically creates a new variable with a default variable name (the prefix var and a sequential number) and a default data format type (numeric). You can also insert new variables between existing variables.

. Enter the Data Editor row number for the case.. From the menus choose: Data Go to Case. If the change in data format may result in the loss of missing value specifications or value labels. Go to Case Go to Case goes to the specified case (row) number in the Data Editor. the system-missing value is assigned. If no conversion is possible. the Data Editor displays an alert box and asks if you want to proceed with the change or cancel it.93 Data Editor Changing Data Type You can change the data type for a variable at any time using the Variable Type dialog box in the Variable view. The conversion rules are the same as those for pasting data values to a variable with a different format type. Figure 5-8 Go to Case dialog box Finding a Case in the Data Editor Make the Data Editor the active window. and the Data Editor will attempt to convert existing values to the new type. .

Grid Lines. Figure 5-9 Filtered cases in the Data Editor Filtered (excluded) cases Data Editor Display Options The View menu provides several display options for the Data Editor: Fonts. Toggles the display of grid lines. Toggles between the display of actual data values and user-defined descriptive value labels. This is only available in the Data view. .94 Chapter 5 Case Selection Status in the Data Editor If you have selected a subset of cases but have not discarded unselected cases. Controls the font characteristics of the data display. Value Labels. unselected cases are marked in the Data Editor with a vertical line through the row number.

data definition information is printed. Printing Data Editor Contents Make the Data Editor the active window. Select the tab for the view that you want to print. the data are printed. the actual data values are printed. Otherwise. n Grid lines are printed if they are currently displayed in the selected view.. From the menus choose: File Print. . n Value labels are printed in the Data view if they are currently displayed. n The information in the currently displayed view is printed. Use the View menu in the Data Editor window to display or hide grid lines and toggle between the display of data values and value labels. In the Variable view.95 Data Editor Data Editor Printing A data file is printed as it appears on screen. In the Data view..

.

Chapter 6 Data Preparation Once you’ve opened a data file or entered data in the Data Editor. or scale). This is particularly useful for categorical data with numeric codes used for category values. such as: n Definition of descriptive value labels for numeric codes (for example. data simply entered in the Data Editor in Data view or read into SPSS from an external file format (for example. 99 = Not applicable). n Copy Data Properties provides the ability to use an existing SPSS-format data file as a template for file and variable properties in the current data file. All of these variable properties (and others) can be assigned in Variable view of the Data Editor. n Assignment of measurement level (nominal. However. There are also several utilities that can assist you in this process: n Define Variable Properties can help you define descriptive value labels and missing values. an Excel spreadsheet or a text data file) lack certain variable properties that you may find very useful. ordinal. 97 . 0 = Male and 1 = Female). no additional data preparation is required. n Identification of missing values codes (for example. This is particularly useful if you frequently use external-format data files that contain similar content (such as monthly reports in Excel format).

the following general rules apply: n If you use an external data file as the source data file. You can: n Copy selected file properties from an external data file to the working data file. and weighting. n Copy selected variable properties from one variable in either an external data file or the working data file to many variables in the working data file. alignment. n Variable properties are copied from the source variable only to target variables of a matching type: string (alphanumeric) or numeric (including numeric. n Undefined (empty) properties in the source data file do not overwrite defined properties in the working data file. File properties include documents. it must contain at least one variable. and currency). date. You can also use variables in the working data file as templates for other variables in the working data file. print and write formats. Variable properties include value labels. multiple response sets. missing values. n If you use the working data file as the source data file. variable sets. it must be an SPSS-format data file. n Copy selected variable properties from an external data file to matching variables in the working data file.98 Chapter 6 Copying Data Properties The Copy Data Properties wizard provides the ability to use an external SPSS data file as a template for defining file and variable properties in the working data file. variable labels. . level of measurement. formerly available on the File menu. Note: Copy Data Properties replaces Apply Data Dictionary. and column width (in the Data Editor). file label. You cannot use a completely blank working data file as the source data file. n Create new variables in the working data file based on selected variables in an external data file. When copying data properties.

This can be an external SPSS-format data file or the working data file. .99 Data Preparation To Copy Data Properties From the menus in the Data Editor window choose: Data Copy Data Properties... Figure 6-1 Copy Data Properties wizard: Step 1 Select the data file with the file and/or variable properties you want to copy. Follow the step-by-step instructions in the Copy Data Properties wizard.

you can specify the source variables containing the variable properties you want to copy and the target variables that will receive those variable properties. For string variables. By default. Figure 6-2 Copy Data Properties wizard: Step 2 Apply properties from selected source file variables to matching working file variables. Variable properties are copied from one or more selected source variables to matching variables in the working data file. . only matching variables are displayed in the two variable lists. Variables “match” if both the variable name and type (string or numeric) are the same.100 Chapter 6 Selecting Source and Target Variables In this step. the defined length must also be the same.

For string variables. all variables in the source data file are displayed and new variables based on the selected source variables are automatically created in the working data file. Only variables of the same type (numeric or string) as the selected variable in the source list are displayed in the working file list. new variables will be created in the working data file with the variable names and properties from the source data file. documents. Variable properties from a single selected variable in the source list can be applied to one or more selected variables in the working file list. Note: You cannot create new variables in the working data file with this option. If you select source variables that do not exist in the working data file (based on variable name). Only file properties (for example. Apply data set properties only—no variable selection. weight) will be applied to the working data file. Apply properties from a single source variable to selected working file variables of the same type. This updates the source list to display all variables in the source data file. new data file). file label. If the working data file contains no variables (a blank.101 Data Preparation n Create matching variables in the working data file if they do not already exist. This option is not available if the working data file contains no variables. . No variable properties will be applied. only strings of the same defined length as the source variable are displayed. This option is not available if the working data file is also the source data file.

102 Chapter 6 Choosing Variable Properties to Copy You can copy selected variable properties from the source variables to the target variables. Undefined (empty) properties in the source variables do not overwrite defined properties in the target variables. Figure 6-3 Copy Data Properties wizard: Step 3 .

you might want to think twice before selecting this option. The measurement level can be nominal. Value labels are often used when numeric data values are used to represent non-numeric categories (for example. these values also have defined value labels that describe what the missing value codes stand for.103 Data Preparation Value Labels. or currency). This affects only column width in the Data view in the Data Editor. Variable Label. 98 for Do not know and 99 for Not applicable). Alignment. Measurement Level. date. Data Editor Column Width. and number of decimal places displayed. the value label in the target variable is unchanged. n Replace deletes any defined value labels for the target variable and replaces them with the defined value labels from the source variable. nominal and ordinal are both considered categorical. This option is ignored for string variables. Missing values are values identified as representing missing data (for example. Since variable names are restricted to eight characters. If the same value has a defined value label in both the source and target variables. Value labels are descriptive labels associated with data values. ordinal. . variable labels are often used to provide more descriptive information. You can replace or merge value labels in the target variables. right. n Merge merges the defined value labels from the source variable with any existing defined value label for the target variable. center) in the Data view in the Data Editor. For numeric variables. Missing Values. This affects only alignment (left. codes of 1 and 2 for Male and Female). this controls numeric type (such as numeric. Typically. If you’re copying variable properties from a single source variable to multiple target variables. including leading and trailing characters and decimal indicator). width (total number of displayed characters. or scale. For those procedures that distinguish between different measurement levels. Formats. Any existing defined missing values for the target variable are deleted and replaced with the defined missing values from the source variable.

104 Chapter 6 Copying Data Set (File) Properties You can apply selected. Applies multiple response set definitions from the source data file to the working data file.) n Multiple response sets in the source data file that contain variables that do not exist in the working data file are ignored unless those variables will be created based on . (This is not available if the working data file is the source data file.) Figure 6-4 Copy Data Properties wizard: Step 4 Multiple Response Sets. global data set properties from the source data file to the working data file. (Note: Multiple response sets are currently used only by the Tables add-on component.

replacing them with variable sets from the source data file. Variable sets are defined by selecting Define Sets from the Utilities menu. the existing set in the working data file is unchanged. This overrides any weighting currently in effect in the working data file. Descriptive label applied to a data file with the FILE LABEL command. Weight Specification. Variable Sets. If a set with the same name exists in both files. n Merge adds variable sets from the source data file to the collection of variable sets in the working data file.105 Data Preparation specifications in step 2 (Choosing Source and Target Variables) in the Copy Data Properties wizard. n Replace deletes any existing variable sets in the working data file. the existing set in the working data file is unchanged. n Replace deletes any existing documents in the working data file. replacing them with the documents from the source data file. n Sets in the source data file that contain variables that do not exist in the working data file are ignored unless those variables will be created based on specifications in step 2 (Choosing Source and Target Variables) in the Copy Data Properties wizard. . If a set with the same name exists in both files. n Merge adds multiple response sets from the source data file to the collection of multiple response sets in the working data file. n Replace deletes all multiple response sets in the working data file and replaces them with the multiple response sets from the source data file. n Merge combines documents from the source and working data file. File Label. All documents are then sorted by date. Documents. Weights cases by the current weight variable in the source data file if there’s a matching variable in the working data file. Unique documents in the source file that do not exist in the working data file are added to the working data file. Variable sets are used to control the list of variables that are displayed in dialog boxes. Notes appended to the data file via the DOCUMENT command.

106 Chapter 6 Results Figure 6-5 Copy Data Properties wizard: Step 5 The last step in the Copy Data Properties wizard provides information on the number of variables for which variable properties will be copied from the source data file. . You can also choose to paste the generated command syntax into a syntax window. and the number of data set (file) properties that will be copied. the number of new variables that will be created. and save the syntax for later use.

ordinal) variables.. Define Variable Properties: n Scans the actual data values and lists all unique data values for each selected variable. enter 0 for the number of cases to scan. Figure 6-6 Initial dialog box for selecting variables to define . Note: To use Define Variable Properties without first scanning cases. n Identifies unlabeled values and provides an “auto-label” feature. To Define Variable Properties From the menus choose: Data Define Variable Properties. n Provides the ability to copy defined value labels from another variable to the selected variable or from the selected variable to multiple additional variables.107 Data Preparation Defining Variable Properties Define Variable Properties is designed to assist you in the process of creating descriptive value labels for categorical (nominal..

Specify an upper limit for the number of unique values to display. Click Continue to open the main Define Variable Properties dialog box. but those values are not displayed. . Specify the number of cases to scan to generate the list of unique values. Click OK to apply the value labels and other variable properties. Note: Long string variables (string variables with a defined width of more than eight characters) are not displayed in the variable list. Enter the label text for any unlabeled values that are displayed in the Value Label grid.108 Chapter 6 Select the numeric or short string variables for which you want to create value labels or define/change other variable properties. This is particularly useful for data files with a large number of cases for which a scan of the complete data file might take a significant amount of time. ratio) variables. Long string variables cannot have defined value labels or missing values categories. If there are values for which you want to create value labels. or thousands. Select a variable for which you want to create value labels or define/change other variable properties. Repeat this process for each listed variable for which you want to create value labels. or even millions of values for scale (continuous interval. you can enter values in the Values column below the last scanned value. This is primarily useful to prevent listing hundreds. such as missing values or descriptive variable labels.

main dialog box The main Define Variable Properties dialog box provides the following information for the scanned variables: Scanned Variable List. a check mark in the Unlabeled column indicates that the variable contains values without assigned value labels. For each scanned variable.109 Data Preparation Defining Value Labels and Other Variable Properties Figure 6-7 Define Variable Properties. You can also sort by variable name or measurement level by clicking the corresponding column heading in the Scanned Variable List. . To sort the variable list to display all variables with unlabeled values at the top of the list: Click the Unlabeled column heading in the Scanned Variable List.

For more information. n Count. Note: If you specified 0 for the number of cases to scan in the initial dialog box. Unique values for each selected variable. You can change the missing values designation of the category by clicking the check box. the Value Label grid will initially be blank. . except for any preexisting value labels and/or defined missing values categories for the selected variable. then the list reflects only the unique values present in those cases. n Missing. You can add or change labels in this column. So. in fact. Measurement Level. the list may display far fewer unique values than are actually present in the data. The number of times each value occurs in the scanned cases. Indicates that you have added or changed a value label. all new numeric variables are assigned the scale measurement level. so it is sometimes important to assign the correct measurement level. This list of unique values is based on the number of scanned cases. If a variable already has a range of values defined as user-missing (for example 90–99). Values defined as representing missing data. categorical. you cannot add or delete missing values categories for that variable with Define Variable Properties. A check indicates that the category is defined as a user-missing category. You can use Variable view of the Data Editor to modify the missing values categories for variable with missing values ranges. Displays any value labels that have already been defined. n Value. n Changed. and some procedures treat categorical and scale variables differently. If the data file has already been sorted by the variable for which you want to assign value labels. n From the currently selected variable to one or more other variables. Copy Properties. If you are unsure of what measurement level to assign to a variable. may initially be displayed as scale. if you scanned only the first 100 cases in the data file. many variables that are. see “Missing Values” in the chapter Data Editor. Value labels are primarily useful for categorical (nominal and ordinal) variables.110 Chapter 6 Value Label Grid n Label. by default. However. For example. You can copy value labels and other variable properties: n From another variable to the currently selected variable. click Suggest. and the Suggest button for measurement level will be disabled.

or custom currency). Suggest Measurement Level When you click Suggest for measurement level in the main Define Variable Properties dialog box. n A period (. not the display format. width (maximum number of digits. date. you can select one of five custom currency formats (CCA through CCE). n You cannot change the variable’s fundamental type (string or numeric). and number of decimal positions. For more information. click Automatic Labels. you can change the numeric type (such as numeric. n For string variables. including any decimal and/or grouping indicators). yyyyddd.) is displayed if the scanned values or the displayed values for preexisting defined value labels or missing-values categories are invalid for the selected display format type. and a measurement level is suggested in the Suggest Measurement Level dialog box that opens. To automatically create labels for unlabeled values. Variable Label and Display Format You can change the descriptive variable label and the display format. . you can select a specific date format (such as dd-mm-yyyy.400 is invalid for a date format variable. n An asterisk is displayed in the Value column if the specified width is less than the width of the scanned values or the displayed values for preexisting defined value labels or missing-values categories.) n For numeric custom format.111 Data Preparation Unlabeled values. etc. n For numeric variables. n For numeric date format. dollar. the current variable is evaluated based on the scanned cases and defined value labels. For example. you can change only the variable label. an internal numeric value of less than 86. mm/dd/yy. see “Currency Options” in the chapter Options. The Explanation area provides a brief description of the criteria used to provide the suggested measurement level.

112 Chapter 6 Figure 6-8 Suggest Measurement Level dialog box Note: Values defined as representing missing values are not included in the evaluation for measurement level. . whereas it may in fact contain negative values—but those values are already defined as missing values. on the fact that the variable contains no negative values. in part. Copying Variable Properties The Apply Labels and Level dialog box is displayed when you click From Another Variable or To Other Variables in the main Define Variable Properties dialog box. For example. Click Continue to accept the suggested level of measurement or Cancel to leave the measurement level unchanged. the defined width must also match. It displays all the scanned variables that match the current variable’s type (numeric or string). the explanation for the suggested measurement level may indicate that the suggestion is based. For string variables.

n Value labels and missing value categories for values not already defined for the target variable(s) are added to the set of value labels and missing value categories for the target variable(s). n Measurement level for the target variable(s) is always replaced.113 Data Preparation Figure 6-9 Apply Labels and Level dialog box Select a single variable from which to copy value labels and other variable properties (except variable label). n Existing value labels and missing value categories for target variable(s) are not replaced. missing values definitions are not copied. n If either the source or target variable has a defined range of missing values. or Select one or more variables to which to copy value labels and other variable properties. Click Copy to copy the value labels and measurement level. .

.

n You can create new variables or replace the values of existing variables. Preliminary analysis may reveal inconvenient coding schemes or coding errors. Compute Variable Compute Variable computes values for a variable based on numeric transformations of other variables. you can also specify the variable type and label. such as creating new variables based on complex equations and conditional statements. distribution functions. n You can use over 70 built-in functions. such as collapsing categories for analysis. including arithmetic functions. and any relationships between variables are either conveniently linear or neatly orthogonal. For new variables. and string functions. You can perform data transformations ranging from simple tasks.Chapter 7 Data Transformations In an ideal situation. Unfortunately. or data transformations may be required in order to coax out the true relationship between variables. your raw data are perfectly suitable for the type of analysis you want to perform. n You can compute values for numeric or string (alphanumeric) variables. to more advanced tasks. statistical functions. this is rarely the case. n You can compute values selectively for subsets of data based on logical conditions. 115 .

with the period (. n Numeric constants must be typed in American format. n Paste functions from the function list and fill in the parameters indicated by question marks. you must also select Type & Label to specify the data type.116 Chapter 7 Figure 7-1 Compute Variable dialog box To Compute Variables From the menus choose: Transform Compute.. Type the name of a single target variable. .) as the decimal indicator. It can be an existing variable or a new variable to be added to the working data file. To build an expression. n String constants must be enclosed in quotation marks or apostrophes. either paste components into the Expression field or type directly in the Expression field.. n For new string variables.

and ~=) on the calculator pad. n If the result of a conditional expression is false or missing. >. n If the result of a conditional expression is true. >=. the transformation is applied to the case.117 Data Transformations Compute Variable: If Cases The If Cases dialog box allows you to apply data transformations to selected subsets of cases. and relational operators. numeric and other functions. n Most conditional expressions use one or more of the six relational operators (<. <=. or missing for each case. using conditional expressions. n Conditional expressions can include variable names. =. the transformation is not applied to the case. constants. Figure 7-2 If Cases dialog box . logical variables. arithmetic operators. false. A conditional expression returns a value of true.

You can enter a label or use the first 110 characters of the Compute expression as the label. . Optional. Type.118 Chapter 7 Compute Variable: Type and Label By default. including: n Arithmetic functions n Statistical functions n String functions n Date and time functions n Distribution functions n Random variable functions n Missing value functions Search for functions in the online Help system index for a complete list of functions. Label. To compute a new string variable. Computed variables can be numeric or string (alphanumeric). descriptive variable label up to 120 characters long. Figure 7-3 Type and Label dialog box Functions Many types of functions are supported. String variables cannot be used in calculations. Right-click on a selected function in the list for a description of that function. you must specify the data type and width. new computed variables are numeric.

var2. or case weighting. In the expression (var1+var2+var3)/3 the result is missing if a case has a missing value for any of the three variables. The random number seed changes each time a random number is generated for use in transformations (such as the UNIFORM and NORMAL functions). To replicate a sequence of random numbers. you can specify the minimum number of arguments that must have nonmissing values. In the expression MEAN(var1.119 Data Transformations Missing Values in Functions Functions and simple arithmetic expressions treat missing values in different ways. type a period and the minimum number after the function name. For statistical functions. use this dialog box to reset the seed to a specific value prior to each analysis that uses the random numbers. as in MEAN. To do so.000 every time you start a new session. . random sampling.000.2(var1. var3) the result is missing only if the case has missing values for all three variables. var3) Random Number Seed Random Number Seed sets the seed used by the pseudo-random number generator to a specific value so that you can reproduce a sequence of pseudo-random numbers. var2. Figure 7-4 Random Number Seed dialog box The random number seed is automatically reset to 2.

. Enter a positive integer between 1 and 2. Figure 7-5 Count Occurrences of Values within Cases dialog box . Count Occurrences of Values within Cases This dialog box creates a variable that counts the occurrences of the same value(s) in a list of variables for each case..000.000. Select Set seed to. For example. a survey might contain a list of magazines with yes/no check boxes to indicate which magazines each respondent reads.120 Chapter 7 To Set the Random Number Seed From the menus choose: Transform Random Number Seed.000. You could count the number of yes responses for each respondent to create a new variable that contains the total number of magazines read.

Value specifications can include individual values. .. Click Define Values and specify which value or values should be counted. you can define a subset of cases for which to count occurrences of values. and ranges. missing or system-missing values. If a case matches several specifications for any variable. the target variable is incremented several times for that variable. Count Values within Cases: Values to Count The value of the target variable (on the main dialog box) is incremented by 1 each time one of the selected variables matches a specification in the Values to Count list here. Enter a target variable name.. The If Cases dialog box for defining subsets of cases is the same as the one described for Compute Variable.121 Data Transformations To Count Occurrences of Values within Cases From the menus choose: Transform Count. Ranges include their endpoints and any user-missing values that fall within the range. Optionally. Select two or more variables of the same type (numeric or string).

122 Chapter 7 Figure 7-6 Values to Count dialog box Recoding Values You can modify data values by recoding them. Recode into Same Variables Recode into Same Variables reassigns the values of existing variables or collapses ranges of existing values into new values. For example. You can recode the values within existing variables. you could collapse salaries into salary range categories. . This is particularly useful for collapsing or combining categories. You can recode numeric and string variables. they must all be the same type. If you select multiple variables. You cannot recode numeric and string variables together. or you can create new variables based on the recoded values of existing variables.

.123 Data Transformations Figure 7-7 Recode into Same Variables dialog box To Recode the Values of a Variable From the menus choose: Transform Recode Into Same Variables. you can define a subset of cases to recode. Optionally. The If Cases dialog box for defining subsets of cases is the same as the one described for Compute Variable. they must be the same type (numeric or string).. Select the variables you want to recode. If you select multiple variables. Click Old and New Values and specify how to recode values. .

All value specifications must be the same data type (numeric or string) as the variables selected in the main dialog box. change. Old Value. ranges. Figure 7-8 Old and New Values dialog box . The list of specifications that will be used to recode the variable(s). based on the old value specification. You can enter a value or assign the system-missing value. You can recode single values. The single value into which each old value or range of values is recoded. and remove specifications from the list. Ranges include their endpoints and any user-missing values that fall within the range. System-missing values and ranges cannot be selected for string variables because neither concept applies to string variables. the procedure automatically re-sorts the list. New Value. and missing values. You can add. ranges of values. if necessary. to maintain this order. The value(s) to be recoded. missing values. and all other values. If you change a recode specification on the list. The list is automatically sorted. using the following order: single values.124 Chapter 7 Recode into Same Variables: Old and New Values You can define values to recode in this dialog box. Old->New.

n You can recode numeric variables into string variables and vice versa. If you select multiple variables. they must all be the same type. n If you select multiple variables. Figure 7-9 Recode into Different Variables dialog box To Recode the Values of a Variable into a New Variable From the menus choose: Transform Recode Into Different Variables.125 Data Transformations Recode into Different Variables Recode into Different Variables reassigns the values of existing variables or collapses ranges of existing values into new values for a new variable... n You can recode numeric and string variables. you could collapse salaries into a new variable containing salary-range categories. You cannot recode numeric and string variables together. For example. they must be the same type (numeric or string). Select the variables you want to recode. .

missing values. based on the old value specification. Optionally. New Value. Click Old and New Values and specify how to recode values. The single value into which each old value or range of values is recoded. using the following order: single values. Old Value. New values can be numeric or string. . Old values must be the same data type (numeric or string) as the original variable. The list is automatically sorted. and cases with those values will be assigned the system-missing value for the new variable. If you change a recode specification on the list. You can add. Recode into Different Variables: Old and New Values You can define values to recode in this dialog box.126 Chapter 7 Enter an output (new) variable name for each new variable and click Change. ranges of values. and all other values. n Any old values that are not specified are not included in the new variable. You can recode single values. and remove specifications from the list. System-missing values and ranges cannot be selected for string variables because neither concept applies to string variables. To include all old values that do not require recoding. Old->New. select All other values for the old value and Copy old value(s) for the new value. you must also select Output variables are strings. change. Ranges include their endpoints and any user-missing values that fall within the range. and missing values. The value(s) to be recoded. to maintain this order. n If you want to recode a numeric variable into a string variable. ranges. you can define a subset of cases to recode. if necessary. the procedure automatically re-sorts the list. The list of specifications that will be used to recode the variable(s).

For example. and percentile values for numeric variables. . New variable names and descriptive variable labels are automatically generated. if you select gender and minority as grouping variables. Optionally. normal and Savage scores. A summary table lists the original variables.127 Data Transformations Figure 7-10 Old and New Values dialog box Rank Cases Rank Cases creates new variables containing ranks. based on the original variable name and the selected measure(s). and the variable labels. n Organize rankings into subgroups by selecting one or more grouping variables for the By list. you can: n Rank cases in ascending or descending order. Groups are defined by the combination of values of the grouping variables. Ranks are computed within each group. ranks are computed for each combination of gender and minority. the new variables.

. . Select one or more variables to rank. Ranking methods include simple ranks.128 Chapter 7 Figure 7-11 Rank Cases dialog box To Rank Cases From the menus choose: Transform Rank Cases. You can also create rankings based on proportion estimates and normal scores. Optionally. and percentiles. fractional ranks. Rank Cases: Types You can select multiple ranking methods. you can rank cases in ascending or descending order and organize ranks into subgroups. You can rank only numeric variables. Savage scores. A separate ranking variable is created for each method..

Rankit.129 Data Transformations Proportion Estimation Formula. For proportion estimates and normal scores. Tukey. Figure 7-13 Rank Cases Ties dialog box . you can select the proportion estimation formula: Blom. or Van der Waerden. Figure 7-12 Rank Cases Types dialog box Rank Cases: Ties This dialog box controls the method for assigning rankings to cases with the same value on the original variable.

a specification of 4 groups would assign a value of 1 to cases below the 25th percentile. 3 to cases between the 50th and 75th percentile.130 Chapter 7 The following table shows how the different methods assign ranks to tied values: Value Mean Low High Sequential 10 15 15 15 16 20 1 3 3 3 5 6 1 2 2 2 5 6 1 4 4 4 5 6 1 2 2 2 3 4 Categorize Variables Categorize Variables converts continuous numeric data to a discrete number of categories. with each group containing approximately the same number of cases. Figure 7-14 Categorize Variables dialog box . Data are categorized based on percentile groups. The procedure creates new variables containing the categorical data. For example. and 4 to cases above the 75th percentile. 2 to cases between the 25th and 50th percentile.

For any values without a defined value label. You can categorize only numeric variables. Automatic Recode Automatic Recode converts string and numeric values into consecutive integers. and some require consecutive integer values for factor levels.131 Data Transformations To Categorize Variables From the menus choose: Transform Categorize Variables… Select one or more numeric variables to categorize. some procedures cannot use string variables. . Figure 7-15 Automatic Recode dialog box The new variable(s) created by Automatic Recode retain any defined variable and value labels from the old variable. the resulting empty cells reduce performance and increase memory requirements for many procedures. When category codes are not sequential. the original value is used as the label for the recoded value. A table displays the old and new values and value labels. Additionally.

132 Chapter 7 String values are recoded in alphabetical order. n Create new time series variables as functions of existing time series variables. Select one or more variables to recode. A time series is obtained by measuring a variable (or set of variables) regularly over a period of time. enter a name for the new variable and click New Name.. Time series data transformations assume a data file structure in which each case (row) represents a set of observations at a different time. with uppercase letters preceding their lowercase counterparts. n Replace system. with their order preserved. . Time Series Data Transformations Several data transformations that are useful in time series analysis are provided: n Generate date variables to establish periodicity and distinguish between historical. if the original variable has 10 nonmissing values.. To Recode String or Numeric Values into Consecutive Integers From the menus choose: Transform Automatic Recode. and forecasting periods. and the value 11 would be a missing value for the new variable. and the length of time between cases is uniform. For example.and user-missing values with estimates based on one of several methods. Define Dates Define Dates generates date variables that can be used to establish the periodicity of a time series and to label output from time series analysis. the lowest missing value would be recoded to 11. validation. For each selected variable. Missing values are recoded into missing values higher than any nonmissing values.

For example. Indicates the repetitive cyclical variation. minute_. Defines the starting date value. Selecting it from the list has no effect. week_. hour_. n Not dated removes any previously defined date variables. quarter_.133 Data Transformations Figure 7-16 Define Dates dialog box Cases Are. Periodicity at higher level. First Case Is. such as the number of months in a year or the number of days in a week. four new variables are created: week_. a four-day work week). month_. The new variable names end with an underscore. is also created from the components. hours. Any variables with the following names are deleted: year_. second_. and date_. are assigned to subsequent cases. day_. date_. n Custom indicates the presence of custom date variables created with command syntax (for example. (See the Syntax Reference Guide for information on using the DATE command to create custom date variables. based on the time interval. days. Sequential values. which is assigned to the first case. if you selected Weeks. hour_. Defines the time interval used to generate dates. day_.) Custom date variables are not available with the Student version. A descriptive string variable. . This item merely reflects the current state of the working data file. and date_. The value displayed indicates the maximum value you can enter. A new numeric variable is created for each component that is used to define the date.

. Date Variables versus Date Format Variables Date variables created with Define Dates should not be confused with date format variables. These transformed values are useful in many time series analysis procedures. Date variables are used to establish periodicity for time series data. the new variable name would be price_1. For example. Select a time interval from the Cases Are list.. most date format variables are stored as the number of seconds from October 14. Internally. Default new variable names are the first six characters of the existing variable used to create it. The new variables retain any defined value labels from the original variables. followed by an underscore and a sequential number. which determines the date assigned to the first case. etc.134 Chapter 7 If date variables have already been defined. weeks.. running medians. 1582. Create Time Series Create Time Series creates new variables based on functions of existing numeric time series variables. lag. hours. from a user-specified starting point. they are replaced when you define new date variables that will have the same names as the existing date variables. defined in the Variable View of the Data Editor. moving averages. for the variable price. and lead functions. Available functions for creating time series variables include differences.. To Define Dates for Time Series Data From the menus choose: Data Define Dates. Date variables are simple integers representing the number of days. Date format variables represent dates and/or times displayed in various date/time formats. Enter the value(s) that define the starting date for First Case Is.

. .. Optionally. Select the variable(s) from which you want to create new time series variables.135 Data Transformations Figure 7-17 Create Time Series dialog box To Create a New Time Series Variable From the menus choose: Transform Create Time Series. Only numeric variables can be used. Select the time series function you want to use to transform the original variable(s). n Change the function for a selected variable. you can: n Enter variable names to override the default new variable names.

For example.136 Chapter 7 Time Series Transformation Functions Difference. if the current periodicity is 12 and the order is 2. the first 24 cases will have the system-missing value for the new variable. if the span is 5. The number of cases with the system-missing value at the beginning and at the end of the series for a span of n is equal to n/2 for even span values and for odd span values. Running median. The number of cases with the system-missing value at the beginning of the series is equal to the span value. the median is computed by averaging each pair of uncentered medians. The number of cases with the system-missing value at the beginning of the series is equal to the periodicity multiplied by the order. For example. Define Dates) that include a periodic component (such as months of the year). the number of cases with the system-missing value at the beginning and at the end of the series is 2. Average of the span of series values preceding the current value. The number of cases with the system-missing value at the beginning and at the end of the series for a span of n is equal to n/2 for even span values and for odd span values. Seasonal difference. if the difference order is 2. Nonseasonal difference between successive values in the series. The span is based on the currently defined periodicity. if the span is 5. The span is the number of preceding series values used to compute the average. Centered moving average. the first two cases will have the system-missing value for the new variable. For example. you must have defined date variables (Data menu. Median of a span of series values surrounding and including the current value. Prior moving average. Difference between series values a constant span apart. system-missing values appear at the beginning of the series. If the span is even. To compute seasonal differences. Average of a span of series values surrounding and including the current value. If the span is even. . the number of cases with the system-missing value at the beginning and at the end of the series is 2. The span is the number of series values used to compute the median. Because one observation is lost for each order of difference. For example. The order is the number of seasonal periods used to compute the difference. the moving average is computed by averaging each pair of uncentered means. The order is the number of previous values used to calculate the difference. The span is the number of series values used to compute the average.

the smoothed residuals are computed by subtracting the smoothed values obtained the first time through the process. based on the specified lead order. Lead. Cumulative sum of series values up to and including the current value. based on the specified lag order. Replace Missing Values creates new time series variables from existing ones. It then resmoothes these values by applying a running median of 5. Lag.137 Data Transformations Cumulative sum. The new variables retain any defined value labels from the original variables. Smoothing. For example. and some time series measures cannot be computed if there are missing values in the series. The order is the number of cases prior to the current case from which the value is obtained. a running median of 3. The number of cases with the system-missing value at the end of the series is equal to the order value. Finally. the new variable name would be price_1. Value of a subsequent case. replacing missing values with estimates computed with one of several methods. New series values based on a compound data smoother. The number of cases with the system-missing value at the beginning of the series is equal to the order value. Default new variable names are the first six characters of the existing variable used to create it. This whole process is then repeated on the computed residuals. followed by an underscore and a sequential number. for the variable price. Residuals are computed by subtracting the smoothed series from the original series. The order is the number of cases after the current case from which the value is obtained. and hanning (running weighted averages). Value of a previous case. Replace Missing Values Missing observations can be problematic in analysis. This is sometimes referred to as T4253H smoothing. which is centered by a running median of 2. . The smoother starts with a running median of 4.

Select the variable(s) for which you want to replace missing values.. Optionally. Select the estimation method you want to use to replace missing values.138 Chapter 7 Figure 7-18 Replace Missing Values dialog box To Replace Missing Values for Time Series Variables From the menus choose: Transform Replace Missing Values. you can: n Enter variable names to override the default new variable names. n Change the estimation method for a selected variable. ..

Linear trend at point. . Replaces missing values with the linear trend for that point.139 Data Transformations Estimation Methods for Replacing Missing Values Series mean. Replaces missing values using a linear interpolation. Replaces missing values with the mean of valid surrounding values. The span of nearby points is the number of valid values above and below the missing value used to compute the median. Mean of nearby points. The last valid value before the missing value and the first valid value after the missing value are used for the interpolation. Missing values are replaced with their predicted values. The span of nearby points is the number of valid values above and below the missing value used to compute the mean. Replaces missing values with the mean for the entire series. Linear interpolation. the missing value is not replaced. If the first or last case in the series has a missing value. Replaces missing values with the median of valid surrounding values. Median of nearby points. The existing series is regressed on an index variable scaled 1 to n.

.

You may want to combine data files. Transpose cases and variables. Restructure data. including the ability to: Sort data. You can restrict your analysis to a subset of cases or perform simultaneous analyses on different subsets. You can change the unit of analysis by aggregating cases based on the value of one or more grouping variables. sort the data in a different order. You can sort cases based on the value of one or more variables. For data files in which this order is reversed. You can restructure data to create a single case (record) from multiple cases or create multiple cases from a single case. Select subsets of cases. Weight cases for analysis based on the value of a weight variable. Aggregate data. Weight data. Merge files.Chapter 8 File Handling and File Transformations Data files are not always organized in the ideal form for your specific needs. you can switch the rows and columns and read the data in the correct format. A wide range of file transformation capabilities is available. or change the unit of analysis by grouping cases together. select a subset of cases. You can combine files with the same variables but different cases or the same cases but different variables. You can merge two or more data files. 141 . The SPSS data file format reads rows as cases and columns as variables.

For example. uppercase letters precede their lowercase counterparts in sort order.. n If you select multiple sort variables. n For string variables. if you select gender as the first sorting variable and minority as the second sorting variable. .142 Chapter 8 Sort Cases This dialog box sorts cases (rows) of the data file based on the values of one or more sorting variables. Figure 8-1 Sort Cases dialog box To Sort Cases From the menus choose: Data Sort Cases. Select one or more sorting variables. For example.. the string value “Yes” comes before “yes” in sort order. cases are sorted by each variable within categories of the preceding variable on the Sort list. You can sort cases in ascending or descending order. cases will be sorted by minority classification within each gender category.

To Transpose Variables and Cases From the menus choose: Data Transpose. n User-missing values are converted to the system-missing value in the transposed data file.143 File Handling and File Transformations Transpose Transpose creates a new data file in which the rows and columns in the original data file are transposed so that cases (rows) become variables and variables (columns) become cases. If it is a numeric variable. the variable names start with the letter V. and its values will be used as variable names in the transposed data file. n Merge files containing the same cases but different variables. followed by the numeric value.. change the definition of missing values in the Variable view in the Data Editor.. n A new string variable that contains the original variable names. Transpose automatically creates new variable names and displays a list of the new variable names. n If the working data file contains an ID or name variable with unique values. Merging Data Files You can merge data from two files in two different ways. To retain any of these values. you can use it as the name variable. You can: n Merge files containing the same variables but different cases. . is automatically created. Select one or more variables to transpose into cases. case_lbl.

n String variables of unequal width. merged file. Variables to be excluded from the new. you might record the same information for customers in two different sales regions and maintain the data for each region in separate files. Numeric variables cannot be merged with string variables. . Figure 8-2 Add Cases dialog box Unpaired Variables. merged data file. Variables from the working data file are identified with an asterisk (*). n Variables defined as numeric data in one file and string data in the other file. The defined width of a string variable must be the same in both data files. By default. For example.144 Chapter 8 Add Cases Add Cases merges the working data file with a second data file that contains the same variables but different cases. this list contains: n Variables from either data file that do not match a variable name in the other file. Variables from the external data file are identified with a plus sign (+). You can create pairs from unpaired variables and include them in the new.

By default. n You can remove variables from the list if you do not want them to be included in the merged file..) . To Merge Data Files with the Same Variables and Different Cases Open one of the data files. (Press the Ctrl key and click the left mouse button at the same time. Select the data file to merge with the open data file. For example.. Ctrl-click the other variable on the list. To Select a Pair of Unpaired Variables Click one of the variables on the Unpaired Variables list. Add any variable pairs from the Unpaired Variables list that represent the same information recorded under different variable names in the two files. merged data file. From the menus choose: Data Merge Files Add Cases. date of birth might have the variable name brthdate in one file and datebrth in the other file. all of the variables that match both the name and the data type (numeric or string) are included on the list. Variables to be included in the new.145 File Handling and File Transformations Variables in New Working Data File. n Any unpaired variables included in the merged file will contain missing data for cases from the file that does not contain that variable. The cases from this file will appear first in the new. (The variable name from the working data file is used as the variable name in the merged file. Remove any variables you do not want from the Variables in New Working Data File list.) Click Pair to move the variable pair to the Variables in New Working Data File list. merged data file.

one of them must be renamed first. n Include two variables with the same name but of unmatched types or different string widths. For example. . Renaming variables enables you to: n Use the variable name from the external file rather than the name from the working data file for variable pairs.146 Chapter 8 Figure 8-3 Selecting pairs of variables with Ctrl-click Add Cases: Rename You can rename variables from either the working data file or the external file before moving them from the unpaired list to the list of variables to be included in the merged data file. to include both the numeric variable sex from the working data file and the string variable sex from the external file.

n Variable names in the second data file that duplicate variable names in the working data file are excluded by default because Add Variables assumes that these variables contain duplicate information. dictionary information from the external data file is used.147 File Handling and File Transformations Add Cases: Dictionary Information Any existing dictionary information (variable and value labels. user-missing values. any additional value labels or user-missing values for that variable in the external file are ignored. n If one or more key variables are used to match cases. n If the working data file contains any defined value labels or user-missing values for a variable. display formats) in the working data file is applied to the merged data file. n Cases must be sorted in the same order in both data files. n If any dictionary information for a variable is undefined in the working data file. you might want to merge a data file that contains pre-test results with one that contains post-test results. . For example. the two data files must be sorted by ascending order of the key variable(s). Add Variables Add Variables merges the working data file with an external data file that contains the same cases but different variables.

n Both data files must be sorted by ascending order of the key variables. New Working Data File. all unique variable names in both data files are included on the list. If some cases in one file do not have matching cases in the other file (that is. merged data file.148 Chapter 8 Figure 8-4 Add Variables dialog box Excluded Variables. merged data file. By default. this list contains any variable names from the external data file that duplicate variable names in the working data file. Unmatched cases contain values for only the variables in the file from which they are taken. Variables from the working data file are identified with an asterisk (*). If you want to include an excluded variable with a duplicate name in the merged file. Variables from the external data file are identified with a plus sign (+). You can also use key variables with table lookup files. . Key Variables. Variables to be included in the new. By default. n The key variables must have the same names in both data files. some cases are missing in one file). you can rename it and add it to the list of variables to be included. variables from the other file contain the system-missing value. n Cases that do not match on the key variables are included in the merged file but are not merged with cases from the other file. and the order of variables on the Key Variables list must be the same as their sort sequence. Variables to be excluded from the new. use key variables to identify and correctly match cases from the two files.

or table lookup file. age. A keyed table. Select Match cases on key variables in sorted files. From the menus choose: Data Merge Files Add Variables. if one file contains information on individual family members (such as sex. To Select Key Variables Select the variables from the external file variables (+) on the Excluded Variables list. Select the data file to merge with the open data file. you can use the file of family data as a table lookup file and apply the common family data to each individual family member in the merged data file.. education) and the other file contains overall family information (such as total income. This is primarily useful if you want to include two variables with the same name that contain different information in the two files. Add Variables: Rename You can rename variables from either the working data file or the external file before moving them to the list of variables to be included in the merged data file. . Both data files must be sorted by ascending order of the key variables. To Merge Files with the Same Cases but Different Variables Open one of the data files. location).149 File Handling and File Transformations External file or Working data file is keyed table. Add the variables to the Key Variables list. family size. and the order of variables on the Key Variables list must be the same as their sort sequence. For example.. is a file in which data for each “case” can be applied to multiple cases in the other data file. The key variables must exist in both the working data file and the external data file.

Aggregate Data creates new aggregate variable names using the first several characters of the source variable name followed by an underscore and a sequential two-digit number. Aggregate Variable(s). Figure 8-5 Aggregate Data dialog box Break Variable(s). the name of the aggregate function. Variables are used with aggregate functions to create the new variables for the aggregated file. The new data file contains one case for each group. . The aggregate variable name is followed by an optional variable label in quotes. Each unique combination of break variable values defines a group and generates one case in the new aggregated file. The break variable can be either numeric or string format. Cases are grouped together based on the values of the break variables. All break variables are saved in the new file with their existing names and dictionary information. For example. you could aggregate county data by state and create a new data file in which state is the unit of analysis. Cases are aggregated based on the value of one or more grouping variables.150 Chapter 8 Aggregate Data Aggregate Data combines groups of cases into single summary cases and creates a new aggregated data file. By default.

provide descriptive variable labels. n Number of cases. Source variables for aggregate functions must be numeric. Aggregate Data: Aggregate Function This dialog box specifies the function to use to calculate aggregated data values for selected variables on the Aggregate Variables list in the Aggregate Data dialog box. n Percentage or fraction of values inside or outside of a specified range. Aggregate functions include: n Summary functions. You can also create a variable that contains the number of cases in each break group. and sum. You can override the default aggregate variable names with new variable names. and change the functions used to compute the aggregated data values. and missing.. To Aggregate a Data File From the menus choose: Data Aggregate. median. including mean. standard deviation. n Percentage or fraction of values above or below a specified value. including unweighted. Select one or more aggregate variables to include in the new data file. non-missing. weighted. Select one or more break variables that define how cases are grouped to create aggregated data.151 File Handling and File Transformations and the source variable name in parentheses. Select an aggregate function for each aggregate variable. ..

n Variable names cannot exceed 8 characters. Figure 8-7 Variable Name and Label dialog box . n Variable labels can be up to 120 characters.152 Chapter 8 Figure 8-6 Aggregate Function dialog box Aggregate Data: Variable Name and Label Aggregate Data assigns default variable names for the aggregated variables in the new data file. This dialog box enables you to change the variable name for the selected variable on the Aggregate Variables list and provide a descriptive variable label.

. select Sort the file by grouping variables. Organize output by groups. Figure 8-8 Split File dialog box Compare groups. cases will be grouped by minority classification within each gender category. All results from each procedure are displayed separately for each split-file group. For charts. if you select gender as the first grouping variable and minority as the second grouping variable. a single pivot table is created and each split-file variable can be moved between table dimensions.153 File Handling and File Transformations Split File Split File splits the data file into separate groups for analysis based on the values of one or more grouping variables. For pivot tables. For example. n Cases should be sorted by values of the grouping variables and in the same order that variables are listed in the Groups Based On list. cases are grouped by each variable within categories of the preceding variable on the Groups Based On list. n Each eight characters of a long string variable (string variables longer than eight characters) counts as a variable toward the limit of eight grouping variables. n You can specify up to eight grouping variables. If the data file isn’t already sorted. a separate chart is created for each split-file group and the charts are displayed together in the Viewer. If you select multiple grouping variables. Split-file groups are presented together for comparison purposes.

. filter_$. The criteria used to define a subgroup can include: n Variable values and ranges n Date and time ranges n Case (row) numbers n Arithmetic expressions n Logical expressions n Functions Unselected Cases. Deleted cases are removed from the data file and cannot be recovered if you save the data file after deleting the cases. select All cases. Select Compare groups or Organize output by groups. . You can filter or delete cases that do not meet the selection criteria. Select one or more grouping variables. You can also select a random sample of cases. Select Cases Select Cases provides several methods for selecting a subgroup of cases based on criteria that include variables and complex expressions. To turn filtering off and include all cases in your analysis. Filtered cases remain in the data file but are excluded from analysis. to indicate filter status. Selected cases have a value of 1.154 Chapter 8 To Split a Data File for Analysis From the menus choose: Data Split File. Filtered cases are also indicated with a slash through the row number in the Data Editor.. filtered cases have a value of 0. Select Cases creates a filter variable.

155 File Handling and File Transformations Figure 8-9 Select Cases dialog box To Select a Subset of Cases From the menus choose: Data Select Cases. Select one of the methods for selecting cases. Specify the criteria for selecting cases.. ..

n If the result of a conditional expression is false or missing. >=. Select Cases: Random Sample This dialog box allows you to select a random sample based on an approximate percentage or an exact number of cases. . n Conditional expressions can include variable names. <=. or missing for each case. A conditional expression returns a value of true. and relational operators. arithmetic operators. the case is not selected. constants. false. so the same case cannot be selected more than once. Figure 8-10 Select Cases If dialog box n If the result of a conditional expression is true. >. logical variables.156 Chapter 8 Select Cases: If This dialog box allows you to select subsets of cases using conditional expressions. numeric and other functions. the case is selected. =. Sampling is performed without replacement. n Most conditional expressions use one or more of the six relational operators (<. and ~=) on the calculator pad.

The more cases there are in the data file. n Case ranges are based on row number as displayed in the Data Editor. This second number should be less than or equal to the total number of cases in the data file. Exactly. . the sample will contain proportionally fewer cases than the requested number. If the number exceeds the total number of cases in the data file. Select Cases: Range This dialog box selects cases based on a range of case numbers or a range of dates or times. n Date and time ranges are available only for time series data with defined date variables (Data menu. Generates a random sample of approximately the specified percentage of cases. Define Date). You must also specify the number of cases from which to generate the sample. the closer the percentage of cases selected is to the specified percentage.157 File Handling and File Transformations Figure 8-11 Select Cases Random Sample dialog box Approximately. Since this routine makes an independent pseudo-random decision for each case. A user-specified number of cases. the percentage of cases selected can only approximate the specified percentage.

. n The values of the weighting variable should indicate the number of observations represented by single cases in your data file.158 Chapter 8 Figure 8-12 Select Cases Range dialog box for range of cases (no defined date variables) Figure 8-13 Select Cases Range dialog box for time series data with defined date variables Weight Cases Weight Cases gives cases different weights (by simulated replication) for statistical analysis.

it remains in effect until you select another weight variable or turn off weighting. even after the file has been saved in weighted form. a cell count of 4. weighting information is saved with the data file. Figure 8-14 Weight Cases dialog box Once you apply a weight variable. cell counts based on fractional weights are rounded to the nearest integer.2 based on fractional weights is rounded to 4. n Fractional values are valid. negative. Weights in scatterplots and histograms. or missing values for the weighting variable are excluded from analysis. Weights in Crosstabs. To Weight Cases From the menus choose: Data Weight Cases... In the Crosstabs procedure. . You can turn off weighting at any time. If you save a weighted data file.159 File Handling and File Transformations n Cases with zero. they are used exactly where this is meaningful and most likely where cases are tabulated. Select Weight cases by. but this does not affect cases with a zero. For example. These cases remain excluded from the chart even if you turn weighting off from within the chart. negative. or missing value for the weight variable. Scatterplots and histograms have an option for turning case weights on and off.

n Transpose all data. For example. n Restructure selected cases into variables. The wizard replaces the current file with a new. Optionally. The wizard can: n Restructure selected variables into cases. select the type of restructuring that you want to do. Select the data to restructure. restructured file. In the first dialog box. The values of the frequency variable are used as case weights... n Sort the data prior to restructuring. which allow you to trace a value in the new file back to a value in the original file.160 Chapter 8 Select a frequency variable. a case with a value of 3 for the frequency variable will represent three cases in the weighted data file. To Restructure Data From the menus choose: Data Restructure. Restructure Data Wizard: Select Type Use the Restructure Data Wizard to restructure your data. . Select the type of restructuring that you want to do. Restructuring Data Use the Restructure Data Wizard to restructure your data for the SPSS procedure that you want to use. n Define options for the new file. n Paste the command syntax into a syntax window. you can: n Create identification variables.

Choose this when you have groups of related rows in your data and you want them to appear in groups of columns in the new data file. If you choose this. n Transpose all data. the wizard will display the steps for Cases to Variables. This choice closes the Restructure Data Wizard and opens the Transpose Data dialog box. Choose this when you have groups of related columns in your data and you want them to appear in groups of rows in the new data file. Choose this when you want to transpose your data. If you choose this. All rows will become columns and all columns will become rows in the new data. n Restructure selected cases into variables. .161 File Handling and File Transformations Figure 8-15 Restructure Data Wizard n Restructure selected variables into cases. the wizard will display the steps for Variables to Cases.

a measurement or a score. In a simple data structure. a row for each level of a factor). The Restructure Data Wizard helps you to restructure files with a complex data structure. They contain data for the same factor level. each variable is a single column in your data and each case is a single row. When you analyze data. a demographic. How are the data arranged in the current file? The current data may be arranged so that factors are recorded in a separate variable (in groups of cases) or with the variable (in groups of variables). conditions of interest are often referred to as factors. the first two rows are a case group because they are related. for example. . The structure of the current file and the structure that you want in the new file determine the choices that you make in the wizard. A case is an observation—for example. or something else. a point in time. In SPSS data analysis. You may have information about a variable in more than one column in your data (for example. the factor is often referred to as a grouping variable when the data are structured this way. you have a complex data structure. The condition can be a specific experimental treatment. Does the current file have variables and conditions recorded in separate columns? For example: var factor 8 9 3 1 1 1 2 2 In this example. and there would be a row for each student. or you may have information about a case in more than one row (for example. if you were measuring test scores for all students in a class. When you analyze factors. an individual. So. n Groups of cases.162 Chapter 8 Deciding How to Restructure the Data A variable contains information that you want to analyze—for example. you are often analyzing how a variable varies according to some condition. a column for each level of a factor). all score values would appear in only one column. In data analysis.

OLAP Cubes. select Restructure selected cases into variables. or related samples with Nonparametric Tests.163 File Handling and File Transformations n Groups of columns. How should the data be arranged in the new file? This is usually determined by the procedure that you want to use to analyze your data. They contain data for the same variable—var_1 for factor level 1 and var_2 for factor level 2. Examples are univariate. n Procedures that require groups of cases. time-dependent covariate analysis with Cox Regression Analysis. Does the current file have variables and conditions recorded in the same column? For example: var_1 var_2 8 9 3 1 In this example. multivariate. the factor is often referred to as a repeated measure when the data are structured this way. the two columns are a variable group because they are related. If your current data structure is case groups and you want to do these analyses. Figure 8-16 Current data for variables to cases . Your data must be structured in variable groups to analyze repeated measures. and variance components with General Linear Model. n Procedures that require groups of variables. Mixed Models. Examples are repeated measures with General Linear Model. test scores are recorded in separate columns for each factor. Example of Variables to Cases In this example. select Restructure selected variables into cases. A and B. In SPSS data analysis. paired samples with T Test. Your data must be structured in case groups to do analyses that require a grouping variable. If your current data structure is variable groups and you want to do these analyses. and independent samples with T Test or Nonparametric Tests.

Select Restructure selected cases into variables in the Restructure Data Wizard. and use time to create the variable group in the new file. Figure 8-17 New. Example of Cases to Variables In this example. Your data structure is case groups. but you don’t have the grouping variable that the procedure requires. Figure 8-18 Current data for cases to variables You want to do a paired samples t test. test scores are recorded twice for each subject. You have a column group consisting of score_a and score_b. restructured data for variables to cases When you run the independent samples t test. you can now use group as the grouping variable. The new data file is shown in the following figure. and create an index named group. use id to identify the row groups in the current data. but you don’t have the repeated measures for the paired variables that the procedure requires. Select Restructure selected variables into cases in the Restructure Data Wizard. restructure one variable group into a new variable named score.164 Chapter 8 You want to do an independent samples t test. . before and after a treatment.

How many variable groups are in the current file? Think about how many variable groups exist in the current data. decide how many variable groups in the current file that you want to restructure in the new file. you have one variable group. In this step. you can now use bef and aft as the variable pair. called a variable group. h2. Restructure Data Wizard (Variables to Cases): Number of Variable Groups Note: The wizard presents this step if you choose to restructure variable groups into rows. .165 File Handling and File Transformations Figure 8-19 New. You do not have to restructure all variable groups into the new file. and h3—that record height. w2. if you have three columns in the current data—w1. For example. restructured data for cases to variables When you run the paired samples t test. and w3—that record width. If you have an additional three columns—h1. How many variable groups should be in the new file? Consider how many variable groups you want to have represented in the new data file. you have two variable groups. records repeated measures of the same variable in separate columns. A group of related columns.

n More than one. The wizard will create a single restructured variable in the new file from one variable group in the current file. You can also create a variable that identifies the rows in the new file. provide information about how the variables in the current file should be used in the new file. In this step.166 Chapter 8 Figure 8-20 Restructure Data Wizard: Number of Variable Groups n One. The number that you specify affects the next step. The wizard will create multiple restructured variables in the new file. . Restructure Data Wizard (Variables to Cases): Select Variables Note: The wizard presents this step if you choose to restructure variable groups into rows. in which the wizard automatically creates the specified number of new variables.

The wizard created one new variable for each group. What should be restructured in the new file? In the previous step. Use the controls in Case Group Identification to define the identification variable in the new file. you told the wizard how many variable groups you want to restructure. Use the controls in Variables to be Transposed to define the restructured variable in the new file. The values for the variable group will appear in that variable in the new file. Click a cell to change the default variable name and provide a descriptive variable label for the identification variable.167 File Handling and File Transformations Figure 8-21 Restructure Data Wizard: Select Variables How should the new rows be identified? You can create a variable in the new data file that identifies the row in the current data file that was used to create a group of new rows. The identifier can be a sequential case number or it can be the values of the variable. . Variable names cannot exceed 8 characters. Variable labels can be up to 120 characters.

n You must define variable groups (by selecting variables in the source list) for all available target variables before you can proceed to the next step.) Select the next target variable that you want to define. you cannot include the same variable in more than one target variable group. its values are repeated in the new file. n Although you can include the same variable more than once in the same target variable group. What should be copied into the new file? Variables that aren’t restructured can be copied into the new file. (Variables that are listed more than once are included in the count.168 Chapter 8 To Specify One Restructured Variable Put the variables that make up the variable group that you want to transform into the Variables to be Transposed list. . Put the variables that make up the variable group that you want to transform into the Variables to be Transposed list. (A variable is copied rather than moved from the source variable list. and its values are repeated in the new file. All of the variables in the group must be of the same type (numeric or string). Move variables that you want to copy into the new file into the Fixed Variable(s) list. and repeat the variable selection process for all available target variables. To Specify Multiple Restructured Variables Select the first target variable that you want to define from the Target Variable drop- down list. You can change the default variable names here. You can include the same variable more than once in the variable group (variables are copied rather than moved from the source variable list). All of the variables in the group must be of the same type (numeric or string).) n The number of target variable groups is determined by the number of variable groups that you specified in the previous step. n Each target variable group list must contain the same number of variables. You can include the same variable more than once in the variable group. but you must return to the previous step to change the number of variables groups to restructure. Their values will be propagated in the new rows.

The wizard will create a single index variable. however. Figure 8-22 Restructure Data Wizard: Create Index Variables How many index variables should be in the new file? Index variables can be used as grouping variables in SPSS procedures. multiple indices may be appropriate. . decide whether to create index variables. if the variable groups in your current file reflect multiple factor levels. n One.169 File Handling and File Transformations Restructure Data Wizard (Variables to Cases): Create Index Variables Note: The wizard presents this step if you choose to restructure variable groups into rows. In most cases. a single index variable is sufficient. An index is a new variable that sequentially identifies a row group based on the original variable from which the new row was created. In this step.

and w3. there is one variable group. n None. in which the wizard automatically creates the specified number of indices. Select this if you do not want to create index variables in the new file. width. Figure 8-23 Current data for one index We’ll restructure the variable group into a single variable. Example of One Index for Variables to Cases In the current data. w2. and one factor. Width was measured three times and recorded in w1. We can now use index in SPSS procedures that require a grouping variable. width. restructured data with one index Index starts with 1 and increments for each variable in the group. and create a single numeric index.170 Chapter 8 n More than one. The wizard will create multiple indices and enter the number of indices that you want to create. time. The number that you specify affects the next step. Figure 8-24 New. It restarts each time a new row is encountered in the original file. The new data are shown in the following table. .

there is one variable group.171 File Handling and File Transformations Example of Two Indices for Variables to Cases When a variable group records more than one factor. Figure 8-25 Current data for two indices We’ll restructure the variable group into a single variable. width. The new data are shown in the following table. The values can be sequential numbers or the names of the variables in an original variable group. A and B. In the current data. . restructured data with two indices Restructure Data Wizard (Variables to Cases): Create One Index Variable Note: The wizard presents this step if you choose to restructure variable groups into rows and create one index variable. and two factors. the current data must be arranged so that the levels of the first factor are a primary index within which the levels of subsequent factors cycle. width. and create two indices. you can create more than one index. however. The data are arranged so that levels of factor B cycle within levels of factor A. Figure 8-26 New. In this step. You can also specify a name and a label for the new index variable. decide what values you want for the index variable.

172 Chapter 8 Figure 8-27 Restructure Data Wizard: Create One Index Variable For more information. Choose a variable group from the list. . The wizard will automatically assign sequential numbers as index values. n Sequential numbers. Variable labels can be up to 120 characters. Click a cell to change the default variable name and provide a descriptive variable label for the index variable. The wizard will use the names of the selected variable group as index values. n Names and labels. see “Example of One Index for Variables to Cases” above. Variable names cannot exceed 8 characters. n Variable names.

see “Example of Two Indices for Variables to Cases” above. specify the number of levels for each index variable. . You can also specify a name and a label for the new index variable.173 File Handling and File Transformations Restructure Data Wizard (Variables to Cases): Create Multiple Index Variables Note: The wizard presents this step if you choose to restructure variable groups into rows and create multiple index variables. Figure 8-28 Restructure Data Wizard: Create Multiple Index Variables For more information. In this step.

If there are multiple factors. Total combined levels. Click a cell to change the default variable name and provide a descriptive variable label for the index variables. How many levels should be in the new file? Enter the number of levels for each index. The first index increments the slowest. the current data must be arranged so that the levels of the first factor are a primary index within which the levels of subsequent factors cycle. Variable names cannot exceed 8 characters. the wizard checks the number of levels that you create. Because the restructured data will contain one row for each combination of treatments. Names and labels. Restructure Data Wizard (Variables to Cases): Options Note: The wizard presents this step if you choose to restructure variable groups into rows. specify options for the new. . You cannot create more levels than exist in the current data.174 Chapter 8 How many levels are recorded in the current file? Consider how many factor levels are recorded in the current data. The values start at 1 and increment for each level. A level defines a group of cases that experienced identical conditions. The values for multiple index variables are always sequential numbers. It will compare the product of the levels that you create to the number of variables in your variable groups. They must match. Variable labels can be up to 120 characters. and the last index increments the fastest. In this step. restructured file.

Keep missing data? The wizard checks each potential new row for null values. you can choose to discard or keep them.175 File Handling and File Transformations Figure 8-29 Restructure Data Wizard: Options Drop unselected variables? In the select variables step (step 3). Create a count variable? The wizard can create a count variable in the new file. The data from the selected variables will appear in the new file. If there are other variables in the current data. A count variable may be useful if you choose to discard null values from the new file because that makes it possible to generate a different number of new rows for a given row in the . variables to be copied. and an identification variable from the current data. You can choose to keep or discard rows that contain only null values. you selected variable groups to be restructured. A null value is a system-missing or blank value. It contains the number of new rows generated by a row in the current data.

Variable labels can be up to 120 characters. Restructure Data Wizard (Cases to Variables): Select Variables Note: The wizard presents this step if you choose to restructure case groups into columns. Variable names cannot exceed 8 characters. In this step. Figure 8-30 Restructure Data Wizard: Select Variables . provide information about how the variables in the current file should be used in the new file.176 Chapter 8 current data. Click a cell to change the default variable name and provide a descriptive variable label for the count variable.

Each time the wizard encounters a new combination of identification values. Move variables that identify case groups in the current file into the Identifier Variable(s) list. so it is important that the data are sorted by the variables that identify case groups. the wizard copies the values into the new file. a variable appears in a single column. If they do. decide whether to sort the current file before restructuring it.177 File Handling and File Transformations What identifies case groups in the current data? A case group is a group of rows that are related because they measure the same observational unit—for example. It checks each variable to see if the data values vary within a case group. In the new data file. If the current data file isn’t already sorted. the wizard will create a new row. you can also choose to order the new columns by index. that variable will appear in multiple new columns. How should the new variable groups be created in the new file? In the original data. Restructure Data Wizard (Cases to Variables): Sort Data Note: The wizard presents this step if you choose to restructure case groups into columns. Move the variables that should be used to form the new variable groups to the Index Variable(s) list. Each time a new combination of identification values is encountered. The restructured data will contain one new variable for each unique value in these columns. in the same order that variables are listed in the Identifier Variable(s) list. so cases in the current file should be sorted by values of the identification variables. When the wizard presents options. The wizard needs to know which variables in the current file identify the case groups so that it can consolidate each group into a single row in the new file. a new row is created. . In this step. you can sort it in the next step. Variables that are used to split the current data file are automatically used to identify case groups. the wizard restructures the values into a variable group in the new file. Index variables are variables in the current data that the wizard should use to create the new columns. What happens to the other columns? The wizard automatically decides what to do with the variables that remain in the Current File list. If they don’t. an individual or an institution.

Choose this when you are sure that the current data are sorted by the variables that identify case groups.178 Chapter 8 Figure 8-31 Restructure Data Wizard: Sort Data How are the rows ordered in the current file? Consider how the current data are sorted and which variables you are using to identify case groups (specified in the previous step). . This choice requires a separate pass of the data. but it guarantees that the rows are correctly ordered for restructuring. n No. in the same order that variables are listed in the Identifier Variable(s) list in the previous step. n Yes. The wizard will automatically sort the current data by the identification variables. The wizard will not sort the current data. Choose this when the data aren’t sorted by the identification variables or when you aren’t sure.

specify options for the new. Figure 8-32 Restructure Data Wizard: Options How should the new variable groups be ordered in the new file? n By variable.179 File Handling and File Transformations Restructure Data Wizard (Cases to Variables): Options Note: The wizard presents this step if you choose to restructure case groups into columns. In this step. The wizard groups the variables according to the values of the index variables. The wizard groups the new variables created from an original variable together. n By index. . restructured file.

otherwise.feb Create a count variable? The wizard can create a count variable in the new file. The variables to be restructured are w and h and the index is month: w h month Grouping by variable results in: w. The original data are: customer product 1 1 2 3 chick eggs eggs chick Creating an indicator variable results in one new variable for each unique value of product. The index variable is product.jan Grouping by index results in: w.jan w. An indicator variable has the value of 1 if the case has a value. It contains the number of rows in the current data that were used to create a row in the new data file. Example. it is 0. It creates one new variable for each unique value of the index variable.jan h.180 Chapter 8 Example. The indicator variables signal the presence or absence of a value for a case. the restructured data could be used to get frequency counts of the products that customers buy.feb h. The restructured data are: customer indchick indeggs 1 2 3 1 0 1 1 1 0 In this example. Create indicator variables? The wizard can use the index variables to create indicator variables in the new data file.jan w. . It records the products that a customer purchased.

restructured file. The wizard will create the new.181 File Handling and File Transformations Restructure Data Wizard: Finish This is the final step of the Restructure Data Wizard. Decide what to do with your specifications. Figure 8-33 Restructure Data Wizard: Finish n Restructure now. . The wizard will paste the syntax it generates into a syntax window. Choose this when you are not ready to replace the current file. Note: If original data are weighted. n Paste syntax. Choose this if you want to replace the current file immediately. when you want to modify the syntax. the new data will be weighted unless the variable that is used as the weight is restructured or dropped from the new file. or when you want to save it for future use.

.

Chapter 9 Working with Output When you run a procedure. you can easily navigate to whichever part of the output that you want to see. n Move items between the Viewer and other applications. arranged and formatted appropriately. You can also manipulate the output and create a document that contains precisely the output that you want. n Change the display order of results by moving selected items. Viewer Results are displayed in the Viewer. n Show or hide selected tables and charts. In this window. the results are displayed in a window called the Viewer. You can use the Viewer to: n Browse results. 183 .

n You can use the scroll bars to browse the results. n The right pane contains statistical tables. charts. or you can click an item in the outline to go directly to the corresponding table or chart. n You can click and drag the right border of the outline pane to change the width of the outline pane.184 Chapter 9 Figure 9-1 Viewer Double-click a book icon to show or hide an item Click to expand or collapse the outlIne view Outline pane Click an item to select it and go directly to it Contents pane Double-click a table to pivot or edit it The Viewer is divided into two panes: n The left pane of the Viewer contains an outline view of the contents. . and text output.

Showing and Hiding Results In the Viewer. click the Draft Viewer tab. or Click the item to select it. In any window.. you can use the Draft Viewer. you can selectively show and hide individual tables or results from an entire procedure. For more information. see “Draft Viewer Output” in the chapter Draft Viewer. click Draft Viewer for the output type. To change the format options for Draft Viewer output. This is useful when you want to shorten the amount of visible output in the contents pane.185 Working w ith Output Using the Draft Viewer If you prefer simple text output rather than interactive pivot tables. .. Type draft viewer. On the General tab. To use the Draft Viewer: In any window. from the menus choose: Help Topics Click the Index tab in the Help Topics window. and double-click the index entry. Hiding Tables and Charts Double-click its book icon in the outline pane of the Viewer. from the menus choose: Edit Options.

moving. Moving. Hiding Procedure Results Click the box to the left of the procedure name in the outline pane. (Shift-click to select multiple items. indicating that the item is now hidden. Deleting Output in the Viewer Click an item in the outline or contents pane to select it. This hides all of the results from the procedure and collapses the outline view. Release the mouse button on the item just above the location where you want to drop the moved items.) .186 Chapter 9 From the menus choose: View Hide or Click the closed book (Hide) icon on the Outlining toolbar. Moving Output in the Viewer Click an item in the outline or contents pane to select it. or deleting an item or a group of items. The open book (Show) icon becomes the active icon. or Ctrl-click to select noncontiguous items. or Ctrl-click to select noncontiguous items. You can also move items by using Cut and Paste After on the Edit menu. (Shift-click to select multiple items. Deleting.) Use the mouse to click and drag selected items (hold down the mouse button while dragging). and Copying Output You can rearrange the results by copying.

then click the Viewer tab) or the alignment of selected items at any time. Centered and right-aligned items are identified by a small symbol above and to the left of the item. Release the mouse button to drop the items where you want them.) Hold down the Ctrl key while you use the mouse to click and drag selected items (hold down the mouse button while dragging). Shift-click or Ctrl-click to select multiple items). all results are initially left-aligned. From the menus choose: Format Align Left Other alignment options include Center and Align Right. You can also copy items by using Copy and Paste After on the Edit menu or the context menu.187 Working w ith Output Press Delete. or Ctrl-click to select noncontiguous items. You can change the initial alignment (choose Options on the Edit menu. Changing Output Alignment Select the items that you want to align (click the items in the outline or contents pane. . Note: All results are displayed left-aligned in the Viewer. Only the alignment of printed results is affected by the alignment settings. Changing Alignment By default. (Shift-click to select multiple items. or From the menus choose: Edit Delete Copying Output in the Viewer Click items in the outline or contents pane to select them.

n Change the font used in the outline display. n Moving an item in the outline pane moves the corresponding item in the contents pane. n Change the outline level for selected items. .188 Chapter 9 Viewer Outline The outline pane provides a table of contents of the Viewer document. n Collapsing the outline view hides the results from all items in the collapsed levels. n Selecting an item in the outline pane selects and displays the corresponding item in the contents pane. To control the outline display. Most actions in the outline pane have a corresponding effect on the contents pane. n Change the size of items in the outline display. you can: n Expand and collapse the outline view. You can use the outline pane to navigate through your results and control the display. Figure 9-2 Collapsed outline view and hidden results Click here to expand or collapse the outline view Output from collapsed outline view hidden from contents pane Controlling the outline display.

189 Working w ith Output Collapsing and Expanding the Outline View Click the box to the left of the outline item that you want to collapse or expand. Click the left arrow on the Outlining toolbar to promote the item (move the item to the left). . Click the right arrow on the Outlining toolbar to demote the item (move the item to the right). Moving items can change the outline level of the selected items. or Click the item in the outline. From the menus choose: View Collapse or View Expand Changing the Outline Level Click the item in the outline pane to select it. or From the menus choose: Edit Outline Promote or Edit Outline Demote Changing the outline level is particularly useful after you move items in the outline level. and you can use the left and right arrow buttons on the Outlining toolbar to restore the original outline level.

. The icons and their associated text change size. Click the table. Adding a Title or Text Text items that are not connected to a table or chart can be added to the Viewer.. Select a font.190 Chapter 9 Changing the Size of Outline Items From the menus choose: View Outline Size Small Other options include Medium and Large. or other object that will precede the title or text. Enter the text that you want at this location. or material from other applications. From the menus choose: Insert New Title or Insert New Text Double-click the new object. charts. . Adding Items to the Viewer In the Viewer. Changing the Font in the Outline From the menus choose: View Outline Font. you can add items such as titles. new text. chart.

You can paste the pivot tables or charts in various formats.. or other object that will precede the text. chart. Adding a Text File In either the outline or the contents pane of the Viewer. chart. Pivot tables pasted as pictures retain all borders and font characteristics. click the table. The picture format can be resized in the other application. and charts as metafile pictures.. Select a chart file. You can paste pivot tables. . After you paste the table. it can be activated in place by double-clicking and then edited as if in the Viewer. you can embed pivot tables and interactive charts. From the menus choose: Insert Old Graph.. To edit the text.191 Working w ith Output Inserting a Chart Charts from older versions of SPSS can be inserted into the Viewer. or other object that will precede the chart. From the menus choose: Insert Text File. and sometimes a limited amount of editing can be done with the facilities of the other application. Picture (metafile). Select a text file. For applications that support ActiveX objects.. Using Output in Other Applications Pivot tables and charts can be copied and pasted into another Windows application. such as a word processing program or a spreadsheet. double-click it. including the following: Embedded object. text output. To insert a chart: Click the table.

where the application can accept or transmit only text. Text. For word processing applications. The contents of a table can be copied and pasted as text. this pastes the pivot table as a table that can then be edited in the other application. Paste will paste results as a picture (metafile). Charts can be pasted into other applications as bitmaps. Each application determines the “best” format to use for Paste. The contents of a table can be pasted into a spreadsheet and retain numeric precision. Paste. Paste will paste pivot tables in RTF format. Charts are pasted as metafiles. From the menus in the target application choose: Edit Paste or Edit Paste Special... Copying a Table or Chart Select the table or chart to be copied. From the menus choose: Edit Copy Copying and Pasting Results into Another Application Copy the results in the Viewer. Paste will paste pivot tables in BIFF format. In most applications. Output is copied to the clipboard in a number of formats. .192 Chapter 9 RTF (rich text format). Bitmap. In many applications. For spreadsheet applications. Pivot tables can be pasted into other applications in RTF format. This can be useful for applications such as e-mail. which pastes the pivot table as a table. BIFF.

If you have applications that support ActiveX objects: Run the file objs-on. The file objs-off. Paste Special allows you to select the format that you want from the list of formats available to the target application. copy the table. . (Double-click the file to run it. Embedding a Table in Another Application You can embed pivot tables and interactive charts in other applications in ActiveX format. See the application’s documentation for information on ActiveX support. Some applications that do not support ActiveX may initially accept ActiveX pivot tables but may then exhibit unstable behavior.) This turns on ActiveX embedding for pivot tables. To embed a pivot table or interactive chart in another application: In the Viewer.. From the list select SPSS Pivot Table Object or SPSS Graphics Control Object. An embedded object can be activated in place by double-clicking and can then be edited and pivoted as if in the Viewer. Results are copied to the clipboard in multiple formats.. Do not rely on embedded objects until you have tested the application’s stability with embedded ActiveX objects. From the menus in the target application choose: Edit Paste Special.bat turns ActiveX embedding off.193 Working w ith Output Paste Special.bat. located in the directory in which the program is installed. The target application must support ActiveX objects.

Other layers or hidden columns are not available. Only the layer and columns that were visible when the item was copied are pasted into the table. Pasting a Pivot Table as a Table (RTF) In the Viewer. From the menus in the target application choose: Edit Paste Special. . copy the table. Pasting a Pivot Table as Text In the Viewer... Other layers or hidden columns are not available.. The pivot table is pasted as a table. From the menus in the target application choose: Edit Paste Special. select Picture.. From the menus in the target application choose: Edit Paste Special. copy the pivot table. Only the layer and columns that were visible when the item was copied are available in the metafile.. From the list select Unformatted Text.. copy the table or chart.194 Chapter 9 Pasting a Pivot Table or Chart as a Picture (Metafile) In the Viewer. You can align columns by adjusting the tab stops in the other application. The item is pasted as a metafile. Unformatted pivot table text contains tabs between columns. You can copy and paste only one pivot table at a time in this format. From the list. From the list select Formatted Text (RTF) or Rich Text Format.

(Shift-click or Ctrl-click to select multiple items. between two Viewer windows). use Copy on the Edit menu. Paste Special Paste Special allows you to select the format of a copied object that is pasted into the Viewer. You can use either Paste After or Paste Special. For copying and pasting within Viewer documents (for example. Use Paste Special when you want to choose the format of the pasted object. from the menus choose: Edit Paste Note: Use Copy Objects only to copy multiple items from the Viewer to another application. Pasting Objects into the Viewer Objects from other applications can be pasted into the Viewer. The object will be inserted in the Viewer following the currently selected object. The possible file types for the object on the clipboard are listed.) From the menus choose: Edit Copy objects In the target application.195 Working w ith Output Copying and Pasting Multiple Items into Another Application Select the tables and/or charts to be copied. . Either type of pasting puts the new object after the currently selected object in the Viewer.

. and Excel format. or other object that will precede the object. From the menus choose: Edit Paste Special. text.. From the list. chart. and you should export charts in a suitable format for inclusion in HTML documents. . select the format for the object. In either the outline or the contents pane of the Viewer. n For HTML and text formats. Output Document. Word/RTF. charts are embedded by reference. Exports any combination of pivot tables. Export Output Export Output saves pivot tables and text output in HTML. charts are exported in the currently selected chart export format. and it saves charts in a variety of common formats used by other applications. For HTML document format. click the table. and charts. text output.196 Chapter 9 Figure 9-3 Paste Special dialog box Pasting Objects from Other Applications into the Viewer Copy the object in the other application.

All text output is exported in space-separated format. charts are exported in Windows metafile format and embedded in the Word document. with the entire contents of the line contained in a single cell. Output Document (No Charts). background colors. and cells are exported as Excel rows. Text output is exported as formatted RTF. and Excel. columns. indicating the filename of the exported chart. Text output in SPSS is always displayed in a fixed-pitch font and is exported with the same font attributes. Pivot table rows. a line is inserted in the text file for each chart. Available export formats include Windows metafile (WMF).doc). Exports pivot tables and text output. n For Word/RTF format. Word/RTF. all visible objects. encapsulated PostScript (EPS). Text output is exported as preformatted HTML. for HTML and text format. or only selected objects. font styles. etc. background colors. columns. and cells. JPEG. text. Text output is exported with all font attributes.txt). Charts Only. etc. Any charts in the Viewer are ignored. pivot tables and text are exported in the following manner: n HTML file (*. n Text file (*. Export What. and Macintosh PICT.197 Working w ith Output For text document format. Pivot tables are exported as Word tables with all formatting attributes—for example. . Windows bitmap (BMP). n Word/RTF file (*. charts are exported in the currently selected chart format in the Options dialog box for the selected format. Export Format. For output documents. with all formatting attributes—for example.xls). n Excel file (*. n Charts are not included in Excel documents. cell borders. You can export all objects in the Viewer. the available options are HTML. PNG. select a chart export format from the drop-down list. Pivot tables can be exported in tab-separated or space-separated format. Pivot tables are exported as HTML tables. For output documents. For Charts Only.htm). font styles. A fixed-pitch (monospaced) font is required for proper alignment of space-separated text output. TIFF. cell borders. Each line in the text output is a row in the Excel file.

. From the menus choose: File Export. Figure 9-4 Export Output dialog box .198 Chapter 9 Exporting Output Make the Viewer the active window (click anywhere in the window). Enter a filename (or prefix for charts) and select an export format..

Image Format. all charts are exported in Windows metafile (WMF) format. Controls the chart export format and optional settings. and Excel format and the chart export options for HTML documents.199 Working w ith Output Figure 9-5 Output exported in HTML format HTML. . For Word/RTF. Word/RTF. Word/RTF. charts are not included. and Excel Options This dialog box controls the inclusion of footnotes and captions for documents exported in HTML. For Excel. including chart size for HTML documents.

Text Options Text Options controls pivot table.. and Excel Export Options Make the Viewer the active window (click anywhere in the window). From the menus choose: File Export.. text output. Click Options. . All text output is exported in space-separated format. if a cell is not empty. If a cell is empty. Select HTML file or Word/RTF file or Excel file as the export format. For tabseparated format. and chart format options and the inclusion of footnotes and captions for documents exported in text format. a tab character is printed. its contents and a tab character are printed. Word/RTF. All space-separated output requires a fixed-pitch (monospaced) font for proper alignment.200 Chapter 9 Setting HTML. Figure 9-6 Text Options dialog box Pivot tables can be exported in tab-separated or space-separated format.

Select Text file as the export format.. including chart size. Figure 9-7 Export Chart Size dialog box . To limit the width of columns and wrap long labels. Setting Text Export Options Make the Viewer the active window (click anywhere in the window). This setting affects only pivot tables. specify a number of characters for the column width. From the menus choose: File Export. Controls the chart export format and optional settings. For space-separated pivot tables. you can specify the characters used to create cell borders. The custom percentage specification allows you to decrease or increase the size of the exported chart up to 200%. by default all line wrapping is removed and each column is set to the width of the longest label or value in the column. Click Options.. Chart Size Chart Size controls the size of exported charts. Image Format. Cell Separators.201 Working w ith Output Cell Formatting. For space-separated pivot tables.

the larger the exported file size. The higher the image quality.. Each pixel is saved as the inverse of the original color. The value can range from 0. initially displaying at low resolution and then increasing in quality as the image continues to load. and the U and V components correspond to the chrominance (color information). select the export format. Compression Quality Setting. while YUV 4:2:2 and YUV 4:1:1 represent the decreasing trade-off between file size (disk space) and quality of the colors represented. YUV 4:4:4 is lossless. n Gamma correction. Color Space determines the degree of “lossiness” for colors in the exported image. Reducing the U and V sampling rates reduces file size (and also quality). JPEG Chart Export Options Color Depth. Controls the ratio of compression to image quality. Color Space. The following operations are available: n Invert. For Charts Only. commonly used for digital video and MPEG transmission. Progressive encoding. Basically. The ratios represent the sampling rates for each component. Adjusts the intensity of colors in the exported chart by changing the gamma constant that is used to map the intensity values. Enables the image to load in stages. The YUV color model is one form of color encoding. and click Chart Size. JPEG charts can be exported as true color (24 bit) or 256 grayscale. . Color Space refers to the way that colors are encoded in the image. click Options. The acronym stands for Y-signal. Color Operations.5 (lightest).202 Chapter 9 Setting Size for Exported Charts Make the Viewer the active window (click anywhere in the window). select the export format. From the menus choose: File Export. For output documents.10 (darkest) to 6.. The Y component specifies grayscale or luminance. and click Chart Size. V-signal. U-Signal. it can be used to lighten and darken the bitmapped image.

Determines the number of colors in the exported chart. The value can range from 0.10 (darkest) to 6.203 Working w ith Output BMP and PICT Chart Export Options Color Depth. . For example.5 (lightest).) A lossless compression technique supported by common Windows file formats. A chart saved under any depth will have a minimum of the number of colors actually used and a maximum of the number of colors allowed by the depth. The following operations are available: n Invert. (BMP only. Adjusts the intensity of colors in the exported chart by changing the gamma constant that is used to map the intensity values. n Gamma correction. n If the number of colors in the chart exceeds the number of colors for that depth. the chart will remain as three colors. the chart will remain as three colors. and you save it as 16 colors. Use RLE compression. n Current screen depth is the number of colors currently displayed on your computer monitor. n Current screen depth is the number of colors currently displayed on your computer monitor. and black. Each pixel is saved as the inverse of the original color. A chart saved under any depth will have a minimum of the number of colors actually used and a maximum of the number of colors allowed by the depth. Color Operations. Determines the number of colors in the exported chart. and you save it as 16 colors. and black. Basically. PNG and TIFF Chart Export Options Color Depth. white. if the chart contains three colors—red. n If the number of colors in the chart exceeds the number of colors for that depth. if the chart contains three colors—red. white. it can be used to lighten and darken the bitmapped image. Lossless compression means that image quality has not been sacrificed at the cost of smaller files. the colors will be dithered to replicate the colors in the chart. the colors will be dithered to replicate the colors in the chart. For example.

The following operations are available: n Invert. EPS Chart Export Options Image Preview.and 32-bit true color is available with CMYK. scatterplots). it can be used to lighten and darken the bitmapped image. (TIFF only. The resulting PostScript font is called a Type 42 font. TrueType Fonts. Adjusts the intensity of colors in the exported chart by changing the gamma constant that is used to map the intensity values. creating a default transparent color of white. Many applications cannot display an EPS image on screen but can display the preview saved with the image. n Convert to PostScript fonts. Times New Roman is converted to Times. Format.5 (lightest). n Gamma Correction. A preview image is used mainly when an EPS file is placed within another document. The default value for each color is 255. For example. The preview image can be either WMF (smaller and more scalable) or TIFF (more portable and supported by other platforms). Allows the user to select how TrueType fonts are saved in the EPS image. Transparency. With the YCbCr option. Note: Not all PostScript printers have Level 3 drivers that can read Type 42 fonts. Allows you to select a color that will appear transparent in the exported chart. and Arial is converted to Helvetica.) Allows you to set the color space and compress the exported chart. Check the application in which you want to include the EPS graphic to see what preview format it supports. n Embed as native TrueType (Level 3). good for scaling at small sizes). Allows you to save a preview image within the EPS image. including font hints (for example. Note: This format is not recommended for interactive graphics that use the SPSS marker font (for example.10 (darkest) to 6. Enter integer values between 0 and 255 for each color. Converts TrueType fonts to PostScript (Type 1) fonts based on font family. All color depths are available with RGB color. Each pixel is saved as the inverse of the original color. . Available only with 32-bit true color export. only 24-bit true color is available. Embeds most of the font data into the EPS. The value can range from 0.204 Chapter 9 Color Operations. Only 24. Basically. because there are no meaningful PostScript equivalents for the SPSS TrueType marker symbols.

. Prints only items currently selected in the outline and/or contents panes. Standard Windows. The text itself is no longer editable as text in applications that can edit EPS graphics. Prints all output. Setting Chart Export Options Make the Viewer the active window (click anywhere in the window). Viewer Printing You can control the Viewer items that print in several ways: All visible output. From the menus choose: File Export. Provides a degree of device independence (same physical size when opened at 96 versus 120 dpi). click Options. Selection. such as the markers used in interactive scatterplots. Hidden items (items with a closed book icon in the outline pane or hidden in collapsed outline layers) are not printed. select the export format. All output. and click Options. and click Chart Options. Turns TrueType fonts into PostScript curve data. WMF Chart Export Options Aldus placeable. but this option is useful if you have a PostScript printer that doesn’t support Type 42 fonts and you need to preserve special TrueType symbols. . For Charts Only. Supported by most applications that can display Windows metafiles..205 Working w ith Output n Replace TrueType fonts with curves. There is also a loss of quality. Prints only items currently displayed in the contents pane. but not all applications support this format. including hidden items. select the export format. For output documents.

206 Chapter 9 Figure 9-8 Viewer Print dialog box Printing Output and Charts Make the Viewer the active window (click anywhere in the window). From the menus choose: File Print. Print Preview Print Preview shows you what will print on each page for Viewer documents.. It is usually a good idea to check Print Preview before actually printing a Viewer document because Print Preview shows you items that may not be visible simply by looking at the contents pane of the Viewer. Click OK to print. including: n Page breaks n Hidden layers of pivot tables .. Select the print settings that you want.

make sure nothing is selected in the Viewer. To view a preview for all output.207 Working w ith Output n Breaks in wide tables n Complete output from large tables n Headers and footers printed on each page Figure 9-9 Print Preview If any output is currently selected in the Viewer. the preview displays only the selected output. .

you can control: n Paper size and orientation n Page margins n Page headers and footers n Page numbering n Printed size for charts Figure 9-10 Page Setup dialog box . From the menus choose: File Print Preview Page Setup With Page Setup.208 Chapter 9 Viewing a Print Preview Make the Viewer the active window (click anywhere in the window).

These settings have no effect on printing data from the Data Editor or syntax from a syntax window...209 Working w ith Output Page Setup settings are saved with the Viewer document. Page Setup Options: Headers and Footers Headers and footers are the information that prints at the top and bottom of each page. Changing Page Setup Make the Viewer the active window (click anywhere in the window). You can enter any text that you want to use as headers and footers. You can also use the toolbar in the middle of the dialog box to insert: n Date and time n Page numbers n Viewer filename n Outline heading labels n Page titles and subtitles . Page Setup affects settings for printing Viewer documents only. From the menus choose: File Page Setup. Change the settings and click OK.

210 Chapter 9 Figure 9-11 Page Setup Options Header/Footer tab Outline heading labels indicate the first-. . Font characteristics for existing page titles and subtitles can be changed by editing the titles in the Viewer. Page titles and subtitles print the current page titles and subtitles. this setting is ignored. and/or fourth-level outline heading for the first item on each page. Page titles and subtitles are created with Insert New Page Title on the Viewer Insert menu or the TITLE and SUBTITLE commands in command syntax. Use Print Preview on the File menu to see how your headers and footers will look on the printed page. second-. third-. Note: Font characteristics for new page titles and subtitles are controlled on the Viewer tab of the Options dialog box (Edit menu). If you have not specified any page titles or subtitles.

Space between items. the chart size cannot increase further to fill additional page height. Numbers pages sequentially starting with the specified number. The overall printed size of a chart is limited by both its height and width. space between printed output items. Figure 9-12 Page Setup Options tab .211 Working w ith Output Page Setup Options: Options This dialog box controls printed chart size. chart. and page numbering. The chart’s aspect ratio (width-to-height ratio) is not affected by the printed chart size. This setting does not affect the display of items in the Viewer. Number pages starting with. and text object is a separate item. Controls the size of the printed chart relative to the defined page size. Each pivot table. Controls the space between printed items. Printed Chart Size. Once the outer borders of a chart reach the left and right borders of the page.

to redistribute the Smart Viewer.. Saving a Viewer Document From the Viewer window menus choose: File Save Enter the name of the document and click Save. . Leave this field blank unless you have a contractual agreement with SPSS Inc. the file cannot be viewed without entering the password. Enter a filename in the Save As dialog box. HTML or text). If you assign a password. Password. OEM Code.212 Chapter 9 Saving Output The contents of the Viewer can be saved to a Viewer document. Note: Leave the OEM Code blank unless you have a contractual agreement with SPSS Inc. The OEM license code is provided with the contract. to redistribute the SmartViewer. use Export on the File menu. Saving Viewer Files with a Password From the Viewer window menus choose: File Save with Password. Click Save. Enter the password. To save results in external formats (for example. Reenter the password to confirm it and click OK.) Save With Password Option Save With Password allows you to password-protect your Viewer files. (This is not available in the standalone SmartViewer. The password is case sensitive and can be up to 16 characters long. The saved document includes both panes of the Viewer window (the outline and the contents)..

including: n Simple text output (instead of pivot tables) n Charts as metafile pictures (instead of chart objects) Draft Viewer Output Text output in the Draft Viewer can be edited. and the interactive features of pivot tables and charts are not available. and both text output and charts can be pasted into other applications. charts can be resized. charts cannot be edited.Chapter 10 Draft Viewer The Draft Viewer provides results in draft form. However. 213 .

Click the General tab.. Note: New output is always displayed in the designated Viewer window. If you have both a Viewer and a Draft Viewer window open. the designated window is the one . Select Draft under Viewer Type at Startup. from the menus choose: Edit Options.214 Chapter 10 Figure 10-1 Draft Viewer window To Create Draft Output From the menus choose: File New Draft Output To make draft output the default output type..

Controlling Draft Output Format Output that would be displayed as pivot tables in the Viewer is converted to text output for the Draft Viewer. vertical line characters (|) are used as column separators and dashes (–) are used as row separators. You can control the format of new draft output using Draft Viewer Options (Edit menu. n Alignment is controlled by spaces (instead of tabs).215 Draft Viewer opened most recently or the one designated with the Designate Window tool (the exclamation point) on the toolbar. and labels are not wrapped to multiple lines. Figure 10-2 Draft Viewer Options . Options. n Box characters from the SPSS Marker Set font are used as row and column separators. The default settings for converted pivot table output include: n Each column is set to the width of the column label. n If box characters are turned off. Draft Viewer tab).

To reduce the width of tables that contain long labels.216 Chapter 10 Column width. Labels longer than the specified width are wrapped to fit the maximum width. select Maximum characters under Column width. Figure 10-3 Draft output before and after setting maximum column width .

You can specify different cell separators or enter blank spaces if you don’t want any characters used to mark rows and columns. As an alternative to box characters for row and column borders. You must deselect (uncheck) Display Box Character to specify cell separators.217 Draft Viewer Row and column separators. you can use the Cell Separators settings to control the row and column separators displayed in new draft output. Figure 10-4 Draft output before and after setting cell separators .

If you select Tabs for the column separator. If you want to paste draft output into another application. tab-separated columns. The Draft Viewer is designed to display space-separated output in a fixed-pitch (monospaced) font. you can use any font you want in the other application and set the tabs to align output properly. tab-separated output will not align properly in the Draft Viewer. Figure 10-5 Tab-separated output in the Draft Viewer and formatted in a word processor . However. you must use a fixed-pitch font to align spaceseparated columns properly.218 Chapter 10 Space-separated vs.

However. Select the font attributes that you want to apply to the selected text. Output already displayed in the Draft Viewer is not affected by changes in these settings. such as Courier. applied to only part of a table can affect column alignment. The line-drawing characters used to draw the borders are not supported by other fonts. . Click the Draft Viewer tab. From the Draft Viewer menus choose: Format Font. proper column alignment for space-separated text requires a fixed-pitch (monospaced) font.. size. bold. such as size and style (for example. style) of text output in the Draft Viewer. Draft Viewer output display options affect only new output produced after you change the settings. Click OK or Apply..219 Draft Viewer To Set Draft Viewer Options From the menus choose: Edit Options. The default solid-line row and column borders use the SPSS Marker Set font.. Row and column borders. other font changes. Additionally. italic).. To Change Fonts in Draft Viewer Select (highlight) the text to which you want to apply the font change. if you use box characters for row and column borders. Fonts in Draft Output You can modify the font attributes (font. Select the settings that you want.

It is usually a good idea to check Print Preview before actually printing a Viewer document because Print Preview shows you items that may not fit on the page. Page Setup). use page breaks (Insert menu. Fonts)... For long tables.. Page Break) to control where the table breaks between pages. from the menus choose: File Print. There are several things that you can do to prevent wide output from being truncated: n Use a smaller font size (Format menu. Draft Viewer Print Preview Print Preview shows you what will print on each page for draft documents. To print only a selected portion of the draft output. . n Select Landscape for the page orientation (File menu. including: n Long tables n Wide tables produced by converted pivot table output without column-width control n Text output created with the Wide page-width option (Draft Viewer Options) with the printer set to Portrait mode Output that is too wide for the page is truncated. Options. n For new output. not printed on another page. specify a narrow maximum column width (Edit menu. select (highlight) the output that you want to print. Select Selection. Draft Viewer tab). From the menus choose: File Print.220 Chapter 10 Printing Draft Output To print Draft Viewer output..

charts are not included. To Save Draft Output as Text To save draft output as text. from the menus choose: File Save Draft Viewer output is saved in rich text format (RTF).. from the Draft Viewer menus choose: File Export. You can export all text or just the selected (highlighted) text.221 Draft Viewer To View Draft Viewer Print Preview From the Draft Viewer menus choose: File Print Preview Saving Draft Viewer Output To save output from the Draft Viewer. .. Only text output (converted pivot table output and text output) is saved in the exported files.

.

you can rearrange the rows. Manipulating a Pivot Table Options for manipulating a pivot table include: n Transposing rows and columns n Moving rows and columns n Creating multidimensional layers n Grouping and ungrouping rows and columns n Showing and hiding cells n Rotating row and column labels n Finding definitions of terms To Edit a Pivot Table Double-click the table. and layers. columns.Chapter 11 Pivot Tables Many of the results in the Viewer are presented in tables that can be pivoted interactively. 223 . This activates the Pivot Table Editor. That is.

Before the move. after the move. Yes and No were row labels. they are column labels. To Pivot a Table Using Icons Activate the pivot table. From the context menu choose: SPSS Pivot Table Object Open Repeat for each pivot table you want to edit. For example. Each pivot table is ready to edit in its own separate window. From the Pivot Table menus choose: Pivot Pivoting Trays Hover over each icon with the mouse pointer for a ToolTip pop-up that tells you which table dimension the icon represents. suppose that the icon represents a variable with categories Yes and No and you drag the icon from the Row tray to the Column tray. Drag an icon from one tray to another.224 Chapter 11 To Edit Two or More Pivot Tables at a Time Click the right mouse button on the pivot table. . Figure 11-1 Pivoting trays This changes the arrangement of the table.

from the Pivot Table menus choose: Pivot Pivoting Trays Click and hold down the mouse button on an icon. Click the label for the row or column you want to move. . To Change the Display Order The order of pivot icons in a dimension tray reflects the display order of elements in the pivot table. Click and drag the label to the new position. To Transpose Rows and Columns From the Pivot Table menus choose: Pivot Transpose Rows and Columns This has the same effect as dragging all of the row icons into the Column tray and all of the column icons into the Row tray. To Move Rows or Columns in a Pivot Table Activate the pivot table. If pivoting trays are not already on. from the Pivot Table menus choose: Pivot Pivoting Trays Drag the icons in each tray to the order you want (left to right or top to bottom). To change the display order of elements in a dimension: Activate the pivot table.225 Pivot Tables To Identify Dimensions in a Pivot Table Activate the pivot table. If pivoting trays are not on. This highlights the dimension labels in the pivot table.

From the menus choose: Edit Group A group label is automatically inserted. To Group Rows or Columns and Insert Group Labels Activate the pivot table. To Ungroup Rows or Columns and Delete Group Labels Activate the pivot table. choose Insert Before or Swap. Note: Make sure that Drag to Copy on the Edit menu is not enabled (checked). Double-click the group label to edit the label text. then create a new group that includes the additional items.226 Chapter 11 From the context menu. Select the labels for the rows or columns you want to group together (click and drag or Shift-click to select multiple labels). you must first ungroup the items currently in the group. deselect it. . Figure 11-2 Row and column groups and labels Column Group Label Female Male Row Group Label Clerical Custodial Manager 206 10 157 27 74 Total 363 27 84 Note: To add rows or columns to an existing group. If Drag to Copy is enabled. Select the group label (click anywhere in the group label) for the rows or columns you want to ungroup. From the menus choose: Edit Ungroup Ungrouping automatically deletes the group label.

3 100.0 76.7 100. This resets only changes that are the result of pivoting row.0 Valid Percent 76.7 100. you can return to the original arrangement of the pivot table.7 17.6 5.6 5.7 17.7 17.6 82. From the menus choose: Format Rotate InnerColumn Labels or Rotate OuterRow Labels Figure 11-3 Rotated column labels Frequency 363 27 84 474 Percent 76.6 5. Cumulative Percent Percent Clerical Custodial Manager Total Cumulative Percent 76. and layer elements between dimensions.227 Pivot Tables To Rotate Row or Column Labels Activate the pivot table.6 82.0 76.7 100. It does not affect changes such as grouping or ungrouping or moving rows and columns.7 100.6 5. column.0 Only the innermost column labels and the outermost row labels can be rotated.7 17. To Reset Pivots to Defaults After performing one or more pivoting operations.0 Frequency Valid Percent Clerical Custodial Manager Total 363 27 84 474 76.3 100. From the Pivot menu choose Reset Pivots to Defaults.0 .

Click the right mouse button on a label cell. and from the Pivot menu choose Pivoting Trays if it is not already selected. From the context menu.228 Chapter 11 To Find the Definition of a Label in a Pivot Table You can obtain context-sensitive Help on cell labels in pivot tables. such as variable names or value labels. with only the top layer visible. For example. . if Mean appears as a label. Drag an icon from the Row tray or the Column tray into the Layer tray. you can obtain a definition of the mean. The table can be thought of as stacked in layers. choose What’s This?. You must click your right mouse button on the label cell itself rather than on the data cells in the row or column. To Create and Display Layers Activate the pivot table. Working with Layers You can display a separate two-dimensional table for each category or combination of categories. Context-sensitive Help is not available for user-defined labels.

Figure 11-5 Categories in separate layers Minority classification: Yes Minority classification: No To Change Layers Click one of the layer icon arrows.229 Pivot Tables Figure 11-4 Moving categories into layers Minority pivoted Minority pivotedfrom row from to rowlayer dimension to layer dimension Each layer icon has left and right arrows. The visible table is the table for the top layer. or Select a category from the drop-down list of layers. .

230 Chapter 11 Figure 11-6 Selecting layers from drop-down lists Go to Layer Category Go to Layer Category allows you to change layers in a pivot table. To Go to a Layer of a Table From the Pivot Table menus choose: Pivot Go to Layer. Figure 11-7 Go to Layer Category dialog box .. This dialog box is particularly useful when there are a large number of layers or one layer has many categories..

and layer dimensions n Display order of elements in each dimension n Currently displayed layer for each layer element To Bookmark a Pivot Table View Activate the pivot table. you can display all of the layers at once. Bookmarks Bookmarks allow you to save different views of a pivot table. To view another layer without closing the dialog box: Select the category and click Apply. and Column pivoting trays. This changes the layer and closes the dialog box. Bookmarks save: n Placement of elements in row. or From the Pivot menu choose Move Layers to Columns. Pivot the table to the view you want to bookmark.231 Pivot Tables Select a layer dimension in the Visible Category list. column. There must be at least one icon in the Layer tray. From the Pivot menu choose Move Layers to Rows. You can also move layers to rows or columns by dragging their icons between the Layer. either down the rows or across the columns. To Move Layers to Rows or Columns If the table you are viewing is stacked in layers with only the top layer showing. The Categories list will display all categories for the selected dimension. . Row. Select the category you want in the Categories list and click OK.

Within a pivot table. Click Rename. . Enter the new bookmark name. To Display a Bookmarked Pivot Table View Activate the pivot table. From the menus choose: Pivot Bookmarks… Click the name of the bookmark in the list. Click OK. Click Add. Click Go To. From the menus choose: Pivot Bookmarks… Click the name of the bookmark in the list. but you can use duplicate bookmark names in different pivot tables.232 Chapter 11 From the menus choose: Pivot Bookmarks… Enter a name for the bookmark. Bookmark names are not case sensitive. To Rename a Pivot Table Bookmark Activate the pivot table. Each pivot table has its own set of bookmarks. each bookmark name must be unique.

titles. From the Pivot Table menus choose: View Hide or Right-click the highlighted row or column to show the context menu. (If Hide empty rows and columns is selected in Table Properties for this table. if the Female category of the Gender dimension is hidden. For example. From the Pivot Table menus choose: View Show All Categories in dimension name For example. a completely empty row or column remains hidden. and captions To Hide Rows or Columns in a Table Ctrl-Alt-click the category label of the row or column to be hidden. click the Male category. From the context menu choose Hide Category. To Show Hidden Rows or Columns in a Table Select another label in the same dimension as the hidden row or column. or From the Pivot Table menus choose: View Show All This displays all hidden cells in the table.) . choose Show All Categories in Gender.233 Pivot Tables Showing and Hiding Cells Many types of cells can be hidden: n Dimension labels n Categories. including the label cell and data cells in a row or column n Category labels (without hiding the data cells) n Footnotes.

. n Change the properties of cells in the table. Select the dimension label or any category label within the dimension. n Copy and paste results into other applications. From the menus choose: View Hide (or Show) To Hide or Show a Caption or Title in a Table Select a caption or title. n Change the properties of the current table. n Modify text.234 Chapter 11 To Hide or Show a Dimension Label in a Table Activate the pivot table. From the menus choose: View Hide (or Show) Editing Results The appearance and contents of each table or text output item can be edited. n Add items to the Viewer. You can: n Apply a TableLook. n Add footnotes and captions to tables. From the menus choose: View Hide (or Show) Dimension Label To Hide or Show a Footnote in a Table Select a footnote.

.235 Pivot Tables Changing the Appearance of Tables You can change the appearance of a table either by editing table properties or by applying a TableLook. This resets any cells that have been edited. you might start by applying TableLook 9POINT. and borders. cell properties. footnote properties. TableLooks A TableLook is a set of properties that define the appearance of a table. Optionally. You can select a previously defined TableLook or create your own. any edited cells are reset to the current table properties. You can select one of the preset TableLooks or you can create and save a custom TableLook. If As Displayed is selected in the TableLook files list. The edited cell formats will remain. you change the TableLook to BOXED. then select a data column. including general appearance. To Apply a TableLook Activate a pivot table. you can change cell formats for individual cells or groups of cells. and from the Cell Formats dialog box. Before or after a TableLook is applied. you can reset all cells to the cell formats defined by the current TableLook. Each TableLook consists of a collection of table properties. From the menus choose: Format TableLooks. using cell properties.. For example. even when you apply a new TableLook. Later. . change to a bold font for that column. The previously selected column retains the bold font while the rest of the characteristics are applied from the BOXED TableLook.

To Edit or Create a TableLook Select a TableLook from the list of files. Click Edit Look. Adjust the table properties for the attributes you want and click OK. An edited TableLook is not applied to any other tables that use that TableLook unless you select those tables and reapply the TableLook.236 Chapter 11 Figure 11-8 TableLooks dialog box Select a TableLook from the list of files. click Browse. . Click Save Look to save the edited TableLook or Save As to save it as a new TableLook. To select a file from another directory. Editing a TableLook affects only the selected pivot table. Click OK to apply the TableLook to the selected pivot table.

Borders. To Change Pivot Table Properties Activate the pivot table (double-click anywhere in the table).. such as hiding empty rows or columns and adjusting printing properties. n Control the format and position of footnote markers. To apply new table properties to a TableLook instead of just the selected table. edit the TableLook (Format menu. n Determine specific formats for cells in the data area. Select the options you want. or Printing). Click OK or Apply. TableLooks). for row and column labels.. . n Control printing properties. you can: n Control general properties. and save a set of those properties as a TableLook.237 Pivot Tables Table Properties The Table Properties dialog box allows you to set general properties of a table. Footnotes. n Control the width and color of the lines forming the borders of each area of the table. Select a tab (General. From the Pivot Table menus choose: Format Table Properties. set cell styles for various parts of a table. Using the tabs on this dialog box. Cell Formats. and for other areas of the table. The new properties are applied to the selected pivot table.

You can: n Show or hide empty rows and columns. Figure 11-9 Table Properties General tab To Change General Table Properties Select the General tab. (An empty row or column has nothing in any of the data cells. Select the options you want. They can be in the upper left corner or nested.) n Control the placement of row labels. . n Control maximum and minimum column width (expressed in points).238 Chapter 11 Table Properties: General Several properties apply to the table as a whole. Click OK or Apply.

.. c. Figure 11-10 Table Properties Footnotes tab To Change Footnote Marker Properties Select the Footnotes tab. Select a footnote marker format. Click OK or Apply. n The style of footnote markers is either numbers (1. 3. b. n The footnote markers can be attached to text as superscripts or subscripts..239 Pivot Tables Table Properties: Footnotes The properties of footnote markers include style and position in relation to text.). Select a marker position. .. 2.) or letters (a.

and the column labels will not retain the bold characteristic for other items moved into the column dimension. Row Labels. you can modify the associated cell formats. size. They are not characteristics of individual cells. color. Data. and Footnotes. For each area of a table. a table is divided into areas: Title. it does not retain the bold characteristic of the column labels. Cell formats include: text characteristics (font. and inner cell margins. the column labels will appear bold no matter what information is currently displayed in the column dimension—and if you move an item from the column dimension to another dimension. Column Labels. . For example: n If you specify a bold font as a cell format of column labels. Layers. Caption. cell shading. Corner Labels. style). horizontal and vertical alignment. foreground and background colors. n If you make column labels bold simply by highlighting the cells in an activated pivot table and clicking the Bold button on the toolbar. Figure 11-11 Areas of a table Cell formats are applied to areas (categories of information). This distinction is an important consideration when pivoting a table.240 Chapter 11 Table Properties: Cell Formats For formatting. the contents of those cells will remain bold no matter what dimension you move them to.

241 Pivot Tables

Figure 11-12 Table Properties Cell Formats tab

**To Change Cell Formats
**

Select the Cell Formats tab. Select an area from the drop-down list or click an area of the sample. Select characteristics for the area. Your selections are reflected in the sample. Click OK or Apply.

242 Chapter 11

**Table Properties: Borders
**

For each border location in a table, you can select a line style and a color. If you select None as the style, there will be no line at the selected location.

Figure 11-13 Table Properties Borders tab

**To Change Borders in Tables
**

Click the Borders tab. Select a border location, either by clicking its name in the list or by clicking a line in

**the Sample area. (Shift-click to select multiple names, or Ctrl-click to select noncontiguous names.)
**

Select a line style or None. Select a color. Click OK or Apply.

243 Pivot Tables

**To Display Hidden Borders in a Pivot Table
**

For tables without many visible borders, you can display the hidden borders. This can make tasks like changing column widths easier. The hidden borders (gridlines) are displayed in the Viewer but are not printed.

Activate the pivot table (double-click anywhere in the table). From the menus choose: View Gridlines

**Table Properties: Printing
**

You can control the following properties for printed pivot tables:

n Print all layers or only the top layer of the table, and print each layer on a separate

**page. (This affects only printing, not the display of layers in the Viewer.)
**

n Shrink a table horizontally or vertically to fit the page for printing. n Control widow/orphan lines—the minimum number of rows and columns that will

be contained in any printed section of a table if the table is too wide and/or too long for the defined page size. (Note: If a table is too long to fit on the remainder of the current page because there is other output above it on the page but fits within the defined page length, it is automatically printed on a new page, regardless of the widow/orphan setting.)

n Include continuation text for tables that don’t fit on a single page. You can display

continuation text at the bottom of each page and at the top of each page. If neither option is selected, the continuation text will not be displayed.

**To Control Pivot Table Printing
**

Click the Printing tab. Select the printing options you want. Click OK or Apply.

244 Chapter 11

Font

A TableLook allows you to specify font characteristics for different areas of the table. You can also change the font for any individual cell. Options for the font in a cell include the font type, style, and size. You can also hide the text or underline it. If you specify font properties in a cell, they apply in all of the table layers that have the same cell.

Figure 11-14 Font dialog box

**To Change the Font in a Cell
**

Activate the pivot table and select the text you want to change. From the Pivot Table menus choose: Format Font...

Optionally, you can select a font, font style, and point size; whether you want the text hidden or underlined; a color; and a script style.

245 Pivot Tables

**Set Data Cell Widths
**

Set Data Cell Widths is used to set all data cells to the same width.

Figure 11-15 Set Data Cell Width dialog box

**To Change Data Cell Widths
**

Activate the pivot table. From the menus choose: Format Set Data Cell Widths... Enter a value for the cell width.

**To Change the Width of a Pivot Table Column
**

Activate the pivot table (double-click anywhere in the table). Move the mouse pointer through the category labels until it is on the right border of the

**column you want to change. The pointer changes to an arrow with points on both ends.
**

Hold down the mouse button while you drag the border to its new position. Figure 11-16 Changing the width of a column

246 Chapter 11

You can change vertical category and dimension borders in the row labels area, whether or not they are showing.

Move the mouse pointer through the row labels until you see the double-pointed arrow. Drag it to the new width.

Cell Properties

Cell Properties are applied to a selected cell. You can change the value format, alignment, margins, and shading. Cell properties override table properties; therefore, if you change table properties, you do not change any individually applied cell properties.

**To Change Cell Properties
**

Activate a table and select a cell in the table. From the menus choose: Format Cell Properties...

**Cell Properties: Value
**

This dialog box tab controls the value format for a cell. You can select formats for number, date, time, or currency, and you can adjust the number of decimal digits displayed.

247 Pivot Tables

Figure 11-17 Cell Properties Value tab

**To Change Value Formats in a Cell
**

Click the Value tab. Select a category and a format. Select the number of decimal places.

**To Change Value Formats for a Column
**

Ctrl-Alt-click the column label. Right-click the highlighted column. From the context menu choose Cell Properties. Click the Value tab. Select the format you want to apply to the column.

248 Chapter 11

You can use this method to suppress or add percent signs and dollar signs, change the number of decimals displayed, and switch between scientific notation and regular numeric display.

**Cell Properties: Alignment
**

This dialog box tab sets horizontal and vertical alignment and text direction for a cell. If you choose Mixed, contents of the cell are aligned according to its type (number, date, or text).

Figure 11-18 Cell Properties Alignment tab

**To Change Alignment in Cells
**

Select a cell in the table. From the Pivot Table menus choose: Format Cell Properties... Click the Alignment tab.

As you select the alignment properties for the cell, they are illustrated in the Sample area.

249 Pivot Tables

**Cell Properties: Margins
**

This dialog box tab specifies the inset at each edge of a cell.

Figure 11-19 Cell Properties Margins tab

**To Change Margins in Cells
**

Click the Margins tab. Select the inset for each of the four margins.

**Cell Properties: Shading
**

This dialog box tab specifies the percentage of shading or a cell outline, and foreground and background colors for a selected cell area. This does not change the color of the text. The cell outline is a selection on the Visual Highlights list.

250 Chapter 11

Figure 11-20 Cell Properties Shading tab

**To Change Shading in Cells
**

Click the Shading tab. Select the highlights and colors for the cell.

Footnote Marker

Footnote Marker changes the character(s) used to mark a footnote.

Figure 11-21 Footnote Marker dialog box

251 Pivot Tables

**To Change Footnote Marker Characters
**

Select a footnote. From the Pivot Table menus choose: Format Footnote Marker... Enter one or two characters.

**To Renumber Footnotes
**

When you have pivoted a table by switching rows, columns, and layers, the footnotes may be out of order. To renumber the footnotes:

Activate the pivot table. From the menus choose: Format Renumber Footnotes

**Selecting Rows and Columns in Pivot Tables
**

The flexibility of pivot tables places some constraints on how you select entire rows and columns, and the visual highlight that indicates the selected row or column may span noncontiguous areas of the table.

**To Select a Row or Column in a Pivot Table
**

Activate the pivot table (double-click anywhere in the table). Click a row or column label.

252 Chapter 11

From the menus choose: Edit Select Data and Label Cells

or

Ctrl-Alt-click the row or column label.

If the table contains more than one dimension in the row or column area, the highlighted selection may span multiple noncontiguous cells.

**Modifying Pivot Table Results
**

Text appears in the Viewer in many items. You can edit the text or add new text. Pivot tables can be modified by:

n Editing text within pivot table cells n Adding captions and footnotes

**To Modify Text in a Table Cell
**

Activate the pivot table. Double-click the cell or press F2. Edit the text. Press Enter to record your changes, or press Esc to revert to the previous contents of

the cell.

**To Add Captions to a Table
**

From the Pivot Table menus choose: Insert Caption

**The words Table Caption are displayed at the bottom of the table.
**

Select the words Table Caption and enter your caption text over it.

From the Pivot Table menus choose: Insert Footnote. you can automatically resize the table to fit the page or control the location of table breaks and page breaks.. Click a title. select Print all layers. To Print Hidden Layers of a Pivot Table Activate the pivot table (double-click anywhere in the table).253 Pivot Tables To Add a Footnote to a Table A footnote can be attached to any item in a table. and these factors can be controlled by changing pivot table attributes. cell. From the menus choose: Format Table Properties. or caption within an activated pivot table.. Select the word Footnote and enter the footnote text over it. You can also print each layer of a pivot table on a separate page. you can either print all layers or print only the top (visible) layer. .. n For long or wide pivot tables. n For multidimensional pivot tables (tables with layers).. Printing Pivot Tables Several factors can affect the way printed pivot charts look. On the Printing tab. Use Print Preview on the File menu to see how printed pivot tables will look.

Select the labels of the rows or columns you want to keep together. (For wide tables. From the menus choose: Format Insert Break Here To Specify Rows or Columns to Keep Together Activate the pivot table.254 Chapter 11 Controlling Table Breaks for Wide and Long Tables Pivot tables that are either too wide or too long to print within the defined page size are automatically split and printed in multiple sections. n Specify rows and columns that should be kept together when tables are split. (Click and drag or Shift-click to select multiple row or column labels. Click the column label to the left of where you want to insert the break or click the row label above where you want to insert the break. To Specify Row and Column Breaks for Pivot Tables Activate the pivot table. multiple sections will print on the same page if there is room.) You can: n Control the row and column locations where large tables are split. n Rescale large tables to fit the defined page size.) From the menus choose: Format Insert Keep Together .

Click Rescale wide table to fit page. From the menus choose: Format Table Properties Click the Printing tab. . and/or Click Rescale long table to fit page.255 Pivot Tables To Rescale a Table to Fit the Page Size Activate the pivot table.

.

). However. n Most subcommands are separated by slashes (/). some commands and options are available only by using the command language. it is easier if you let the software help you build your syntax file using one of the following methods: n Pasting command syntax from dialog boxes n Copying syntax from the output log n Copying syntax from the journal file In the online Help for a given procedure. While it is possible to open a syntax window and type in commands. click the Syntax pushbutton to find out what (if any) command language options are available for that procedure and to access the syntax diagram for the relevant command. 257 . The slash before the first subcommand on a command is usually optional. refer to the SPSS Syntax Reference Guide. Command Syntax Rules Keep in mind the following simple rules when editing and writing command syntax: n Each command must begin on a new line and end with a period (. A syntax file is simply a text file that contains commands. The command language also allows you to save your jobs in a syntax file so that you can repeat your analysis at a later date or run it in an automated job with the Production Facility. For complete documentation of the command language.Chapter 12 Working with Command Syntax Most commands are accessible from the menus and dialog boxes.

or between variable names. and three-letter abbreviations can be used for many command specifications. You can use as many lines as you want to specify a single command. n Continuation lines must be indented at least one space. are both acceptable alternatives that generate the same results. arithmetic operators. regardless of your Windows regional settings. .) must be used to indicate decimals. parentheses. For example. the syntax rules are slightly different: n Each command must begin in the first column of a new line. You can add space or break lines at almost any point where a single blank is allowed.258 Chapter 12 n Variable names must be spelled out fully. the format of the commands is suitable for any mode of operation. n Each line of command syntax cannot exceed 80 characters. Production Facility syntax files and INCLUDE files. If you generate command syntax by pasting dialog box choices into a syntax window. Command syntax is case insensitive. FREQUENCIES VARIABLES=JOBCAT GENDER /PERCENTILES=25 50 75 /BARCHART. For command files run via the Production Facility or the INCLUDE command. n The period at the end of the command is optional. You cannot create such variable names in the dialog boxes. n A period (. and you should generally avoid them. such as around slashes. and freq var=jobcat gender /percent=25 50 75 /bar. n Text included within apostrophes or quotation marks must be contained on a single line. n Variable names ending in a period can cause errors in commands created by the dialog boxes.

edit it. Click Paste. you can run the pasted syntax. and save it in a syntax file. a new syntax window opens automatically. If you do not have an open syntax window. code for running syntax from a script is pasted into the script window. In the syntax window. To Paste Command Syntax from a Dialog Box Open the dialog box and make the selections that you want. you can build a job file allowing you to repeat the analysis at a later date or run an automated job with the Production Facility. and the syntax is pasted there. By pasting the syntax at each step of a lengthy analysis.259 Working with Command Syntax Creating Command Syntax from Dialog Boxes The easiest way to build a command syntax file is to make selections in dialog boxes and paste the syntax for the selections into a syntax window. . Figure 12-1 Command syntax pasted from a dialog box Note: If you open a dialog box from the menus in a script window. The command syntax is pasted to the designated syntax window.

you can run the pasted syntax. Figure 12-2 Command syntax in the log To Copy Syntax from the Output Log Before running the analysis. In the syntax window. Each command will then appear in the Viewer along with the output from the analysis. from the menus choose: Edit Options… . and save it in a syntax file. you must select Display commands in the log in the Viewer dialog box before running the analysis.260 Chapter 12 Using Syntax from the Output Log You can build a syntax file by copying command syntax from the log that appears in the Viewer. edit it. To use this method.

attempting to use the same filename for a syntax file and the journal file may yield unexpected results. Note. From the Viewer menus choose: Edit Copy In a syntax window. from the menus choose: Edit Paste Using Syntax from the Journal File By default. that errors must be resolved or the job will not run successfully. from the menus choose: File New Syntax In the Viewer. select Display commands in the log. . Open a previously saved syntax file or create a new one. As you run analyses.261 Working with Command Syntax On the Viewer tab. Because error messages and warnings are also recorded in the journal file along with command syntax. Save the edited journal file with a different filename. You can edit the journal file and save it as a syntax file that you can use to repeat a previously run analysis. the commands for your dialog box selections are recorded in the log. or you can run it in an automated job with the Production Facility. double-click on a log item to activate it.jnl (set with Options on the Edit menu). all commands executed during a session are recorded in a journal file named spss. Click and drag the mouse to highlight the syntax that you want to copy. you must edit out any error and warning messages that appear before saving the syntax file. however. The journal file is a text file that can be edited like any other text file. Because the journal file is automatically appended or overwritten for each session. To create a new syntax file.

If you have difficulty locating the file.) . Select All files (*. spss. from the menus choose: File Open Other… Locate and open the journal file (by default.sps. Save the edited journal file using a different filename.262 Chapter 12 Figure 12-3 Editing the journal file Delete warnings and error messages before saving and running syntax from the journal file To Edit the Journal File To open the journal file.*) for Files of Type or enter *. Edit the file to remove any error messages or warnings.jnl is located in the temp directory).jnl in the File Name text box to display journal files in the file list. indicated by the > sign. (We recommend that you use a filename with the extension . the default extension for syntax files. use Options on the Edit menu to see where the journal is saved in your system.

or Select one of the choices from the Run menu. Runs all commands from the current cursor location to the end of the command syntax file. The Run button on the Syntax Editor toolbar runs the selected commands or the command where the cursor is located if there is no selection. This includes any commands partially highlighted. Runs the command where the cursor is currently located. Runs all commands in the syntax window. no EXECUTE commands are necessary. When you run multiple commands from a syntax window. n If the last command in the syntax file is a command that reads the data file (such as a statistical or graphing procedure). n If you are unsure if the last command reads the data file. n Selection.263 Working with Command Syntax To Run Command Syntax Highlight the commands that you want to run in the syntax window. Click the Run button (the right-pointing triangle) on the syntax window toolbar. and they can be deleted. Runs the currently selected commands. multiple EXECUTE commands are unnecessary and may slow performance because this command reads the entire data file. n All. n To End. Figure 12-4 Syntax Editor toolbar Execute Command Syntax pasted from dialog boxes or copied from the log or the journal may contain EXECUTE commands. n Current. . you can delete all but the last EXECUTE command in the syntax file.

.

you can arrange the distinct values in ascending or descending order or order the categories by their frequencies. sum. bar charts. quantitative data. you might learn that the average product sale is $3. standard deviation. pie charts.078. are appropriate for quantitative variables that may or may not meet the assumption of normality. skewness and kurtosis (both with standard errors). What is the distribution of a company’s customers by industry type? From the output. Data. 265 . standard error of the mean. For continuous. Statistics and plots. quartiles. especially for variables with ordered or unordered categories. median. Use numeric codes or short strings to code categorical variables (nominal or ordinal level measurements). Robust statistics.4% in the healthcare industry. For a frequency report and bar chart. Frequency counts. mode.576 with a standard deviation of $1. mean. such as sales revenue. quartiles. 24. The tabulations and percentages provide a useful description for data from any distribution. For a first look at your data. and histograms. Example. variance. 28. percentages. you might learn that 37. range. You can label charts with frequencies (the default) or percentages. minimum and maximum values.5% of your customers are in government agencies.Chapter 13 Frequencies The Frequencies procedure provides statistics and graphical displays that are useful for describing many types of variables. and 9.9% in corporations. The frequencies report can be suppressed when a variable has many distinct values.1% in academic institutions. such as the mean and standard deviation. user-specified percentiles. are based on normal theory and are appropriate for quantitative variables with symmetric distributions. the Frequencies procedure is a good place to start. and percentiles. Assumptions. such as the median. cumulative percentages. Most of the optional summary statistics.

000 Amount of Product Sale .000 5.000 3.266 Chapter 13 Sample Output Figure 13-1 Frequencies output 400 300 300 200 200 100 100 0 Government Corporate Industry Academic Healthcare 0 1.000 2.000 4.

you can: n Click Statistics for descriptive statistics for quantitative variables. pie charts. Optionally.. n Click Format for the order in which results are displayed. n Click Charts for bar charts. and histograms.267 Frequencies To Obtain Frequencies and Statistics From the menus choose: Analyze Descriptive Statistics Frequencies. Figure 13-2 Frequencies dialog box Select one or more categorical or quantitative variables. ..

ages of all people in their thirties are coded as 35). median. Skewness and kurtosis are statistics that describe the shape and symmetry of the distribution. Central Tendency. the 95th percentile. . the value below which 95% of the observations fall).268 Chapter 13 Frequencies Statistics Figure 13-3 Frequencies Statistics dialog box Percentile Values. Quartiles (the 25th. variance. Dispersion. Statistics that measure the amount of variation or spread in the data include the standard deviation. If the values in your data are midpoints of groups (for example. Statistics that describe the location of the distribution include the mean. range. These statistics are displayed with their standard errors. select this option to estimate the median and percentiles for the original. ungrouped data. You can also specify individual percentiles (for example. minimum. and 75th percentiles) divide the observations into four groups of equal size. If you want an equal number of groups other than four. mode. and sum of all the values. select Cut points for n equal groups. Distribution. Values are group midpoints. and standard error of the mean. 50th. maximum. Values of a quantitative variable that divide the ordered data into groups so that a certain percentage is above and another percentage is below.

The height of each bar is the count of values of a quantitative variable falling within the interval. A histogram shows the shape. A pie chart displays the contribution of parts to a whole. Each slice of a pie chart corresponds to a group defined by a single grouping variable.269 Frequencies Frequencies Charts Figure 13-4 Frequencies Charts dialog box Chart Type. but they are plotted along an equal interval scale. A bar chart displays the count for each distinct value or category as a separate bar. Chart Values. For bar charts. A normal curve superimposed on a histogram helps you judge whether the data are normally distributed. and spread of the distribution. A histogram also has bars. . center. the scale axis can be labeled by frequency counts or percentages. allowing you to compare categories visually.

and in either ascending or descending order. If you produce statistics tables for multiple variables. However. you can either display all variables in a single table (Compare variables) or display a separate statistics table for each variable (Organize output by variables).270 Chapter 13 Frequencies Format Figure 13-5 Frequencies Format dialog box Order by. This option prevents the display of tables with more than the specified number of values. The frequency table can be arranged according to the actual values in the data or according to the count (frequency of occurrence) of those values. Frequencies assumes that the variable is quantitative and displays its values in ascending order. Suppress tables with more than n categories. . Multiple Variables. if you request a histogram or percentiles.

sum. range. one for Kim. etc. and analyses. If each case in your data contains the daily sales totals for each member of the sales staff (for example. data listings.) collected each day for several months. the Descriptives procedure can compute the average daily sales for each staff member and order the results from highest average sales to lowest. mean. one for Brian. Most of the available statistics (including z scores) are based on normal theory and are appropriate for quantitative variables (interval. When variables are recorded in different units (for example. and kurtosis and skewness with their standard errors. Assumptions. variance.Chapter 14 Descriptives The Descriptives procedure displays univariate summary statistics for several variables in a single table and calculates standardized values (z scores). standard deviation. 271 . calculating z scores is not a remedy for problem data. Sample size. Example. Variables can be ordered by the size of their means (in ascending or descending order). The Descriptives procedure is very efficient for large files (thousands of cases). and distributional anomalies. standard error of the mean. Data. they are added to the data in the Data Editor and are available for charts. The distribution of z scores has the same shape as that of the original data. maximum. alphabetically. therefore. When z scores are saved. gross domestic product per capita and percentage literate). Statistics. or by the order in which you select the variables (the default). minimum. Use numeric variables after you have screened them graphically for recording errors. a z-score transformation places variables on a common scale for easier visual comparison. outliers.or ratio-level measurements) with symmetric distributions (avoid variables with unordered categories or skewed distributions). one entry for Bob.

00 Maximum 86.2000 56.4617 21..5000 Std.1305 To Obtain Descriptive Statistics From the menus choose: Analyze Descriptive Statistics Descriptives. Optionally.00 85.00 85.00 83.9000 52.00 25.1000 50.00 73.9000 52.272 Chapter 14 Sample Output Figure 14-1 Descriptives output Descriptive Statistics N Dave’s Sales Sharon’s Sales Brian’s Sales Mary’s Sales Bob’s Sales Kim’s Sales Juan’s Sales Valid N (listwise) 10 10 10 10 10 10 10 10 Minimum 42.2000 56. n Click Options for optional statistics and display order.00 34.00 89. Deviation 14.8858 16.0000 52.00 28.00 45.00 71. you can: n Click Save standardized values as variables to save z scores as new variables.2657 17.00 23.00 23. Figure 14-2 Descriptives dialog box Select one or more variables..00 Mean 59.6029 21.6623 8. .8819 16.

maximum. you can display variables alphabetically. Display Order. by ascending means. Kurtosis and skewness are statistics that characterize the shape and symmetry of the distribution. and standard error of the mean. Distribution. These are displayed with their standard errors. minimum.273 Descriptives Descriptives Options Figure 14-3 Descriptives Options dialog box Mean and Sum. or arithmetic average. Optionally. The mean. the variables are displayed in the order in which you selected them. is displayed by default. Statistics that measure the spread or variation in the data include the standard deviation. variance. By default. . range. or by descending means. Dispersion.

.

the five largest and five smallest values. Look at the distribution of maze-learning times for rats under four different reinforcement schedules. The exploration may indicate that you need to transform the data if the technique requires a normal distribution. the Kolmogorov-Smirnov statistic with a Lilliefors significance level for testing normality. 275 . minimum. either for all of your cases or separately for groups of cases. standard deviation. stem-and-leaf plots. Tukey’s biweight estimator. and the Shapiro-Wilk statistic. Exploring the data can help to determine whether the statistical techniques that you are considering for data analysis are appropriate. median. outlier identification. maximum. Mean. Data screening may show that you have unusual values. For each of the four groups. The boxplots and stem-and-leaf plots graphically summarize the distribution of learning times for each of the groups.Chapter 15 Explore The Explore procedure produces summary statistics and graphical displays. variance. histograms. percentiles. and spread-versus-level plots with Levene tests and transformations. There are many reasons for using the Explore procedure—data screening. confidence interval for the mean (and specified confidence level). Boxplots. and characterizing differences among subpopulations (groups of cases). skewness and kurtosis and their standard errors. 5% trimmed mean. you may decide that you need nonparametric tests. Huber’s M-estimator. Andrews’ wave estimator. range. Or. you can see if the distribution of times is approximately normal and whether the four variances are equal. gaps in the data. extreme values. Hampel’s redescending M-estimator. description. Statistics and plots. standard error. You can also identify the cases with the five largest and five smallest times. assumption checking. or other peculiarities. Example. normality plots. interquartile range.

Assumptions. These values may be short string or numeric. The distribution of your data does not have to be symmetric or normal. The case label variable. A factor variable (used to break the data into groups of cases) should have a reasonable number of distinct values (categories).or ratiolevel measurements). or numeric. can be short string. used to label outliers in boxplots.276 Chapter 15 Data. long string (first 15 characters). The Explore procedure can be used for quantitative variables (interval. Sample Output Figure 15-1 Explore output .

Figure 15-2 Explore dialog box Select one or more dependent variables.00 5. 014577 4 .8 9.00 6.. 05779 6 .3 2.9 9. 012237 9 . 1379 7 .5 9.00 4.5 Frequency 7.00 Stem & Leaf 2 .1 2. 5 1. 13589 10 .5 9.3 2.0 2.0 1 case(s) Stem width: Each leaf: To Explore Your Data From the menus choose: Analyze Descriptive Statistics Explore.00 6.3 2.00 1.. 568 5 . 268 8 . . 0133589 3 .277 Explore Extreme Values Case Number Schedule Time Highest 1 2 3 4 5 Lowest 1 2 3 4 5 31 33 39 32 36 2 7 1 11 3 4 4 4 4 4 1 1 1 2 1 Value 10.00 3.00 5.00 3.

normal probability plots and tests. maximum. Measures of central tendency indicate the location of the distribution. n Click Options for the treatment of missing values. median. you can: n Select one or more factor variables. and frequency tables. these include standard error. n Click Statistics for robust estimators. and Tukey’s biweight estimator are displayed. standard deviation. The descriptive statistics also include measures of the shape of the distribution. outliers. Andrews’ wave estimator. range. . they include the mean. skewness and kurtosis are displayed with their standard errors.278 Chapter 15 Optionally. you can specify a different confidence level. Measures of dispersion show the dissimilarity of the values. whose values will define groups of cases. Hampel’s redescending M-estimator. The 95% level confidence interval for the mean is also displayed. Explore Statistics Figure 15-3 Explore Statistics dialog box Descriptives. Robust alternatives to the sample mean and median for estimating the center of location. Huber’s M-estimator. n Select an identification variable to label cases. variance. percentiles. The estimators calculated differ in the weights they apply to cases. M-estimators. minimum. and interquartile range. and 5% trimmed mean. These measures of central tendency and dispersion are displayed by default. and spread-versus- level plots with Levene’s statistics. n Click Plots for histograms.

For no weights or integer weights. Factor levels together generates a separate display for each dependent variable. The Descriptive group allows you to choose stem-and-leaf plots and histograms. the statistic is calculated when the weighted sample size lies between 3 and 5000. Displays normal probability and detrended normal probability plots. This display is particularly useful when the different variables represent a single characteristic measured at different times. boxplots are shown for each of the groups defined by a factor variable.279 Explore Outliers. with case labels. the Shapiro-Wilk statistic is calculated when the weighted sample size lies between 3 and 50. Displays the values for the 5th. 90th. boxplots are shown side by side for each dependent variable. and 95th percentiles. Descriptive. 75th. Within a display. Explore Plots Figure 15-4 Explore Plots dialog box Boxplots. Normality plots with tests. Displays the five largest and five smallest values. Dependents together generates a separate display for each group defined by a factor variable. is displayed. These alternatives control the display of boxplots when you have more than one dependent variable. Percentiles. with a Lilliefors significance level for testing normality. 50th. The Kolmogorov-Smirnov statistic. If non-integer weights are specified. Within a display. 10th. . 25th.

the reciprocal of the square root is calculated. n Square. Each data value is squared. The interquartile range and median of the transformed data are plotted. n Cube. If no factor variable is selected. For all spread-versus-level plots. The reciprocal of each data value is calculated. A spread-versus-level plot helps determine the power for a transformation to stabilize (make more equal) variances across groups. This is the default. n Reciprocal. If you select a transformation. the slope of the regression line and Levene’s robust tests for homogeneity of variance are displayed. For each data value. Transformed allows you to select one of the power alternatives. n 1/square root. You can choose one of the following alternatives: n Natural log. spread-versus-level plots are not produced. .280 Chapter 15 Spread vs. Levene’s tests are based on the transformed data. n Square root. Each data value is cubed. Untransformed produces plots of the raw data. To transform data. as well as an estimate of the power transformation for achieving equal variances in the cells. The square root of each data value is calculated. you must select a power for the transformation. Explore Power Transformations These are the power transformations for spread-versus-level plots. Natural log transformation. and produces plots of transformed data. Power estimation produces a plot of the natural logs of the interquartile ranges against the natural logs of the medians for all cells. Controls data transformation for spread-versus-level plots. perhaps following the recommendation from power estimation. Level with Levene Test. This is equivalent to a transformation with a power of 1.

Frequency tables include categories for missing values. This is the default. The case may have missing values for variables used in other groups. . Missing values for a factor variable are included but labeled as missing. Controls the treatment of missing values. Missing values for factor variables are treated as a separate category. Cases with no missing values for variables in a group (cell) are included in the analysis of that group. All output is produced for this additional category. n Report values.281 Explore Explore Options Figure 15-5 Explore Options dialog box Missing Values. n Exclude cases listwise. Cases with missing values for any dependent or factor variable are excluded from all analyses. n Exclude cases pairwise.

.

Spearman’s rho. eta coefficient. Yates’ corrected chisquare. linear-by-linear association test. Crosstabs’ statistics and measures of association are computed for two-way tables only. Somers’ d. Kendall’s tau-b. gamma. the Crosstabs procedure forms one panel of associated statistics and measures for each value of the layer factor (or a combination of values for two or more control variables). Goodman and Kruskal’s tau. Fisher’s exact test. the results for a two-way table for the females are computed separately from those for the males and printed as panels following one another. Pearson’s r. Pearson chi-square. The structure of the table and whether categories are ordered determine what test or measure to use. odds ratio. routine. a column. and Cochran’s and Mantel-Haenszel statistics. 283 . you might learn that the majority of small companies (fewer than 500 employees) yield high service profits. Are customers from small companies more likely to be profitable in sales of services (for example. relative risk estimate. likelihood-ratio chisquare. while the majority of large companies (more than 2500 employees) yield low service profits.Chapter 16 Crosstabs The Crosstabs procedure forms two-way and multiway tables and provides a variety of tests and measures of association for two-way tables. symmetric and asymmetric lambdas. Statistics and measures of association. Cramér’s V. uncertainty coefficient. phi. and a layer factor (control variable). no) against life (is life exciting. contingency coefficient. if gender is a layer factor for a table of married (yes. Example. McNemar test. or dull). Cohen’s kappa. Kendall’s tau-c. If you specify a row. training and consulting) than those from larger companies? From a crosstabulation. For example.

and contingency coefficient).. For the chi-square-based statistics (phi. for gender. Others are valid when the table variables have unordered categories (nominal data). as discussed in the section on statistics. Assumptions. use values of a numeric or short string (eight or fewer characters) variable. Some statistics and measures assume ordered categories (ordinal data) or quantitative values (interval or ratio data).284 Chapter 16 Data. . Cramér’s V. the data should be a random sample from a multinomial distribution. To define the categories of each table variable. For example. Sample Output Figure 16-1 Crosstabs output To Obtain Crosstabulations From the menus choose: Analyze Descriptive Statistics Crosstabs. you could code the data as 1 and 2 or as male and female..

percentages. if you have one row variable. you can: n Select one or more control variables. they apply to two-way subtables only. click Next. n Click Format for controlling the order of categories. Optionally. For example. a separate crosstabulation is produced for each category of each layer variable (control variable). n Click Statistics for tests and measures of association for two-way tables or subtables.285 Crosstabs Figure 16-2 Crosstabs dialog box Select one or more row variables and one or more column variables. . Crosstabs Layers If you select one or more layer variables. n Click Cells for observed and expected values. and one layer variable with two categories. and residuals. To make another layer of control variables. one column variable. If statistics and measures of association are requested. Subtables are produced for each combination of categories for each 1st-layer variable with each 2nd-layer variable and so on. you get a two-way table for each category of the layer variable.

For tables with two rows and two columns. There is one set of differently colored or patterned bars for each value of this variable. a clustered bar chart is produced for each combination of two variables. Chi-square yields the linear-bylinear association test. There is one cluster of bars for each value of the variable you specified under Rows. Fisher’s exact test. A clustered bar chart helps summarize your data for groups of cases. Crosstabs Statistics Figure 16-3 Crosstabs Statistics dialog box Chi-square. The variable that defines the bars within each cluster is the variable you specified under Columns.286 Chapter 16 Crosstabs Clustered Bar Charts Display clustered bar charts. If you specify more than one variable under Columns or Rows. For tables with any number of rows and columns. Yates’ corrected chi-square is computed for all other 2 × 2 tables. the likelihood-ratio chi-square. select Chi-square to calculate the Pearson chi-square and the likelihood-ratio chisquare. and Yates’ corrected chi-square (continuity correction). Fisher’s exact test is computed when a table that does not result from missing rows or columns in a larger table has a cell with an expected frequency of less than 5. When both table variables are quantitative. . select Chi-square to calculate the Pearson chi-square. For 2 × 2 tables.

a measure of linear association between the variables. Nominal by Interval. The McNemar test is a nonparametric test for two related dichotomous variables. r. Nominal. . For predicting column categories from row categories. For tables in which both rows and columns contain ordered values. and Jewish). select Eta. Contingency coefficient. and Uncertainty coefficient. It is useful for detecting changes in responses due to experimental intervention in “before and after” designs. Cochran’s and Mantel-Haenszel statistics can be used to test for independence between a binary factor variable and a binary response variable. Protestant. Risk. such as Catholic. McNemar. The statistics are adjusted for covariate patterns defined by one or more control variables. For tables in which both rows and columns contain ordered values. For tables that have the same categories in the columns as in the rows (for example. Correlations yields Spearman’s correlation coefficient. select Gamma (zero-order for 2-way tables and conditional for 3-way to 10-way tables). you can select Phi (coefficient) and Cramér’s V. Kappa. select Risk for relative risk estimates and the odds ratio.287 Crosstabs Correlations. Lambda (symmetric and asymmetric lambdas and Goodman and Kruskal’s tau). When one variable is categorical and the other is quantitative. For tables with two rows and two columns. Ordinal. When both table variables (factors) are quantitative. rho (numeric data only). select Cohen’s Kappa. and Kendall’s tau-c. Spearman’s rho is a measure of association between rank orders. For nominal data (no intrinsic order. The categorical variable must be coded numerically. Correlations yields the Pearson correlation coefficient. Cochran’s and Mantel-Haenszel. measuring agreement between two raters). select Somers’ d. Kendall’s tau-b. It tests for changes in responses using the chi-square distribution.

The number of cases actually observed and the number of cases expected if the row and column variables are independent of each other. percentages. The percentages can add up across the rows or down the columns. Standardized and adjusted standardized residuals are also available. Raw unstandardized residuals give the difference between the observed and expected values. Residuals. the Crosstabs procedure displays expected frequencies and three types of residuals (deviates) that measure the difference between observed and expected frequencies. Crosstabs Table Format Figure 16-5 Crosstabs Table Format dialog box You can arrange rows in ascending or descending order of the values of the row variable. Each cell of the table can contain any combination of counts. and residuals selected. . Counts. Percentages. The percentages of the total number of cases represented in the table (one layer) are also available. Standardized and adjusted standardized residuals are calculated as in Haberman (1978).288 Chapter 16 Crosstabs Cell Display Figure 16-4 Crosstabs Cell Display dialog box To help you uncover patterns in the data that contribute to a significant chi-square test.

minimum. 289 . percentage of total N. kurtosis. Data. variance. With large data sets. Example. variable value of the first category of the grouping variable. you can choose to list only the first n cases. percentage of N in. Summary statistics for each variable across all categories are also displayed. range. standard error of the mean. skewness. maximum. Assumptions. The number of categories should be reasonably small. Some of the optional subgroup statistics. median. Grouping variables are categorical variables whose values can be numeric or short string. You can choose the order in which the statistics are displayed. Sum. such as the mean and standard deviation. number of cases. such as the median and the range. standard error of skewness. The other variables should be able to be ranked. standard error of kurtosis. Data values in each category can be listed or suppressed.Chapter 17 Summarize The Summarize procedure calculates subgroup statistics for variables within categories of one or more grouping variables. harmonic mean. mean. Robust statistics. percentage of sum in. variable value of the last category of the grouping variable. grouped median. geometric mean. What is the average product sales amount by region and customer industry? You might discover that the average sales amount is slightly higher in the western region than in other regions. Statistics. All levels of the grouping variable are crosstabulated. with corporate customers in the western region yielding the highest average sales amount. standard deviation. are appropriate for quantitative variables that may or may not meet the assumption of normality. percentage of total sum. are based on normal theory and are appropriate for quantitative variables with symmetric distributions.

.290 Chapter 17 Sample Output Figure 17-1 Summarize output To Obtain Case Summaries From the menus choose: Analyze Reports Case Summaries. Figure 17-2 Summarize Cases dialog box ..

phrase. n Click Options to change the output title. you can: n Select one or more grouping variables to divide your data into subgroups. Often it is desirable to denote missing cases in output with a period or an asterisk. or exclude cases with missing values. add a caption below the output. n Select Display cases to list the cases in each subgroup. Summarize Options Figure 17-3 Summarize Cases Options dialog box Summarize allows you to change the title of your output or add a caption that will appear below the output table. You can raise or lower the value for Limit cases to first n or deselect that item to list all cases. n Click Statistics for optional statistics.291 Summarize Select one or more variables. the system lists only the first 100 cases in your file. By default. You can also choose to display or suppress subheadings for totals and to include or exclude cases with missing values for any of the variables used in any of the analyses. You can control line wrapping in titles and captions by typing \n wherever you want to insert a line break in the text. otherwise. Enter a character. or code that you would like to have appear when a value is missing. no special treatment is applied to missing cases in the output. . Optionally.

Summary statistics are also displayed for each variable across all categories. maximum. median. variable value of the first category of the grouping variable. variance. number of cases. percentage of total N. range. harmonic mean.292 Chapter 17 Summarize Statistics Figure 17-4 Summarize Cases Statistics dialog box You can choose one or more of the following subgroup statistics for the variables within each category of each grouping variable: sum. percentage of N in. percentage of total sum. grouped median. mean. The order in which the statistics appear in the Cell Statistics list is the order in which they will be displayed in the output. standard error of the mean. skewness. . standard deviation. kurtosis. geometric mean. standard error of kurtosis. standard error of skewness. percentage of sum in. minimum. variable value of the last category of the grouping variable.

Robust statistics. standard deviation. you can obtain a one-way analysis of variance. and tests for linearity. Analysis of variance also assumes that the groups come from populations with equal variances. variance. eta. number of cases. variable value of the last category of the grouping variable. Analysis of variance is robust to departures from normality. geometric mean. Data. Measure the average amount of fat absorbed by three different types of cooking oil and perform a one-way analysis of variance to see if the means differ. Sum. The dependent variables are quantitative and the independent variables are categorical.Chapter 18 Means The Means procedure calculates subgroup means and related univariate statistics for dependent variables within categories of one or more independent variables. percentage of sum in. To test this assumption. Some of the optional subgroup statistics. Example. such as the median and the range. percentage of total N. use Levene’s homogeneity-of-variance test. Optionally. available in the One-Way ANOVA procedure. percentage of total sum. median. skewness. percentage of N in. Statistics. Assumptions. mean. The values of categorical variables can be numeric or short string. grouped median. but the data in each cell should be symmetric. and tests for linearity R and R2. standard error of skewness. range. standard error of the mean. eta squared. harmonic mean. kurtosis. maximum. are appropriate for quantitative variables that may or may not meet the assumption of normality. Optional statistics include analysis of variance. variable value of the first category of the grouping variable. standard error of kurtosis. eta. such as the mean and standard deviation. 293 . are based on normal theory and are appropriate for quantitative variables with symmetric distributions. minimum.

34 85.00 6 13.294 Chapter 18 Sample Output Figure 18-1 Means output Report Absorbed Grams of Fat Type of Oil Peanut Oil Mean N Std.00 6 7. Deviation Total Mean N Std. Deviation 72. Deviation Lard Mean N Std.56 . Deviation Corn Oil Mean N Std.22 73.77 62.00 6 8.00 18 13.

Optionally. There are two ways to select categorical independent variables.. R.295 Means To Obtain Means From the menus choose: Analyze Compare Means Means. n Select one or more layers of independent variables. and R2. Figure 18-2 Means dialog box Select one or more dependent variables. Each layer further subdivides the sample.. . eta squared. you can: n Click Options for optional statistics. the results are displayed in one crossed table as opposed to separate tables for each independent variable. analysis of variance table. eta. If you have one independent variable in Layer 1 and one in Layer 2. n Select one or more independent variables. Separate results are displayed for each independent variable.

.296 Chapter 18 Means Options Figure 18-3 Means Options dialog box You can choose one or more of the following subgroup statistics for the variables within each category of each grouping variable: sum. median. grouped median. The order in which the statistics appear in the Cell Statistics list is the order in which they are displayed in the output. Eta and eta squared are measures of association. range. maximum. percentage of total sum. minimum. skewness. variable value of the first category of the grouping variable. standard deviation. Click ANOVA table and eta to obtain a one-way analysis of variance. Tests for linearity yield R and R2. standard error of kurtosis. geometric mean. and eta squared for each independent variable in the first layer. It is the ratio of the betweengroups sum of squares and the total sum of squares. percentage of N in. number of cases. Eta squared is the proportion of variance in the dependent variable that is explained by differences among groups. variance. percentage of sum in. variable value of the last category of the grouping variable. kurtosis. harmonic mean. mean. standard error of the mean. standard error of skewness. R and R2 measure the goodness of fit of a linear model. percentage of total N. eta. Summary statistics are also displayed for each variable across all categories. which are appropriate measures when the categories of the independent variable are ordered. You can change the order in which the subgroup statistics appear.

percentage of total cases within grouping variables. Sum. Data. range. The values of categorical variables can be numeric or short string. variable value of the first category of the grouping variable. Statistics. skewness. standard error of the mean.Chapter 19 OLAP Cubes The OLAP (Online Analytical Processing) Cubes procedure calculates totals. are based on normal theory and are appropriate for quantitative variables with symmetric distributions. A separate layer in the table is created for each category of each grouping variable. number of cases. geometric mean. mean. and the grouping variables are categorical. Example. percentage of total sum within grouping variables. variable value of the last category of the grouping variable. The summary variables are quantitative (continuous variables measured on an interval or ratio scale). median. maximum. are appropriate for quantitative variables that may or may not meet the assumption of normality. minimum. such as the mean and standard deviation. Assumptions. standard error of skewness. Total and average sales for different regions and product lines within regions. means. standard deviation. and harmonic mean. such as the median and range. and other univariate statistics for continuous summary variables within categories of one or more categorical grouping variables. standard error of kurtosis. variance. percentage of total cases. Robust statistics. percentage of total sum. Some of the optional subgroup statistics. 297 . kurtosis. grouped median.

00 Std.893 $307.038. Deviation $145.814.311 1996 Sales by Division and Region Division: Consumer Products Region: East Sum $18.548.500 $171.250 $371. Deviation $80.100 Mean $289.674.06 Median $273.600.66 .298 Chapter 19 Sample Output Figure 19-1 OLAP Cubes output 1996 Sales by Division and Region Division: Total Region: Total Sum Mean Median Std.

299 OLAP Cubes

**To Obtain OLAP Cubes
**

From the menus choose: Analyze Reports OLAP Cubes... Figure 19-2 OLAP Cubes dialog box

Select one or more continuous summary variables. Select one or more categorical grouping variables.

**Optionally, you can:
**

n Select different summary statistics (click Statistics). n Calculate differences between pairs of variables and pairs of groups defined by a grouping variable (click Differences). n Create custom table titles (click Title).

300 Chapter 19

**OLAP Cubes Statistics
**

Figure 19-3 OLAP Cubes Statistics dialog box

You can choose one or more of the following subgroup statistics for the summary variables within each category of each grouping variable: sum, number of cases, mean, median, grouped median, standard error of the mean, minimum, maximum, range, variable value of the first category of the grouping variable, variable value of the last category of the grouping variable, standard deviation, variance, kurtosis, standard error of kurtosis, skewness, standard error of skewness, percentage of total cases, percentage of total sum, percentage of total cases within grouping variables, percentage of total sum within grouping variables, geometric mean, and harmonic mean. You can change the order in which the subgroup statistics appear. The order in which the statistics appear in the Cell Statistics list is the order in which they are displayed in the output. Summary statistics are also displayed for each variable across all categories.

301 OLAP Cubes

**OLAP Cubes Differences
**

Figure 19-4 OLAP Cubes Differences dialog box

This dialog box allows you to calculate percentage and arithmetic differences between summary variables or between groups defined by a grouping variable. Differences are calculated for all measures selected in the OLAP Cubes Statistics dialog box.

Differences between Variables. Calculates differences between pairs of variables. You must select at least two summary variables in the main dialog box before you can specify differences between variables. Differences between Groups of Cases. Calculates differences between pairs of groups defined by a grouping variable. You must select one or more grouping variables in the main dialog box before you can specify differences between groups.

302 Chapter 19

**OLAP Cubes Title
**

Figure 19-5 OLAP Cubes Title dialog box

You can change the title of your output or add a caption that will appear below the output table. You can also control line wrapping of titles and captions by typing \n wherever you want to insert a line break in the text.

Chapter

20

T Tests

**The Compare Means submenu of the Statistics menu provides three types of t tests:
**

Independent-samples t test (two-sample t test). Compares the means of one variable for two groups of cases. Descriptive statistics for each group and Levene’s test for equality of variances are provided, as well as both equal- and unequal-variance t values and a 95% confidence interval for the difference in means. Paired-samples t test (dependent t test). Compares the means of two variables for a single group. This test is also for matched pairs or case-control study designs. The output includes descriptive statistics for the test variables, the correlation between them, descriptive statistics for the paired differences, the t test, and a 95% confidence interval. One-sample t test. Compares the mean of one variable with a known or hypothesized value. Descriptive statistics for the test variables are displayed along with the t test. A 95% confidence interval for the difference between the mean of the test variable and the hypothesized test value is part of the default output.

**Independent-Samples T Test
**

The Independent-Samples T Test procedure compares means for two groups of cases. Ideally, for this test, the subjects should be randomly assigned to two groups, so that any difference in response is due to the treatment (or lack of treatment) and not to other factors. This is not the case if you compare average income for males and females. A person is not randomly assigned to be a male or female. In such situations, you should ensure that differences in other factors are not masking or enhancing a significant difference in means. Differences in average income may be influenced by factors such as education and not by sex alone.

303

304 Chapter 20

Example. Patients with high blood pressure are randomly assigned to a placebo group and a treatment group. The placebo subjects receive an inactive pill and the treatment subjects receive a new drug that is expected to lower blood pressure. After treating the subjects for two months, the two-sample t test is used to compare the average blood pressures for the placebo group and the treatment group. Each patient is measured once and belongs to one group. Statistics. For each variable: sample size, mean, standard deviation, and standard error of the mean. For the difference in means: mean, standard error, and confidence interval (you can specify the confidence level). Tests: Levene’s test for equality of variances, and both pooled- and separate-variances t tests for equality of means. Data. The values of the quantitative variable of interest are in a single column in the data file. The procedure uses a grouping variable with two values to separate the cases into two groups. The grouping variable can be numeric (values such as 1 and 2, or 6.25 and 12.5) or short string (such as yes and no). As an alternative, you can use a quantitative variable, such as age, to split the cases into two groups by specifying a cut point (cut point 21 splits age into an under-21 group and a 21-and-over group). Assumptions. For the equal-variance t test, the observations should be independent, random samples from normal distributions with the same population variance. For the unequal-variance t test, the observations should be independent, random samples from normal distributions. The two-sample t test is fairly robust to departures from normality. When checking distributions graphically, look to see that they are symmetric and have no outliers.

Sample Output

Figure 20-1 Independent-Samples T Test output

Group Statistics Std. Deviation 17.04 13.62 Std. Error Mean 5.39 4.31

N Blood pressure Treatment placebo new_drug 10 10

Mean 142.50 116.40

305 T Tes ts

Independent Samples Test Levene’s Test for Equality of Variances

t-test for Equality of Means 95% Confidence Interval of the Mean Lower 11.61 Upper 40.59

F Blood pressure Equal variances assumed Equal variances not assumed .134

Significance .719

t 3.783

df 18

Significance (2-tailed) .001

Mean Difference 26.10

Std. Error Difference 6.90

3.783

17.163

.001

26.10

6.90

11.56

40.64

**To Obtain an Independent-Samples T Test
**

From the menus choose: Analyze Compare Means Independent-Samples T Test... Figure 20-2 Independent-Samples T Test dialog box

Select one or more quantitative test variables. A separate t test is computed for

each variable.

306 Chapter 20

Select a single grouping variable, and click Define Groups to specify two codes for the

groups that you want to compare. Optionally, you can click Options to control the treatment of missing data and the level of the confidence interval.

**Independent-Samples T Test Define Groups
**

Figure 20-3 Define Groups dialog box for numeric variables

For numeric grouping variables, define the two groups for the t test by specifying two values or a cut point:

n Use specified values. Enter a value for Group 1 and another for Group 2. Cases with

any other values are excluded from the analysis. Numbers need not be integers (for example, 6.25 and 12.5 are valid).

n Cut point. Alternatively, enter a number that splits the values of the grouping

variable into two sets. All cases with values less than the cut point form one group, and cases with values greater than or equal to the cut point form the other group.

Figure 20-4 Define Groups dialog box for string variables

For short string grouping variables, enter a string for Group 1 and another for Group 2, such as yes and no. Cases with other strings are excluded from the analysis.

307 T Tes ts

**Independent-Samples T Test Options
**

Figure 20-5 Independent-Samples T Test Options dialog box

Confidence Interval. By default, a 95% confidence interval for the difference in means is displayed. Enter a value between 1 and 99 to request a different confidence level. Missing Values. When you test several variables and data are missing for one or more variables, you can tell the procedure which cases to include (or exclude):

n Exclude missing data analysis by analysis. Each t test uses all cases that have valid

**data for the variables tested. Sample sizes may vary from test to test.
**

n Exclude cases listwise. Each t test uses only cases that have valid data for all

variables used in the requested t tests. The sample size is constant across tests.

**Paired-Samples T Test
**

The Paired-Samples T Test procedure compares the means of two variables for a single group. It computes the differences between values of the two variables for each case and tests whether the average differs from 0.

Example. In a study on high blood pressure, all patients are measured at the beginning of the study, given a treatment, and measured again. Thus, each subject has two measures, often called before and after measures. An alternative design for which this test is used is a matched-pairs or case-control study. Here, each record in the data file contains the response for the patient and also for his or her matched control subject. In a blood pressure study, patients and controls might be matched by age (a 75-year-old patient with a 75-year-old control group member). Statistics. For each variable: mean, sample size, standard deviation, and standard error of the mean. For each pair of variables: correlation, average difference in means, t test,

308 Chapter 20

and confidence interval for mean difference (you can specify the confidence level). Standard deviation and standard error of the mean difference.

Data. For each paired test, specify two quantitative variables (interval- or ratio-level of measurement). For a matched-pairs or case-control study, the response for each test subject and its matched control subject must be in the same case in the data file. Assumptions. Observations for each pair should be made under the same conditions. The mean differences should be normally distributed. Variances of each variable can be equal or unequal.

Sample Output

Figure 20-6 Paired-Samples T Test output

Paired Samples Statistics Std. Deviation 13.62 17.04 Std. Error Mean 4.31 5.39

Mean Pair 1 After treatment Before treatment 116.40 142.50

N 10 10

Paired Samples Test

Paired Differences 95% Confidence Interval of the Difference Lower Upper t df

Mean Pair 1 After treatment Before treatment

Std. Deviation

Std. Error Mean

Significance (2-tailed)

-26.10

19.59

6.19

-40.11

-12.09

-4.214

9

.002

309 T Tes ts

**To Obtain a Paired-Samples T Test
**

From the menus choose: Analyze Compare Means Paired-Samples T Test... Figure 20-7 Paired-Samples T Test dialog box

Select a pair of variables, as follows: n Click each of two variables. The first variable appears in the Current Selections

**group as Variable 1, and the second appears as Variable 2.
**

n After you have selected a pair of variables, click the arrow button to move the pair

into the Paired Variables list. You may select more pairs of variables. To remove a pair of variables from the analysis, select a pair in the Paired Variables list and click the arrow button. Optionally, you can click Options to control treatment of missing data and the level of the confidence interval.

310 Chapter 20

**Paired-Samples T Test Options
**

Figure 20-8 Paired-Samples T Test Options dialog box

Confidence Interval. By default, a 95% confidence interval for the difference in means is displayed. Enter a value between 1 and 99 to request a different confidence level. Missing Values. When you test several variables and data are missing for one or more variables, you can tell the procedure which cases to include (or exclude):

n Exclude cases analysis by analysis. Each t test uses all cases that have valid data for

**the pair of variables tested. Sample sizes may vary from test to test.
**

n Exclude cases listwise. Each t test uses only cases that have valid data for all pairs

of variables tested. The sample size is constant across tests.

**One-Sample T Test
**

The One-Sample T Test procedure tests whether the mean of a single variable differs from a specified constant.

Examples. A researcher might want to test whether the average IQ score for a group of students differs from 100. Or, a cereal manufacturer can take a sample of boxes from the production line and check whether the mean weight of the samples differs from 1.3 pounds at the 95% confidence level. Statistics. For each test variable: mean, standard deviation, and standard error of the mean. The average difference between each data value and the hypothesized test value, a t test that tests that this difference is 0, and a confidence interval for this difference (you can specify the confidence level).

this test is fairly robust to departures from normality. One-Sample Test Test Value = 100 95% Confidence Interval of the Difference Lower 2.11 Rows and columns have been transposed.33 . choose a quantitative variable and enter a hypothesized test value. This test assumes that the data are normally distributed.009 Mean Difference 9.33 12.99 t IQ 3.005 df 14 Significance (2-tailed) .67 Upper 15. Assumptions. Sample Output Figure 20-9 One-Sample T Test output One-Sample Statistics IQ N Mean Std.03 3. To test the values of a quantitative variable against a hypothesized test value.311 T Tes ts Data. Deviation Std. however. Error Mean 15 109.

One-Sample T Test Options Figure 20-11 One-Sample T Test Options dialog box .. Figure 20-10 One-Sample T Test dialog box Select one or more variables to be tested against the same hypothesized value.312 Chapter 20 To Obtain a One-Sample T Test From the menus choose: Analyze Compare Means One-Sample T Test. Enter a numeric test value against which each sample mean is compared. Optionally.. you can click Options to control the treatment of missing data and the level of the confidence interval.

The sample size is constant across tests. Sample sizes may vary from test to test. n Exclude cases listwise. When you test several variables and data are missing for one or more of these variables. Each t test uses all cases that have valid data for the variable tested.313 T Tes ts Confidence Interval. a 95% confidence interval for the difference between the mean and the hypothesized test value is displayed. By default. . Each t test uses only cases that have valid data for all variables used in any of the t tests requested. you can tell the procedure which cases to include (or exclude). Enter a value between 1 and 99 to request a different confidence level. n Exclude cases analysis by analysis. Missing Values.

.

For each group: number of cases. and post hoc tests are run after the experiment has been conducted. and post hoc range tests and multiple comparisons: Bonferroni. Dunnett’s C. You can also test for trends across categories. Example. Tamhane’s T2. and least-significant difference. Tukey’s b. standard deviation. Ryan-Einot-Gabriel-Welsch range test (R-E-G-W Q). and 95% confidence interval for the mean. Peanut oil and corn oil are unsaturated fats. Statistics. Dunnett’s T3. Along with determining whether the amount of fat absorbed depends on the type of fat used. Levene’s test for homogeneity of variance. This technique is an extension of the two-sample t test. Scheffé. An experiment is set up involving three types of fat: peanut oil. standard error of the mean. There are two types of tests for comparing means: a priori contrasts and post hoc tests. Ryan-Einot-Gabriel-Welsch F test (R-E-G-W F). mean. Tukey’s honestly significant difference. you may want to know which means differ. Waller-Duncan. Duncan’s multiple range test.Chapter 21 One-Way Analysis of Variance The One-Way ANOVA procedure produces a one-way analysis of variance for a quantitative dependent variable by a single factor (independent) variable. you could set up an a priori contrast to determine whether the amount of fat absorption differs for saturated and unsaturated fats. Student-Newman-Keuls (S-N-K). analysis-of-variance table and robust tests of the equality of means for each dependent variable. maximum. minimum. and lard. In addition to determining that differences exist among the means. 315 . Hochberg’s GT2. Games-Howell. user-specified a priori contrasts. Gabriel. corn oil. Doughnuts absorb fat in various amounts when they are cooked. Analysis of variance is used to test the hypothesis that several means are equal. Contrasts are tests set up before running the experiment. Sidak. Dunnett. and lard is a saturated fat.

316 Chapter 21 Data.84 53.00 102. Assumptions.63 79.20 Lower Bound 58.22 13.16 70. Analysis of variance is robust to departures from normality.00 85.74 Minimum 56 77 49 49 Maximum 95 97 70 97 Contrast Coefficients Type of Oil Peanut Oil Contrast 1 -.26 Upper Bound 86. Error 5.005 Descriptives 95% Confidence Interval for Mean N Absorbed Grams of Fat Type of Oil Peanut Oil Lard Corn Oil Total 6 6 6 18 Mean 72.00 3126.00 Mean Square 2 15 17 798.00 62.00 73. Deviation 13. The groups should come from populations with equal variances.17 3.45 3. Factor variable values should be integers.36 3. although the data should be symmetric.00 1530.77 8.37 66. and the dependent variable should be quantitative (interval level of measurement).5 Lard 1 Corn Oil -. Sample Output Figure 21-1 One-Way ANOVA output ANOVA Sum of Squares Absorbed Grams of Fat Between Groups Within Groups Total 1596. Each group is an independent random sample from a normal population.5 .56 Std. To test this assumption.00 93.00 76.34 7. use Levene’s homogeneity-of-variance test.00 Std.824 Significance .00 df F 7.

317 One-Way Analys is of Variance Contrast Tests Value of Contrast Absorbed Grams of Fat Assume equal variances Does not assume equal variances Contrast Contrast 1 1 18.565 3.00 Significance (2-tailed) 15 12. Select a single independent factor variable.05 4.995 df Test of Homogeneity of Variances Levene Statistic Absorbed Grams of Fat .003 .534 df1 2 df2 15 Significance .002 Std.00 18.542 .51 t 3...597 To Obtain a One-Way Analysis of Variance From the menus choose: Analyze Compare Means One-Way ANOVA. . Figure 21-2 One-Way ANOVA dialog box Select one or more dependent variables. Error 5.

or 5th degree polynomial. Use Next and Previous to move between sets of contrasts. User-specified a priori contrasts to be tested by the t statistic. You can test for a trend of the dependent variable across the ordered levels of the factor variable. You can choose a 1st. the coefficients should sum to 0. but a warning message is displayed. n Degree. Sets that do not sum to 0 can also be used. 0. if there are six categories of the factor variable. . click Next. and the last coefficient corresponds to the highest value. you could test for a linear trend (increasing or decreasing) in salary across the ordered levels of highest degree earned. 2nd. For most applications. For example. 0. The order of the coefficients is important because it corresponds to the ascending order of the category values of the factor variable. Partitions the between-groups sums of squares into trend components. 0. Coefficients. To specify additional sets of contrasts. the coefficients –1. 3rd. 0. and 0. Each new value is added to the bottom of the coefficient list. Enter a coefficient for each group (category) of the factor variable and click Add after each entry.318 Chapter 21 One-Way ANOVA Contrasts Figure 21-3 One-Way ANOVA Contrasts dialog box You can partition the between-groups sums of squares into trend components or specify a priori contrasts.5 contrast the first group with the fifth and sixth groups. The first coefficient on the list corresponds to the lowest group value of the factor variable. Polynomial. For example.5. 4th.

Sidak. R-E-G-W F (Ryan-EinotGabriel-Welsch F test). Gabriel’s test. Range tests identify homogeneous subsets of means that are not different from each other. and yield a matrix where asterisks indicate significantly different group means at an alpha level of 0.319 One-Way Analys is of Variance One-Way ANOVA Post Hoc Tests Figure 21-4 One-Way ANOVA Post Hoc Multiple Comparisons dialog box Tests. Duncan. Dunnett’s T3. Multiple comparison tests that do not assume equal variances are Tamhane’s T2. Dunnett. Pairwise multiple comparisons test the difference between each pair of means.05. and Waller-Duncan. R-E-G-W Q (Ryan-Einot-Gabriel-Welsch range test). . Games-Howell. Scheffé. and Dunnett’s C. and LSD (least significant difference). Available multiple comparison tests are Bonferroni. post hoc range tests and pairwise multiple comparisons can determine which means differ. Note: You may find it easier to interpret the output from post hoc tests if you deselect Hide Empty Rows and Columns in the Table Properties dialog box (in an activated pivot table. S-N-K (Student-Newman-Keuls). Other available range tests are Tukey’s b. Hochberg. Hochberg’s GT2. Once you have determined that differences exist among the means. Gabriel. and Scheffé’s test are multiple comparison tests and range tests. Tukey’s honestly significant difference test. Tukey’s honestly significant difference test. choose Table Properties from the Format menu).

mean. n Homogeneity of variance tests. Choose one or more of the following: n Descriptive. Calculates the Brown-Forsythe statistic to test for the equality of group means. . and 95% confidence intervals for each dependent variable for each group. Calculates the number of cases. standard error. standard deviation. and estimate of between-components variance for the random-effects model. This test is not dependent on the assumption of normality. maximum. n Fixed and random effects. Displays the standard deviation. n Brown-Forsythe.320 Chapter 21 One-Way ANOVA Options Figure 21-5 One-Way ANOVA Options dialog box Statistics. 95% confidence interval. This statistic is preferable to the F statistic when the assumption of equal variances does not hold. n Welch. Calculates the Welch statistic to test for the equality of group means. This statistic is preferable to the F statistic when the assumption of equal variances does not hold. Calculates the Levene statistic to test for the equality of group variances. and 95% confidence interval for the fixed-effects model and the standard error. standard error of the mean. minimum.

If you have not specified multiple dependent variables.321 One-Way Analys is of Variance Means Plot. Displays a chart that plots the subgroup means (the means for each group defined by values of the factor variable). n Exclude cases listwise. . Cases with missing values for the factor variable or for any dependent variable included on the dependent list in the main dialog box are excluded from all analyses. a case outside the range specified for the factor variable is not used. Controls the treatment of missing values. Missing Values. Also. this has no effect. n Exclude cases analysis by analysis. A case with a missing value for either the dependent or the factor variable for a given analysis is not used in that analysis.

.

and leverage values can be saved as new variables in your data file for checking assumptions. you can use post hoc tests to evaluate differences among specific means. after an overall F test has shown significance. 323 . Using this General Linear Model procedure. Commonly used a priori contrasts are available to perform hypothesis testing. predicted values. Additionally. In addition. the independent (predictor) variables are specified as covariates. you can test null hypotheses about the effects of other variables on the means of various groupings of a single dependent variable. some of which may be random. the effects of covariates and covariate interactions with factors can be included. You can investigate interactions between factors as well as the effects of individual factors. A design is balanced if each cell in the model contains the same number of cases. The factor variables divide the population into groups. Residuals. and profile plots (interaction plots) of these means allow you to easily visualize some of the relationships. Cook’s distance. Estimated marginal means give estimates of predicted mean values for the cells in the model. For regression analysis. Both balanced and unbalanced models can be tested. GLM Univariate produces estimates of parameters. perhaps to compensate for a different precision of measurement.Chapter 22 GLM Univariate Analysis The GLM Univariate procedure provides regression analysis and analysis of variance for one dependent variable by one or more factors and/or variables. In addition to testing hypotheses. WLS Weight allows you to specify a variable used to give observations different weights for a weighted least-squares (WLS) analysis.

Data. number of previous marathons. Dunnett’s T3. Ryan-EinotGabriel-Welsch multiple range. Covariates are quantitative variables that are related to the dependent variable. and Dunnett’s C. . Type II. Tamhane’s T2. Spread-versus-level.324 Chapter 22 Example. Plots. You can also examine residuals and residual plots. Statistics. To check assumptions. standard deviations. The Levene test for homogeneity of variance. Ryan-Einot-Gabriel-Welsch multiple F. Post hoc range tests and multiple comparisons: least significant difference. Scheffé. and Type IV sums of squares can be used to evaluate different hypotheses. Tukey’s b. Data are gathered for individual runners in the Chicago marathon for several years. Dunnett (one-sided and two-sided). Sidak. Games-Howell. number of months of training. all cell variances are the same. Bonferroni. Other factors include the weather (cold. and gender. They can have numeric values or string values of up to eight characters. Methods. Gabriel. Age is considered a covariate. The time in which each runner finishes is the dependent variable. pleasant. Factors are categorical. although the data should be symmetric. in the population. Type III. Student-Newman-Keuls. residual. or hot). You might find that gender is a significant effect and that the interaction of gender with weather is significant. The dependent variable is quantitative. Type III is the default. Hochberg’s GT2. profile (interaction). Tukey’s honestly significant difference. Type I. Duncan. you can use homogeneity of variances tests and spread-versus-level plots. The data are a random sample from a normal population. Descriptive statistics: observed means. Waller Duncan t test. Analysis of variance is robust to departures from normality. Assumptions. and counts for all of the dependent variables in all cells.

023 6.513 30.052 6.641 7.021 5.316 1112.000 .505 6.960 24.376 6147.522 Sig.981 2.589 Std.325 GLM Univariate Analysis Sample Output Figure 22-1 GLM Univariate output Tests of Between-Subjects Effects Dependent Variable: SPVOL Type III Sum of Squares 22.564 5.301 .001 1016.945 Upper Bound 6. Error .000 .605 6.708 6.241 .064 5.520 1 Source Corrected Model Intercept Flour Fat Surfactant Fat*Surfactant Error Total Corrected Total df 11 1 3 2 2 4 14 26 25 Mean Square 2.014 8.436 7.984 6.897 5.203 .536 5. R Squared = .239 .639 2. .047 1016.200 8.691 10.000 .301 .353 6.541 7.833) fat * surfactant Dependent Variable: SPVOL 95% Confidence Interval fat 1 surfactant 1 2 3 2 1 2 3 3 1 2 3 Mean 5.583 3.274 7.378 5.907 (Adjusted R Squared = .764 7.835 1.499 1.000 .629 7.938 17.241 .000 6.082 .997 5.636 9.123 7.118 .165 F 12.233 .059 .203 .404 6.891 6.240 .981 8.300 Lower Bound 5.410 .

as appropriate for your data.326 Chapter 22 To Obtain a GLM Univariate Analysis From the menus choose: Analyze General Linear Model Univariate.. Random Factor(s). For specifying a weight variable. Figure 22-2 Univariate dialog box Select a dependent variable. Select variables for Fixed Factor(s). use WLS Weight. .. and Covariate(s).

The method of calculating the sums of squares. .327 GLM Univariate Analysis GLM Univariate Model Figure 22-3 Univariate Model dialog box Specify Model. Sum of squares. you can exclude the intercept. You must indicate all of the terms to be included in the model. If you can assume that the data pass through the origin. (R) indicates a random factor. and all factor-by-factor interactions. A full factorial model contains all factor main effects. In a Univariate analysis. all covariate main effects. the Type III sum-of-squares method is most commonly used. Model. For balanced or unbalanced models with no missing cells. After selecting Custom. The model depends on the nature of your data. The intercept is usually included in the model. you can select the main effects and interactions that are of interest in your analysis. The factors and covariates are listed with (F) for fixed factor and (C) for covariate. Factors and Covariates. Include intercept in model. It does not contain covariate interactions. Select Custom to specify only a subset of interactions or to specify factor-by-covariate interactions.

This method calculates the sums of squares of an effect in the model adjusted for all other “appropriate” effects. Creates the highest-level interaction term of all selected variables. . Each term is adjusted for only the term that precedes it in the model. Type I sums of squares are commonly used for: n A balanced ANOVA model in which any main effects are specified before any first-order interaction effects. Type III is the most commonly used and is the default. An appropriate effect is one that corresponds to all effects that do not contain the effect being examined. and so on. The Type II sum-of-squares method is commonly used for: n A balanced ANOVA model.328 Chapter 22 Build Terms For the selected factors and covariates: Interaction. the second-specified effect is nested within the third. you can choose a type of sums of squares. All 4-way. (This form of nesting can be specified only by using syntax. This method is also known as the hierarchical decomposition of the sum-ofsquares method. Creates a main-effects term for each variable selected. All 2-way. n A purely nested model in which the first-specified effect is nested within the second-specified effect. Type I. Creates all possible two-way interactions of the selected variables. and so on. n Any model that has main factor effects only. This is the default. All 5-way. Sums of Squares For the model. Main effects. All 3-way. Creates all possible five-way interactions of the selected variables. n A polynomial regression model in which any lower-order terms are specified before any higher-order terms.) Type II. Creates all possible three-way interactions of the selected variables. Creates all possible four-way interactions of the selected variables. any first-order interaction effects are specified before any second-order interaction effects.

Type IV distributes the contrasts being made among the parameters in F to all higher-level effects equitably. For any effect F in the design. The Type III sums of squares have one major advantage in that they are invariant with respect to the cell frequencies as long as the general form of estimability remains constant. GLM Univariate Contrasts Figure 22-4 Univariate Contrasts dialog box . the Type IV = Type III = Type II. (This form of nesting can be specified by using syntax. The Type IV sum-of-squares method is commonly used for: n Any models listed in Type I and Type II. if F is not contained in any other effect.329 GLM Univariate Analysis n Any regression model. n Any balanced or unbalanced model with no empty cells. this type of sums of squares is often considered useful for an unbalanced model with no missing cells. The default.) Type III. This method is designed for a situation in which there are missing cells. Hence. In a factorial design with no missing cells. When F is contained in other effects. The Type III sum-of-squares method is commonly used for: n Any models listed in Type I and Type II. n Any balanced model or unbalanced model with empty cells. this method is equivalent to the Yates’ weightedsquares-of-means technique. Type IV. This method calculates the sums of squares of an effect in the design as the sums of squares adjusted for any other effects that do not contain it and orthogonal to any effects (if any) that contain it. n A purely nested design.

For deviation contrasts and simple contrasts.) Helmert. simple. The first degree of freedom contains the linear effect across all categories. When a contrast is specified. Compares the mean of each level to the mean of a specified level. . Hypothesis testing is based on the null hypothesis LB=0. and so on. These contrasts are often used to estimate polynomial trends. you can choose whether the reference category is the last or first category. Compares the mean of each level (except the first) to the mean of previous levels. the quadratic effect. where L is the contrast coefficients matrix and B is the parameter vector. and so on. the second degree of freedom. quadratic effect.330 Chapter 22 Contrasts are used to test for differences among the levels of a factor. SPSS creates an L matrix in which the columns corresponding to the factor match the contrast. You can choose the first or last category as the reference. Compares the linear effect. cubic effect. The levels of the factor can be in any order. The output includes an F statistic for each set of contrasts. and polynomial. Difference. Compares the mean of each level of the factor (except the last) to the mean of subsequent levels. Compares the mean of each level (except a reference category) to the mean of all of the levels (grand mean). Compares the mean of each level (except the last) to the mean of the subsequent level. Contrasts represent linear combinations of the parameters. (Sometimes called reverse Helmert contrasts. This type of contrast is useful when there is a control group. Contrast Types Deviation. Available Contrasts Available contrasts are deviation. You can specify a contrast for each factor in the model (in a repeated measures model. Polynomial. for each between-subjects factor). Also displayed for the contrast differences are Bonferroni-type simultaneous confidence intervals based on Student’s t distribution. Repeated. Helmert. The remaining columns are adjusted so that the L matrix is estimable. difference. repeated. Simple.

A profile plot is a line plot in which each point indicates the estimated marginal mean of a dependent variable (adjusted for any covariates) at one level of a factor. All fixed and random factors. GLM Multivariate and GLM Repeated Measures are available only if you have the Advanced Models option installed.331 GLM Univariate Analysis GLM Univariate Profile Plots Figure 22-5 Univariate Profile Plots dialog box Profile plots (interaction plots) are useful for comparing marginal means in your model. A profile plot of one factor shows whether the estimated marginal means are increasing or decreasing across levels. The levels of a second factor can be used to make separate lines. Nonparallel lines indicate an interaction. parallel lines indicate that there is no interaction between factors. For multivariate analyses. profile plots are created for each dependent variable. which means that you can investigate the levels of only one factor. if any. For two or more factors. are available for plots. both between-subjects factors and withinsubjects factors can be used in profile plots. Each level in a third factor can be used to create a separate plot. In a repeated measures analysis. .

factors for separate lines and separate plots. GLM Univariate Post Hoc Multiple Comparisons for Observed Means Figure 22-7 Univariate Post Hoc Multiple Comparisons for Observed Means dialog box . optionally. the plot must be added to the Plots list.332 Chapter 22 Figure 22-6 Nonparallel plot (left) and parallel plot (right) After a plot is specified by selecting factors for the horizontal axis and.

Gabriel. The last category is the default control category. To test whether the mean at any level of the factor is smaller than that of the control category. but the Studentized maximum modulus is used. you can choose the first category. if there is more than one dependent variable.333 GLM Univariate Analysis Post hoc multiple comparison tests. based on Student’s t statistic. Gabriel’s pairwise comparisons test also uses the Studentized maximum modulus and is generally more powerful than Hochberg’s GT2 when the cell sizes are unequal. These tests are more powerful than Duncan’s multiple range test and Student-Newman-Keuls (which are also multiple step-down procedures). the post hoc tests are performed for each dependent variable separately. The Bonferroni and Tukey’s honestly significant difference tests are commonly used multiple comparison tests. Tukey’s honestly significant difference test uses the Studentized range statistic to make all pairwise comparisons between groups and sets the experimentwise error rate to the error rate for the collection for all pairwise comparisons. For GLM Multivariate and GLM Repeated Measures. Gabriel’s test may become liberal when the cell sizes vary greatly. select > Control. The Bonferroni test. . Ryan. These tests are used for fixed between-subjects factors only. Einot. For a small number of pairs. If all means are not equal. Once you have determined that differences exist among the means. and Welsch (R-E-G-W) developed two multiple step-down range tests. subsets of means are tested for equality. Usually. When testing a large number of pairs of means. GLM Multivariate and GLM Repeated Measures are available only if you have the Advanced option installed. Tukey’s honestly significant difference test is more powerful than the Bonferroni test. Bonferroni is more powerful. Sidak’s t test also adjusts the significance level and provides tighter bounds than the Bonferroni test. but they are not recommended for unequal cell sizes. Tukey’s test is more powerful. to test whether the mean at any level of the factor is larger than that of the control category. To test that the mean at any level (except the control category) of the factor is not equal to that of the control category. R-E-G-W F is based on an F test and R-E-G-W Q is based on the Studentized range. use a two-sided test. Hochberg’s GT2 is similar to Tukey’s honestly significant difference test. Comparisons are made on unadjusted values. You can also choose a two-sided or onesided test. Alternately. Multiple step-down procedures first test whether all means are equal. these tests are not available if there are no between-subjects factors. select < Control. adjusts the observed significance level for the fact that multiple comparisons are made. Likewise. Dunnett’s pairwise multiple comparison t test compares a set of treatments against a single control mean. In GLM Repeated Measures. post hoc range tests and pairwise multiple comparisons can determine which means differ.

Tukey’s b. and Scheffé’s test are both multiple comparison tests and range tests. Duncan. Bonferroni. Student-Newman-Keuls (S-N-K). Games and Howell. Gabriel’s test. Games-Howell pairwise comparison test (sometimes liberal). or Dunnett’s C (pairwise comparison test based on the Studentized range). Tukey’s honestly significant difference test. . The disadvantage of this test is that no attempt is made to adjust the observed significance level for multiple comparisons. and Dunnett’s T3. Tests displayed. Hochberg’s GT2. Dunnett’s C. Pairwise comparisons are provided for LSD. The significance level of the Scheffé test is designed to allow all possible linear combinations of group means to be tested. use Tamhane’s T2 (conservative pairwise comparisons test based on a t test). and Waller. Homogeneous subsets for range tests are provided for S-N-K. R-E-G-W F. Duncan’s multiple range test. Tamhane’s T2 and T3. The Waller-Duncan t test uses a Bayesian approach. and Tukey’s b are range tests that rank group means and compute a range value. The least significant difference (LSD) pairwise multiple comparison test is equivalent to multiple individual t tests between all pairs of groups. The result is that the Scheffé test is often more conservative than other tests. Dunnett’s T3 (pairwise comparison test based on the Studentized maximum modulus). Sidak. These tests are not used as frequently as the tests previously discussed. R-E-G-W Q.334 Chapter 22 When the variances are unequal. not just pairwise comparisons available in this feature. This range test uses the harmonic mean of the sample size when the sample sizes are unequal. which means that a larger difference between means is required for significance.

335 GLM Univariate Analysis

**GLM Univariate Save
**

Figure 22-8 Univariate Save dialog box

You can save values predicted by the model, residuals, and related measures as new variables in the Data Editor. Many of these variables can be used for examining assumptions about the data. To save the values for use in another SPSS session, you must save the current data file.

Predicted Values. The values that the model predicts for each case. Unstandardized predicted values and the standard errors of the predicted values are available. If a WLS variable was chosen, weighted unstandardized predicted values are available. Diagnostics. Measures to identify cases with unusual combinations of values for the independent variables and cases that may have a large impact on the model. Available are Cook’s distance and uncentered leverage values. Residuals. An unstandardized residual is the actual value of the dependent variable minus the value predicted by the model. Standardized, Studentized, and deleted residuals are also available. If a WLS variable was chosen, weighted unstandardized residuals are available. Save to New File. Writes an SPSS data file containing a variance-covariance matrix of the parameter estimates in the model. Also, for each dependent variable, there will be a row of parameter estimates, a row of significance values for the t statistics corresponding to the parameter estimates, and a row of residual degrees of freedom.

336 Chapter 22

For a multivariate model, there are similar rows for each dependent variable. You can use this matrix file in other procedures that read an SPSS matrix file.

**GLM Univariate Options
**

Figure 22-9 Univariate Options dialog box

Optional statistics are available from this dialog box. Statistics are calculated using a fixed-effects model.

Estimated Marginal Means. Select the factors and interactions for which you want estimates of the population marginal means in the cells. These means are adjusted for the covariates, if any.

n Compare main effects. Provides uncorrected pairwise comparisons among

estimated marginal means for any main effect in the model, for both between- and within-subjects factors. This item is available only if main effects are selected under the Display Means for list.

n Confidence interval adjustment. Select least significant difference (LSD),

Bonferroni, or Sidak adjustment to the confidence intervals and significance. This item is available only if Compare main effects is selected.

337 GLM Univariate Analysis

Display. Select Descriptive statistics to produce observed means, standard deviations, and counts for all of the dependent variables in all cells. Estimates of effect size gives a partial eta-squared value for each effect and each parameter estimate. The etasquared statistic describes the proportion of total variability attributable to a factor. Select Observed power to obtain the power of the test when the alternative hypothesis is set based on the observed value. Select Parameter estimates to produce the parameter estimates, standard errors, t tests, confidence intervals, and the observed power for each test. Select Contrast coefficient matrix to obtain the L matrix.

Homogeneity tests produces the Levene test of the homogeneity of variance for each

dependent variable across all level combinations of the between-subjects factors, for between-subjects factors only. The spread-versus-level and residual plots options are useful for checking assumptions about the data. This item is disabled if there are no factors. Select Residual plots to produce an observed-by-predicted-by-standardized residuals plot for each dependent variable. These plots are useful for investigating the assumption of equal variance. Select Lack of fit to check if the relationship between the dependent variable and the independent variables can be adequately described by the model. General estimable function allows you to construct custom hypothesis tests based on the general estimable function. Rows in any contrast coefficient matrix are linear combinations of the general estimable function.

Significance level. You might want to adjust the significance level used in post hoc tests and the confidence level used for constructing confidence intervals. The specified value is also used to calculate the observed power for the test. When you specify a significance level, the associated level of the confidence intervals is displayed in the dialog box.

**UNIANOVA Command Additional Features
**

The SPSS command language also allows you to:

n Specify nested effects in the design (using the DESIGN subcommand). n Specify tests of effects versus a linear combination of effects or a value (using the TEST subcommand). n Specify multiple contrasts (using the CONTRAST subcommand). n Include user-missing values (using the MISSING subcommand). n Specify EPS criteria (using the CRITERIA subcommand).

338 Chapter 22

n Construct a custom L matrix, M matrix, or K matrix (using the LMATRIX, MMATRIX, and KMATRIX subcommands). n For deviation or simple contrasts, specify an intermediate reference category (using the CONTRAST subcommand). n Specify metrics for polynomial contrasts (using the CONTRAST subcommand). n Specify error terms for post hoc comparisons (using the POSTHOC subcommand). n Compute estimated marginal means for any factor or factor interaction among the factors in the factor list (using the EMMEANS subcommand). n Specify names for temporary variables (using the SAVE subcommand). n Construct a correlation matrix data file (using the OUTFILE subcommand). n Construct a matrix data file that contains statistics from the between-subjects ANOVA table (using the OUTFILE subcommand). n Save the design matrix to a new data file (using the OUTFILE subcommand).

Chapter

23

Bivariate Correlations

The Bivariate Correlations procedure computes Pearson’s correlation coefficient, Spearman’s rho, and Kendall’s tau-b with their significance levels. Correlations measure how variables or rank orders are related. Before calculating a correlation coefficient, screen your data for outliers (which can cause misleading results) and evidence of a linear relationship. Pearson’s correlation coefficient is a measure of linear association. Two variables can be perfectly related, but if the relationship is not linear, Pearson’s correlation coefficient is not an appropriate statistic for measuring their association.

Example. Is the number of games won by a basketball team correlated with the average number of points scored per game? A scatterplot indicates that there is a linear relationship. Analyzing data from the 1994–1995 NBA season yields that Pearson’s correlation coefficient (0.581) is significant at the 0.01 level. You might suspect that the more games won per season, the fewer points the opponents scored. These variables are negatively correlated (–0.401), and the correlation is significant at the 0.05 level. Statistics. For each variable: number of cases with nonmissing values, mean, and standard deviation. For each pair of variables: Pearson’s correlation coefficient, Spearman’s rho, Kendall’s tau-b, cross-product of deviations, and covariance. Data. Use symmetric quantitative variables for Pearson’s correlation coefficient and quantitative variables or variables with ordered categories for Spearman’s rho and Kendall’s tau-b. Assumptions. Pearson’s correlation coefficient assumes that each pair of variables is bivariate normal.

339

340 Chapter 23

Sample Output

Figure 23-1 Bivariate Correlations output

Correlations Number of Games Won Pearson Correlation Number of Games Won Scoring Points Per Game Defense Points Per Game Significance (2-tailed) Number of Games Won Scoring Points Per Game Defense Points Per Game N Number of Games Won Scoring Points Per Game Defense Points Per Game **. Correlation at 0.01(2-tailed):... *. Correlation at 0.05(2-tailed):... 1.000 Scoring Points Per Game .581** Defense Points Per Game -.401*

.581**

1.000

.457*

-.401*

.457*

1.000

.

.001

.038

.001

.

.017

.038

.017

.

27

27

27

27

27

27

27

27

27

341 Bivariate Correlations

**To Obtain Bivariate Correlations
**

From the menus choose: Analyze Correlate Bivariate... Figure 23-2 Bivariate Correlations dialog box

Select two or more numeric variables.

**The following options are also available:
**

n Correlation Coefficients. For quantitative, normally distributed variables, choose the Pearson correlation coefficient. If your data are not normally distributed or have ordered categories, choose Kendall’s tau-b or Spearman, which measure the

association between rank orders. Correlation coefficients range in value from –1 (a perfect negative relationship) and +1 (a perfect positive relationship). A value of 0 indicates no linear relationship. When interpreting your results, be careful not to draw any cause-and-effect conclusions due to a significant correlation.

n Test of Significance. You can select two-tailed or one-tailed probabilities. If the direction of association is known in advance, select One-tailed. Otherwise, select Two-tailed. n Flag significant correlations. Correlation coefficients significant at the 0.05 level

are identified with a single asterisk, and those significant at the 0.01 level are identified with two asterisks.

342 Chapter 23

**Bivariate Correlations Options
**

Figure 23-3 Bivariate Correlations Options dialog box

**Statistics. For Pearson correlations, you can choose one or both of the following:
**

n Means and standard deviations. Displayed for each variable. The number of cases

with nonmissing values is also shown. Missing values are handled on a variableby-variable basis regardless of your missing values setting.

n Cross-product deviations and covariances. Displayed for each pair of variables. The

cross-product of deviations is equal to the sum of the products of mean-corrected variables. This is the numerator of the Pearson correlation coefficient. The covariance is an unstandardized measure of the relationship between two variables, equal to the cross-product deviation divided by N–1.

Missing Values. You can choose one of the following:

n Exclude cases pairwise. Cases with missing values for one or both of a pair of

variables for a correlation coefficient are excluded from the analysis. Since each coefficient is based on all cases that have valid codes on that particular pair of variables, the maximum information available is used in every calculation. This can result in a set of coefficients based on a varying number of cases.

n Exclude cases listwise. Cases with missing values for any variable are excluded

from all correlations.

343 Bivariate Correlations

**CORRELATIONS and NONPAR CORR Command Additional Features
**

The SPSS command language also allows you to:

n Write a correlation matrix for Pearson correlations that can be used in place of raw data to obtain other analyses such as factor analysis (with the MATRIX

subcommand).

n Obtain correlations of each variable on a list with each variable on a second list (using the keyword WITH on the VARIABLES subcommand).

See the SPSS Syntax Reference Guide for complete syntax information.

Chapter

24

Partial Correlations

The Partial Correlations procedure computes partial correlation coefficients that describe the linear relationship between two variables while controlling for the effects of one or more additional variables. Correlations are measures of linear association. Two variables can be perfectly related, but if the relationship is not linear, a correlation coefficient is not an appropriate statistic for measuring their association.

Example. Is there a correlation between birth rate and death rate? An ordinary correlation reveals a significant correlation coefficient (0.367) at the 0.01 level. However, when you take into effect (or control for) an economic measure, birth rate and death rate are no longer significantly correlated. The correlation coefficient drops to 0.1003 (with a p value of 0.304). Statistics. For each variable: number of cases with nonmissing values, mean, and standard deviation. Partial and zero-order correlation matrices, with degrees of freedom and significance levels. Data. Use symmetric, quantitative variables. Assumptions. The Partial Correlations procedure assumes that each pair of variables is bivariate normal.

345

346 Chapter 24

Sample Output

Figure 24-1 Partial Correlations output

--- PARTIAL CORRELATION COEFFICIENTS --Zero Order Partials BIRTH_RT DEATH_RT LOG_GDP

BIRTH_RT 1.0000 .3670 -.7674 ( 0) ( 106) ( 106) P= . P= .000 P= .000 DEATH_RT .3670 ( 106) ( 0) P= .000 P= . 1.0000 -.4015 ( 106) P= .000

LOG_GDP -.7674 -.4015 1.0000 ( 106) ( 106) ( 0) P= .000 P= .000 P= . (Coefficient / (D.F.) / 2-tailed Significance) " . " is printed if a coefficient cannot be computed

--- PARTIAL CORRELATION COEFFICIENTS --Controlling for.. LOG_GDP

BIRTH_RT DEATH_RT BIRTH_RT 1.0000 .1003 ( 0) ( 105) P= . P= .304 DEATH_RT .1003 ( 105) ( 0) P= .304 P= . 1.0000

(Coefficient / (D.F.) / 2-tailed Significance) " . " is printed if a coefficient cannot be computed

select Two-tailed. . coefficients significant at the 0.. You can select two-tailed or one-tailed probabilities. This setting affects both partial and zero-order correlation matrices. The following options are also available: n Test of Significance. Figure 24-2 Partial Correlations dialog box Select two or more numeric variables for which partial correlations are to be computed. If you deselect this item. If the direction of association is known in advance. coefficients significant at the 0. By default. Otherwise.347 Partial Correlations To Obtain Partial Correlations From the menus choose: Analyze Correlate Partial. and degrees of freedom are suppressed. the probability and degrees of freedom are shown for each correlation coefficient. select One-tailed. Select one or more numeric control variables..05 level are identified with a single asterisk.01 level are identified with a double asterisk. n Display actual significance level.

Pairwise deletion uses as much of the data as possible. You can choose one or both of the following: n Means and standard deviations. n Zero-order correlations. the number of cases may differ across coefficients. The number of cases with nonmissing values is also shown. . including a control variable. Cases having missing values for any variable. Displayed for each variable.348 Chapter 24 Partial Correlations Options Figure 24-3 Partial Correlations Options dialog box Statistics. a case having missing values for both or one of a pair of variables is not used. A matrix of simple correlations between all variables. including control variables. n Exclude cases pairwise. Missing Values. is displayed. However. For computation of the zero-order correlations on which the partial correlations are based. the degrees of freedom for a particular partial coefficient are based on the smallest number of cases used in the calculation of any of the zeroorder correlations. You can choose one of the following alternatives: n Exclude cases listwise. When pairwise deletion is in effect. are excluded from all computations.

Minkowski. or customized. such as engine size. Sokal and Sneath 1. Example. MPG. Is it possible to measure similarities between pairs of automobiles based on certain characteristics.Chapter 25 Distances This procedure calculates any of a wide variety of statistics measuring either similarities or dissimilarities (distances). for count data. Similarity measures for interval data are Pearson correlation or cosine. Kulczynski 2. Dissimilarity (distance) measures for interval data are Euclidean distance. variance. squared Euclidean distance. phi 4-point correlation. Jaccard. chi-square or phi-square. cluster analysis. to help analyze complex data sets. Chebychev. or dispersion. Sokal and Sneath 4. Anderberg’s D. Lambda. dice. and horsepower? By computing similarities between autos. Sokal and Sneath 2. simple matching. you might consider applying a hierarchical cluster analysis or multidimensional scaling to the similarities to explore the underlying structure. Sokal and Sneath 3. size difference. for binary data. These similarity or distance measures can then be used with other procedures. for binary data. such as factor analysis. Sokal and Sneath 5. Rogers and Tanimoto. Yule’s Q. you can gain a sense of which autos are similar to each other and which are different from each other. Statistics. For a more formal analysis. either between pairs of variables or between pairs of cases. pattern difference. Hamann. Kulczynski 1. or Lance and Williams. Ochiai. shape. Euclidean distance. squared Euclidean distance. 349 . Yule’s Y. block. or multidimensional scaling. Russel and Rao.

. .350 Chapter 25 To Obtain a Distance Matrix From the menus choose: Analyze Correlate Distances. Figure 25-1 Distances dialog box Select at least one numeric variable to compute distances between cases. Select an alternative in the Compute Distances group to calculate proximities either between cases or between variables.. or select at least two numeric variables to compute distances between variables.

range –1 to 1. maximum magnitude of 1.) The Transform Values group allows you to standardize data values for either cases or variables before computing proximities. They are applied after the distance measure has been computed. count. or standard deviation of 1. squared Euclidean distance. Euclidean distance. Minkowski. squared Euclidean distance. . by data type. mean of 1. pattern difference. select one of the measures that corresponds to that type of data. Chebychev. Available measures. n Count data. variance. Available options are absolute values. change sign. from the drop-down list. are: n Interval data. or customized. Distances will ignore all other values. shape. The Transform Measures group allows you to transform the values generated by the distance measure. range 0 to 1.351 Distances Distances Dissimilarity Measures Figure 25-2 Distances Dissimilarity Measures dialog box From the Measure group. or binary). n Binary data. block. Chi-square measure or phi-square measure. (Enter values for Present and Absent to specify which two values are meaningful. These transformations are not applicable to binary data. size difference. or Lance and Williams. select the alternative that corresponds to your type of data (interval. then. and rescale to 0–1 range. Euclidean distance. Available standardization methods are z scores.

from the drop-down list. Ochiai. Available options are absolute values. Dice. Yule’s Y. by data type. Lambda. simple matching. The Transform Measures group allows you to transform the values generated by the distance measure. Rogers and Tanimoto. change sign. n Binary data. Russell and Rao.352 Chapter 25 Distances Similarity Measures Figure 25-3 Distances Similarity Measures dialog box From the Measure group. They are applied after the distance measure has been computed. Hamann. Available measures. are: n Interval data. . phi 4-point correlation. Sokal and Sneath 3. or dispersion.) The Transform Values group allows you to standardize data values for either cases or variables before computing proximities. Sokal and Sneath 4. mean of 1. Kulczynski 1. then. range –1 to 1. Yule’s Q. Anderberg’s D. Jaccard. (Enter values for Present and Absent to specify which two values are meaningful. and standard deviation of 1. select the alternative that corresponds to your type of data (interval or binary). Sokal and Sneath 2. range 0 to 1. and rescale to 0–1 range. Kulczynski 2. These transformations are not applicable to binary data. Sokal and Sneath 1. select one of the measures that corresponds to that type of data. Sokal and Sneath 5. maximum magnitude of 1. Available standardization methods are z scores. Distances will ignore all other values. Pearson correlation or cosine.

and residuals. 353 . and leverage values). partial plots. major field of study. R2. Cook. tolerance. Data. standard error of the estimate. The number of games won and the average number of points scored by the opponent are also linearly related. multiple R. predicted values. variance inflation factor. you can model the relationship of these variables. For example. or region of residence. correlation matrix. that best predict the value of the dependent variable. With linear regression. DfBeta. 95% confidence intervals for each regression coefficient. For each model: regression coefficients. DfFit. Statistics. such as religion. and years of experience. prediction intervals. and standard deviation. distance measures (Mahalanobis. part and partial correlations. change in R2. you can try to predict a salesperson’s total yearly sales (the dependent variable) from independent variables such as age. variance-covariance matrix.Chapter 26 Linear Regression Linear Regression estimates the coefficients of the linear equation. adjusted R2. the average number of points scored by the opponent decreases. Categorical variables. mean. Example. and normal probability plots. Plots: scatterplots. and casewise diagnostics. These variables have a negative relationship. need to be recoded to binary (dummy) variables or other types of contrast variables. education. Durbin-Watson test. As the number of games won increases. Also. For each variable: number of valid cases. Is the number of games won by a basketball team in a season related to the average number of points the team scores per game? A scatterplot indicates that these variables are linearly related. A good model can be used to predict how many games teams will win. histograms. involving one or more independent variables. analysis-ofvariance table. The dependent and independent variables should be quantitative.

Sample Output Figure 26-1 Linear Regression output 70 60 Number of Games Won 50 40 30 20 10 90 100 110 120 Scoring Points Per Game 70 60 Number of Games Won 50 40 30 20 10 80 90 100 110 120 Defense Points Per Game . The variance of the distribution of the dependent variable should be constant for all values of the independent variable. The relationship between the dependent variable and each independent variable should be linear. For each value of the independent variable.354 Chapter 26 Assumptions. the distribution of the dependent variable must be normal. and all observations should be independent.

394 df F 105.000 Mean Square 2 24 26 2040.40 1. .889 4.355 Linear Regression Model Summary 3.898 . vars: (constant) Defense Points Per Game. Scoring Points Per 1. Error of the Estimate . All requested variables entered.. Dependent Variable: Number of Games Won 4. 2. Method: Enter ANOVA 2 Sum of Squares Model 1 Regression Residual Total 4080... vars: (constant) Defense Points Per Game.947 .0001 1..4 Variables Entered Model 1 Defense Points Per Game. Scoring Points Per Game. 3. Scoring Points Per Game. Indep.266 19.198 Significance . Dependent Variable: Number of Games Won Coefficients1 . 2. Indep.533 465.467 4546.2 Game Removed R R Square Adjusted R Square Std.

.0 Standardized Residual .5 0.0 1.0 -.0 -1.5 -2.5 -1..5 1. Figure 26-2 Linear Regression dialog box .356 Chapter 26 2.0 10 20 30 40 50 60 70 Number of Games Won To Obtain a Linear Regression Analysis From the menus choose: Analyze Regression Linear.

Forward variable selection enters the variables in the block one at a time based on entry criteria. To enter the variables in the block in a single step. Forward. This is a forward stepwise procedure. Stepwise variable entry and removal examines the variables in the block at each step for entry or removal. or Backward) is used. select a numeric dependent variable. Therefore. To add a second block of variables to the regression model. you can specify different entry methods for different subsets of variables. regardless of the entry method specified. the significance values are generally invalid when a stepwise method (Stepwise. . you can enter one block of variables into the regression model using stepwise selection and a second block using forward selection. select Remove. you can construct a variety of regression models from the same set of variables. n Choose a selection variable to limit the analysis to a subset of cases having a particular value(s) for this variable. Also. select Enter. n Select a case identification variable for identifying points on plots. The significance values in your output are based on fitting a single model.357 Linear Regression In the Linear Regression dialog box. All variables must pass the tolerance criterion to be entered in the equation. Backward variable elimination enters all of the variables in the block in a single step and then removes them one at a time based on removal criteria. Optionally. However. Linear Regression Variable Selection Methods Method selection allows you to specify how independent variables are entered into the analysis. you can: n Group independent variables into blocks and specify different entry methods for different subsets of variables. For example. The default tolerance level is 0. Select one or more numeric independent variables. Using different methods.0001. click Next. To remove the variables in the block in a single step. All independent variables selected are added to a single regression model. n Click WLS for a weighted least-squares analysis and move a numeric weighting variable into the WLS Weight box. a variable is not entered if it would cause the tolerance of another variable already in the model to drop below the tolerance criterion.

Studentized residuals.358 Chapter 26 Linear Regression Set Rule Figure 26-3 Linear Regression Set Rule dialog box Cases defined by the selection rule are included in the analysis. For example. standardized residuals. You can plot any two of the following: the dependent variable. Linear Regression Plots Figure 26-4 Linear Regression Plots dialog box Plots can aid in the validation of the assumptions of normality. A string value is also permitted. Plots are also useful for detecting outliers. residuals. adjusted predicted values. then only cases for which the selected variable has a value equal to 5 are included in the analysis. The following plots are available: Scatterplots. . After saving them as new variables. and influential cases. linearity. and equality of variances. and 5 for the value. Plot the standardized residuals against the standardized predicted values to check for linearity and equality of variances. and other diagnostics are available in the Data Editor for constructing plots with the independent variables. equals. or Studentized deleted residuals. unusual observations. if you select a variable. predicted values. standardized predicted values. deleted residuals.

If any plots are requested. You can obtain histograms of standardized residuals and normal probability plots comparing the distribution of standardized residuals to a normal distribution. At least two independent variables must be in the equation for a partial plot to be produced. Linear Regression Save Figure 26-5 Linear Regression Save dialog box . Displays scatterplots of residuals of each independent variable and the residuals of the dependent variable when both variables are regressed separately on the rest of the independent variables.359 Linear Regression Produce all partial plots. Standardized Residual Plots. summary statistics are displayed for standardized predicted values and standardized residuals (*ZPRED and *ZRESID).

Saves regression coefficients to a file that you specify. Residuals. Standardized DfBetas and DfFit values are also available along with the covariance ratio. and other statistics useful for diagnostics. Measures to identify cases with unusual combinations of values for the independent variables and cases that may have a large impact on the regression model. residuals. Export model information to XML file. The upper and lower bounds for both mean and individual prediction intervals. SmartScore and future releases of WhatIf? will be able to use this file. The actual value of the dependent variable minus the value predicted by the regression equation. Prediction Intervals. which is the ratio of the determinant of the covariance matrix with a particular case excluded to the determinant of the covariance matrix with all cases included. Exports model information to the specified file.360 Chapter 26 You can save predicted values. Linear Regression Statistics Figure 26-6 Linear Regression Statistics dialog box . The change in the regression coefficients (DfBeta(s)) and predicted values (DfFit) that results from the exclusion of a particular case. Values that the regression model predicts for each case. Influence Statistics. Save to New File. Each selection adds one or more new variables to your active data file. Predicted Values. Distances.

The variables entered and removed from the model are listed. Part and partial correlations. Residuals. and the following goodness-of-fit statistics are displayed: multiple R. and the significance of F change. Estimates displays Regression coefficient B. and partial correlations. A correlation matrix is also displayed. condition indices. t value for B. Displays zero-order. or a covariance matrix. F change. Descriptives. R squared change. Provides the number of valid cases. and an analysis-of-variance table. A correlation matrix with a one-tailed significance level and the number of cases for each correlation are also displayed. Displays the Durbin-Watson test for serial correlation of the residuals and casewise diagnostics for the cases meeting the selection criterion (outliers above n standard deviations). and variance-decomposition proportions are displayed along with variance inflation factors (VIF) and tolerances for individual variables. . the mean. Displays changes in R2 change. part. Confidence intervals displays 95% confidence intervals for each regression coefficient. Covariance matrix displays a variance-covariance matrix of regression coefficients with covariances off the diagonal and variances on the diagonal. standardized coefficient beta. and two-tailed significance level of t. standard error of the estimate.361 Linear Regression The following statistics are available: Regression Coefficients. Collinearity diagnostics. Model fit. Eigenvalues of the scaled and uncentered cross-products matrix. R2 and adjusted R2. and the standard deviation for each variable in the analysis. standard error of B.

Degrees of freedom are based on the minimum pairwise N. with the mean of the variable substituted for missing observations. For example. which is rarely done. You can choose one of the following: n Exclude cases listwise. backward. Variables can be entered or removed from the model depending on either the significance (probability) of the F value or the F value itself. These options apply when either the forward.362 Chapter 26 Linear Regression Options Figure 26-7 Linear Regression Options dialog box The following options are available: Stepping Method Criteria. All cases are used for computations. n Replace with mean. n Exclude cases pairwise. Deselecting this option forces regression through the origin. Cases with complete data for the pair of variables being correlated are used to compute the correlation coefficient on which the regression analysis is based. Only cases with valid values for all variables are included in the analyses. By default. or stepwise variable selection method has been specified. R2 cannot be interpreted in the usual way. the regression model includes a constant term. Missing Values. . Include constant in equation. Some results of regression through the origin are not comparable to results of regression that do include a constant.

You can also save predicted values. You might fit a linear model to the data and check the validity of assumptions and the goodness of fit of the model. If you select Time instead of a variable from the working data file as the independent variable. the 363 . Screen your data graphically to determine how the independent and dependent variables are related (linearly. logarithmic. Statistics. etc. residuals. Example. adjusted R2. The residuals of a good model should be randomly distributed and normal. Models: linear. A separate model is produced for each dependent variable. the Curve Estimation procedure generates a time variable where the length of time between cases is uniform.Chapter 27 Curve Estimation The Curve Estimation procedure produces curve estimation regression statistics and related plots for 11 different curve estimation regression models. power. A fire insurance company conducts a study to relate the amount of damage in serious residential fires to the distance between the closest fire station and the residence. inverse. residuals. the dependent variable should be a timeseries measure. cubic. and prediction intervals. Time-series analysis requires a data file structure in which each case (row) represents a set of observations at a different time and the length of time between cases is uniform. analysis-of-variance table. A scatterplot reveals that the relationship between fire damage and distance to the fire station is linear. For each model: regression coefficients. standard error of the estimate. compound. exponentially. and exponential. quadratic. The dependent and independent variables should be quantitative. If a linear model is used. R2. growth. logistic. predicted values. multiple R.). Data. S-curve. Assumptions. and prediction intervals as new variables. If Time is selected.

LINEAR Analysis of Variance: DF Regression Residuals F = 1 13 Sum of Squares 841.364 Chapter 27 following assumptions should be met.31635 Method.277929 SE B . the distribution of the dependent variable must be normal.76636 5.0000 ..0000 Mean Square 841. The relationship between the dependent variable and the independent variable should be linear.237 Sig T .. MOD_1 LINEAR .525 7.96098 . For each value of the independent variable. Dependent variable.960978 T 12. The variance of the distribution of the dependent variable should be constant for all values of the independent variable.420278 Beta .36546 156.76636 69.92348 .Variables in the Equation -------------------Variable DISTANCE (Constant) B 4. Sample Output Figure 27-1 Curve Estimation output MODEL: MOD_1. DAMAGE Listwise Deletion of Missing Data Multiple R R Square Adjusted R Square Standard Error .919331 10.88616 -------------------.91759 2.0000 The following new variables are being created: Name ERR_1 Label Error for DAMAGE with DISTANCE from CURVEFIT.75098 Signif F = .392748 1. and all observations should be independent.

. Figure 27-2 Curve Estimation dialog box ..365 Curve Estima tion Cost of fire damage 50 40 30 20 Observed 10 0 1 2 3 4 5 6 7 Linear Distance to fire station To Obtain a Curve Estimation From the menus choose: Analyze Regression Curve Estimation.

If your variables appear to be related linearly. A separate model is produced for each dependent variable. you can: n Select a variable for labeling cases in scatterplots. Estimates a constant term in the regression equation. n Display ANOVA table. use a simple linear regression model. you can use the Point Selection tool to display the value of the Case Label variable. S-curve. cubic. plot your data. power. To determine which model to use. n Plot models. Optionally. and exponential. For example. When your variables are not linearly related. When a transformation does not help.366 Chapter 27 Select one or more dependent variables. logistic. If you are unsure which model best fits your data. Displays a summary analysis-of-variance table for each selected model. Plots the values of the dependent variable and each selected model against the independent variable. growth. The following options are also available: n Include constant in equation. The following models are available in the Curve Estimation procedure: linear. you may need a more complicated model. The constant is included by default. quadratic. use an exponential model. try several models and select among them. Select an independent variable (either a variable in the working data file or Time). For each point in the scatterplot. if your data resemble an exponential function. try transforming your data. residuals. A separate chart is produced for each dependent variable. fit your data to that type of model. compound. if the plot resembles a mathematical function you recognize. View a scatterplot of your data. Curve Estimation Models You can choose one or more curve estimation regression models. n Click Save to save predicted values. . and prediction intervals as new variables. logarithmic. inverse.

The estimation period. Predicts values through the specified date. For each selected model you can save predicted values. If you select Time instead of a variable in the working data file as the independent variable. you can specify a forecast period beyond the end of the time series. This can be used to forecast values beyond the last case in the time series. The new variable names and descriptive labels are displayed in a table in the output window. . If no estimation period has been defined. based on the cases in the estimation period. You can choose one of the following alternatives: n Predict from estimation period through last case. you can specify the ending observation (case) number. based on the cases in the estimation period. displayed at the bottom of the dialog box. or observation number. If there are no defined date variables. time. is defined with the Range subdialog box of the Select Cases option on the Data menu. Use the Define Dates option on the Data menu to create date variables. residuals (observed value of the dependent variable minus the model predicted value). Predict Cases.367 Curve Estima tion Curve Estimation Save Figure 27-3 Curve Estimation Save dialog box Save Variables. all cases are used to predict values. Predicts values for all cases in the file. and prediction intervals (upper and lower bounds). n Predict through. The available text boxes for specifying the end of the prediction period are dependent on the currently defined date variables.

.

That is. the function is: D = a * climate + b * urban + c * population + d * gross domestic product per capita If these variables are useful for discriminating between the two climate zones. people in temperate zone countries consume more calories per day than those in the tropics. which looks like the right-hand side of a multiple linear regression equation. however. a set of discriminant functions) based on linear combinations of the predictor variables that provide the best discrimination between the groups. and a greater proportion of the people in the temperate zones are city dwellers. The procedure generates a discriminant function (or. the functions can then be applied to new cases with measurements for the predictor variables but unknown group membership. The functions are generated from a sample of cases for which group membership is known. for more than two groups. and d. using coefficients a. Note: The grouping variable can have more than two values. A researcher wants to combine this information in a function to determine how well an individual can discriminate between the two groups of countries. c.Chapter 28 Discriminant Analysis Discriminant analysis is useful for situations where you want to build a predictive model of group membership based on observed characteristics of each case. Example. The researcher thinks that population size and economic information may also be important. Discriminant analysis allows you to estimate coefficients of the linear discriminant function. The codes for the grouping variable must be integers. b. and you need to specify their minimum and maximum values. On average. the values of D will differ for the temperate and tropic countries. Cases with values outside of these bounds are excluded from the analysis. If you use a stepwise 369 .

Fisher’s function coefficients. For each canonical discriminant function: eigenvalue. The grouping variable must have a limited number of distinct categories. Statistics. separate-groups covariance matrix. unstandardized function coefficients. no case belongs to more than one group) and collectively exhaustive (that is.002 % of Variance 100. Wilks’ lambda for each canonical function. .0 Canonical Correlation . you may find that you do not need to include all four variables in the function. The procedure is most effective when group membership is a truly categorical variable. Wilks’ lambda.0 Cumulative % 100. Independent variables that are nominal must be recoded to dummy or contrast variables. For each step: prior probabilities. For each variable: means. you should consider using linear regression to take advantage of the richer information offered by the continuous variable itself. and within-group variance-covariance matrices should be equal across groups. high IQ versus low IQ).707 Wilks’ Lambda Test of Function(s) 1 Wilks’ Lambda . if group membership is based on values of a continuous variable (for example. all cases are members of a group). Data. coded as integers. Cases should be independent. within-groups covariance matrix. percentage of variance. For each analysis: Box’s M. Assumptions. Predictor variables should have a multivariate normal distribution. Group membership is assumed to be mutually exclusive (that is.370 Chapter 28 variable selection method. within-groups correlation matrix. Sample Output Figure 28-1 Discriminant analysis output Eigenvalues Function 1 Eigenvalue 1.934 df 4 Sig. canonical correlation.499 Chi-square 31. univariate ANOVA. chi-square. total covariance matrix. standard deviations.000 .

Select the independent.) Optionally..107 To Obtain a Discriminant Analysis From the menus choose: Analyze Classify Discriminant. . you can select cases with a selection variable. variables.. (If your grouping variable does not have integer values.082 Functions at Group Centroids Function CLIMATE tropical temperate 1 -. Automatic Recode on the Transform menu will create one that does.371 Discriminant Analysis Structure Matrix Function 1 CALORIES LOG_GDP URBAN LOG_POP . or predictor.986 .869 1.790 . Figure 28-2 Discriminant Analysis dialog box Select an integer-valued grouping variable and click Define Range to specify the categories of interest.488 .

. This provides a mechanism for classifying new cases based on previously existing data or for partitioning your data into training and testing subsets to perform validation on the model generated. Only cases with that value for the selection variable are used to derive the discriminant functions. Cases with values outside of this range are not used in the discriminant analysis but are classified into one of the existing groups based on the results of the analysis. Statistics and classification results are generated for both selected and unselected cases. The minimum and maximum must be integers. in the main dialog box click Select. choose a selection variable. and click Value to enter an integer as the selection value.372 Chapter 28 Discriminant Analysis Define Range Figure 28-3 Discriminant Analysis Define Range dialog box Specify the minimum and maximum value of the grouping value for the analysis. Discriminant Analysis Select Cases Figure 28-4 Discriminant Analysis Set Value dialog box To select cases for your analysis.

and Box’s M. Available matrices of coefficients for independent variables are withingroups correlation matrix. univariate ANOVAs. Available options are Fisher’s classification coefficients and unstandardized coefficients.373 Discriminant Analysis Discriminant Analysis Statistics Figure 28-5 Discriminant Analysis Statistics dialog box Descriptives. separate-groups covariance matrix. Discriminant Analysis Stepwise Method Figure 28-6 Discriminant Analysis Stepwise Method dialog box . and total covariance matrix. Function Coefficients. Available options are means (including standard deviations). within-groups covariance matrix. Matrices.

Display. With Rao’s V. Available alternatives are Use F value and Use probability of F. Discriminant Analysis Classification Figure 28-7 Discriminant Analysis Classification dialog box Prior Probabilities. summary table. Select this option to substitute the mean of an independent variable for a missing value during the classification phase only. Available alternatives are Wilks’ lambda.374 Chapter 28 Method. Enter values for entering and removing variables. you can specify the minimum increase in V for a variable to enter. Available display options are casewise results. Replace missing values with mean. These values are used in classification. Mahalanobis’ distance. or you can let the observed group sizes in your sample determine the probabilities of group membership. Available plot options are combined-groups. and Rao’s V. smallest F ratio. unexplained variance. and leave-oneout classification. F for pairwise distances displays a matrix of pairwise F ratios for each pair of groups. Select the statistic to be used for entering or removing new variables. You can choose to classify cases using a within-groups covariance matrix or a separate-groups covariance matrix. Summary of steps displays statistics for all variables after each step. and territorial map. You can specify equal prior probabilities for all groups. Plots. Criteria. Use Covariance Matrix. separate-groups. . Display.

Available options are predicted group membership (a single variable). and probabilities of group membership given the discriminant scores (one variable for each group). You can also export model information to an XML file. SmartScore and future releases of WhatIf? will be able to use this file.375 Discriminant Analysis Discriminant Analysis Save Figure 28-8 Discriminant Analysis Save dialog box You can add new variables to your active data file. . discriminant scores (one variable for each discriminant function in the solution).

.

Factor analysis can also be used to generate hypotheses regarding causal mechanisms or to screen variables for subsequent analysis (for example. n Five methods of rotation are available. and scores can be saved as variables for further analysis. you can investigate the number of underlying factors and. you can identify what the factors represent conceptually. For example. The factor analysis procedure offers a high degree of flexibility: n Seven methods of factor extraction are available. Factor analysis is often used in data reduction to identify a small number of factors that explain most of the variance observed in a much larger number of manifest variables. to identify collinearity prior to performing a linear regression analysis). that explain the pattern of correlations within a set of observed variables. which can then be used in subsequent analyses. including direct oblimin and promax for nonorthogonal rotations. With factor analysis. you can compute factor scores for each respondent. or factors. What underlying attitudes lead people to respond to the questions on a political survey as they do? Examining the correlations among the survey items reveals that there is significant overlap among various subgroups of items—questions about taxes tend to correlate with each other. questions about military issues correlate with each other. Example. Additionally. in many cases. and so on.Chapter 29 Factor Analysis Factor analysis attempts to identify underlying variables. 377 . n Three methods of computing factor scores are available. you might build a logistic regression model to predict voting behavior based on factor scores.

determinant. eigenvalues. and eigenvalues. including rotated pattern matrix and transformation matrix. factor score coefficient matrix and factor covariance matrix. rotated solution. KaiserMeyer-Olkin measure of sampling adequacy and Bartlett’s test of sphericity. initial solution (communalities. The factor analysis model specifies that variables are determined by common factors (the factors estimated by the model) and unique factors (which do not overlap between observed variables). the computed estimates are based on the assumption that all unique factors are uncorrelated with each other and with the common factors. Categorical data (such as religion or country of origin) are not suitable for factor analysis. The data should have a bivariate normal distribution for each pair of variables. For each factor analysis: correlation matrix of variables. The variables should be quantitative at the interval or ratio level. including significance levels. reproduced correlation matrix. communalities. and percentage of variance explained). unrotated solution. Data. For each variable: number of valid cases. . including anti-image. including factor loadings. and inverse. and standard deviation. for oblique rotations: rotated pattern and structure matrices.378 Chapter 29 Statistics. mean. Assumptions. Plots: Scree plot of eigenvalues and loading plot of first two or three factors. Data for which Pearson correlation coefficients can sensibly be calculated should be suitable for factor analysis. and observations should be independent.

875 .472 24.925 .625 10.000 1.000 Extraction .038 4.174 .686 Analysis N 72 72 72 72 72 72 72 72 72 72 72 Communalities Initial LIFEEXPF 1.825 .000 1.132 births) People who read (%) Birth rate per 1000 people Fertility: average number of kids People living in cities (%) Log (base 10) of GDP_CAP Population increase (% per year)) Birth to death ratio Death rate per 1000 people Log (base 10) of Population 82.205 62.222 18.000 BABYMORT 1.593 22.552 1.504 1.577 8.945 . Deviation 8.697 3.000 LITERACY BIRTH_RT FERTILTY URBAN LOG_GDP POP_INCR B_TO_D DEATH_RT LOG_POP 1.153 Std.272 32.943 .000 1.949 .604 .608 1.292 Extraction Method: Principal Component Analysis.583 3.375 3. .379 Factor Analysis Sample Output Figure 29-1 Factor analysis output Descriptive Statistics Mean Average female life expectancy 72.000 1.156 2.000 1.689 .953 .000 1.738 .313 3.835 .833 Infant mortality (deaths per 1000 live 35.000 1.000 1.

Scree Plot Scree Plot 7 6 5 4 3 2 Eigenvalue 1 0 1 2 3 4 5 6 7 8 9 10 11 Component Number .142 1.172 .421 93.988 .0E-02 4.126 .242 2.525 79.4E-02 1.254 99.405 .561 1.435 Rotation Sums of Squared Loadings Total 6.108 2.495 % of Variance 56.685 8.750 22.5E-02 2.622 99.750 79.000 Extraction Sums of Squared Loadings Total 6.882 100.630 % of Variance 55.124 7.3E-02 % of Variance 56.910 Cumulative % 55.591 .986 5.242 2.935 97.750 22.435 Extraction Method: Principal Component Analysis.435 88.118 Cumulative % 56.660 99.496 98.495 .236 .525 23.685 Cumulative % 56.793 95.372 2.380 Chapter 29 Total Variance Explained Initial Eigenvalues Total Component 1 2 3 4 5 6 7 8 9 10 11 6.633 .222 .750 79.

5 0.226 .327 .931 -.794 -.856 .539 -.969 .0 population increase Component 2 -. Component Plot in Rotated Space Component Plot in Rotated Space 1. Rotation Method: Varimax with Kaiser Normalization.982 .561 .614 .982 Extraction Method: Principal Component Analysis. Rotation Method: Varimax with Kaiser Normalization.0 -1.741 -.469 .0 -.847 -.476 . Extraction Method: Principal Component Analysis.0 .381 Factor Analysis Rotated Component Matrix Component 1 BIRTH_RT FERTILTY LITERACY LIFEEXPF BABYMORT POP_INCR LOG_GDP URBAN DEATH_RT B_TO_D LOG_POP .5 1.520 2 Component Transformation Matrix 1 Component 1 2 .880 -.853 .5 log (base 10) of pop infant mortality (de death rate per 1000 -1.469 -.190 .190 2 -.0 Component 1 .5 log (base 10) of gdp people who read (%) fertility: average n birth rate per 100 0.0 birth to death ratio people living in cit average female life .827 .

Select the variables for the factor analysis.. Figure 29-2 Factor Analysis dialog box Factor Analysis Select Cases Figure 29-3 Factor Analysis Set Value dialog box ..382 Chapter 29 To Obtain a Factor Analysis From the menus choose: Analyze Data Reduction Factor.

reproduced. The available options are coefficients. and anti-image. and number of valid cases for each variable. Initial solution displays initial communalities. and the percentage of variance explained. significance levels. determinant. Only cases with that value for the selection variable are used in the factor analysis. inverse. . eigenvalues. choose a selection variable and click Value to enter an integer as the selection value. Factor Analysis Descriptives Figure 29-4 Factor Analysis Descriptives dialog box Statistics. Univariate statistics include the mean.383 Factor Analysis To select cases for your analysis. standard deviation. Correlation Matrix. KMO and Bartlett’s test of sphericity.

generalized least squares. alpha factoring. You can either retain all factors whose eigenvalues exceed a specified value or retain a specific number of factors.. click Descriptives. . Analyze. Available methods are principal components. Allows you to request the unrotated factor solution and a scree plot of the eigenvalues.384 Chapter 29 To Specify Descriptive Statistics and Correlation Coefficients From the menus choose: Analyze Data Reduction Factor. Allows you to specify either a correlation matrix or a covariance matrix. principal axis factoring. Allows you to specify the maximum number of steps the algorithm can take to estimate the solution. In the Factor Analysis dialog box. Allows you to specify the method of factor extraction. Extract. maximum likelihood. Maximum Iterations for Convergence. Factor Analysis Extraction Figure 29-5 Factor Analysis Extraction dialog box Method. and image factoring. Display.. unweighted least squares.

Allows you to select the method of factor rotation. Allows you to specify the maximum number of steps the algorithm can take to perform the rotation. Maximum Iterations for Convergence. Allows you to include output on the rotated solution. In the Factor Analysis dialog box. as well as loading plots for the first two or three factors. and promax.385 Factor Analysis To Specify Extraction Options From the menus choose: Analyze Data Reduction Factor. quartimax.. equamax. . Factor Analysis Rotation Figure 29-6 Factor Analysis Rotation dialog box Method.. Available methods are varimax. Display. click Extraction. direct oblimin.

Display factor score coefficient matrix... To Specify Factor Score Options From the menus choose: Analyze Data Reduction Factor. Select one of the following alternative methods for calculating the factor scores: regression. Shows the coefficients by which variables are multiplied to obtain factor scores. or Anderson-Rubin. .386 Chapter 29 To Specify Rotation Options From the menus choose: Analyze Data Reduction Factor. click Scores. Also shows the correlations between factor scores. click Rotation. Bartlett. Factor Analysis Scores Figure 29-7 Factor Analysis Factor Scores dialog box Save as variables.. Creates one new variable for each factor in the final solution. In the Factor Analysis dialog box.. In the Factor Analysis dialog box.

Allows you to control aspects of the output matrices.. To Specify Factor Analysis Options From the menus choose: Analyze Data Reduction Factor. In the Factor Analysis dialog box. . or replace with mean.387 Factor Analysis Factor Analysis Options Figure 29-8 Factor Analysis Options dialog box Missing Values. The available alternatives are to exclude cases listwise. Coefficient Display Format. click Options. Allows you to specify how missing values are handled. You sort coefficients by size and suppress coefficients with absolute values less than the specified value. exclude cases pairwise..

.

For many applications. n Several methods for cluster formation. in addition to measures for choosing between cluster models. and each has options not available in the others. n Ability to save the cluster model to an external XML file. Additionally. Hierarchical Cluster Analysis. variable transformation. The Hierarchical Cluster Analysis procedure is limited to smaller data files (hundreds of objects to be clustered). n Ability to create cluster models simultaneously based on categorical and continuous variables. the TwoStep Cluster Analysis procedure can analyze large data files. but has the following unique features: n Ability to cluster cases or variables. Each procedure employs a different algorithm for creating clusters. the TwoStep Cluster Analysis procedure will be the method of choice. It provides the following unique features: n Automatic selection of the best number of clusters. n Ability to compute a range of possible solutions and save cluster memberships for each of those solutions. Hierarchical. or K-Means Cluster Analysis procedures.Chapter 30 Choosing a Procedure for Clustering Cluster analyses can be performed using the TwoStep. 389 . then read that file and update the cluster model using newer data. and measuring the dissimilarity between clusters. TwoStep Cluster Analysis.

. the Hierarchical Cluster Analysis procedure can analyze interval (continuous). count. Additionally. The K-Means Cluster Analysis procedure is limited to continuous data and requires you to specify the number of clusters in advance. n Ability to read initial cluster centers from and save final cluster centers to an external SPSS file.390 Chapter 30 As long as all the variables are of the same type. K-Means Cluster Analysis. or binary variables. but it has the following unique features: n Ability to save distances from cluster centers for each object. the K-Means Cluster Analysis procedure is able to analyze large data files.

The procedure produces information criteria (AIC or BIC) by numbers of clusters in the solution. For more information. By comparing the values of a model- choice criterion across different clustering solutions.Chapter 31 TwoStep Cluster Analysis The TwoStep Cluster Analysis procedure is an exploratory tool designed to reveal natural groupings (or clusters) within a data set that would otherwise not be apparent. the procedure can automatically determine the optimal number of clusters. age. The procedure produces bar charts of cluster frequencies. By constructing a cluster features (CF) tree that summarizes the records. These companies tailor their marketing and product-development strategies to each consumer group to increase sales and build brand loyalty. Example. By assuming variables to be independent. income level. and variable importance charts. pie charts of cluster frequencies. the TwoStep algorithm allows you to analyze large data files. gender. a joint multinomial-normal distribution can be placed on categorical and continuous variables. and descriptive statistics by cluster for the final clustering. The algorithm employed by this procedure has several desirable features that differentiate it from traditional clustering techniques: n Handling of categorical and continuous variables. cluster frequencies for the final clustering. Plots. etc. n Automatic selection of number of clusters. Statistics. Retail and consumer-product companies regularly apply clustering techniques to data that describe their customers’ buying habits. see “Assumptions” below. n Scalability. 391 .

The likelihood measure places a probability distribution on the variables. This selection allows you to specify how the number of clusters is to be determined. . Continuous variables are assumed to be normally distributed. n Log-likelihood. using the criterion specified in the Clustering Criterion group. All variables are assumed to be independent. n Determine automatically. n Euclidean. This selection determines how the similarity between two clusters is computed. Optionally. It can be used only when all of the variables are continuous. while categorical variables are assumed to be multinomial. The procedure will automatically determine the “best” number of clusters.392 Chapter 31 Figure 31-1 TwoStep Cluster Analysis dialog box Distance Measure. Number of Clusters. The Euclidean measure is the “straight line” distance between two clusters. enter a positive integer specifying the maximum numbers of clusters that the procedure should consider.

see “TwoStep Cluster Analysis Options” below.. Data. n Means. and each categorical variable is assumed to have a multinomial distribution. . This group provides a summary of the continuous variable standardization specifications made in the Options dialog box. This selection determines how the automatic clustering algorithm determines the number of clusters. Select one or more categorical or continuous variables. each continuous variable is assumed to have a normal (Gaussian) distribution. Tests the independence of two continuous variables. n Crosstabs. Tests the normality of a continuous variable. Cases represent objects to be clustered. Enter a positive integer. n Chi-Square Test. Tests the independence of two categorical variables.393 TwoStep Cluster Analy sis n Specify fixed. n Explore. Further. Tests the independence between a continuous variable and categorical variable. You can use the following procedures to test continuous and categorical procedures: n Bivariate Correlations. Count of Continuous Variables. Clustering Criterion. Allows you to fix the number of clusters in the solution. This procedure works with both continuous and categorical variables. and the variables represent attributes upon which the clustering is based. Either the Bayesian Information Criterion (BIC) or the Akaike Information Criterion (AIC) can be specified. The likelihood distance measure assumes that variables in the cluster model are independent. Tests whether a categorical variable has a specified multinomial distribution. For more information. Assumptions.. Empirical internal testing indicates that the procedure is fairly robust to violations of both the assumption of independence and the distributional assumptions. To Obtain a TwoStep Cluster Analysis From the menus choose: Analyze Classify TwoStep Cluster. but you should try to be aware of how well these assumptions are met.

The CF tree is full if it cannot accept any more cases in a leaf node and no leaf node can be split. memory allocation. .394 Chapter 31 Optionally. n Save model results to the working file or to an external XML file. you can: n Adjust the criteria by which clusters are constructed. variable standardization. n Select settings for noise handling. and cluster model input. This group allows you to treat outliers specially during clustering if the cluster features (CF) tree fills. n Request optional tables and plots. TwoStep Cluster Analysis Options Figure 31-2 TwoStep Cluster Analysis Options dialog box Outlier Treatment.

it will be regrown using a larger distance change threshold. the leaf is not split. the outliers will be placed in the CF tree if possible.” To save some time and computational effort. The outlier cluster is given an identification number of –1 and is not included in the count of the number of clusters. it will be regrown after placing cases in sparse leaves into a “noise” leaf. If not. A leaf is considered sparse if it contains fewer than the specified percentage of cases of the maximum leaf size. . This group allows you to specify the maximum amount of memory in megabytes (MB) that the cluster algorithm should use. the leaf is split. n Consult your system administrator for the largest value that you can specify on your system. the outliers are discarded. n The algorithm may fail to find the correct or desired number of clusters if this value is too low. it will use the disk to store information that will not fit in memory. If the tightness exceeds the threshold. This is the initial threshold used to grow the CF tree. If inserting a given case into a leaf of the CF tree would yield tightness less than the threshold. Memory Allocation.395 TwoStep Cluster Analy sis n If you select noise handling and the CF tree fills. values that cannot be assigned to a cluster are labeled outliers. After the tree is regrown. After final clustering. The maximum number of child nodes that a leaf node can have. n Maximum Branches (per leaf node). Variable standardization. The following clustering algorithm settings apply specifically to the cluster features (CF) tree and should be changed with care: n Initial Distance Change Threshold. you can select any continuous variables that you have already standardized as variables “Assumed Standardized. The clustering algorithm works with standardized continuous variables.” Advanced Options CF Tree Tuning Criteria. If the procedure exceeds this maximum. Any continuous variables that are not standardized should be left as variables “To be Standardized. n If you do not select noise handling and the CF tree fills.

where b is the maximum branches and d is the function ( b maximum tree depth. You must select the variable names in the main dialog box in the same order in which they were specified in the prior analysis. The input file contains the CF tree in XML format. the options pertaining to generation of the CF tree that were specified for the original model are used. The maximum number of levels that the CF tree can have. unless you specifically write the new model information to the same filename. If a cluster model update is specified. Be aware that an overly large CF tree can be a drain on system resources and can adversely affect the performance of the procedure. n Maximum Number of Nodes Possible. If your “new” and “old” sets of cases come from heterogeneous populations. or CF tree tuning criteria settings for the saved model are used. At a minimum. . The XML file remains unaltered. each node requires 16 bytes. see “TwoStep Cluster Analysis Output” below. and any settings for these options in the dialog boxes are ignored. Cluster Model Update. This indicates the maximum number of CF tree nodes that could potentially be generated by the procedure. the means and variances of continuous variables and levels of categorical variables are assumed to be the same across both sets of cases. based on the d+1 – 1 ) ⁄ ( n – 1 ) . This group allows you to import and update a cluster model generated in a prior analysis. Note: When performing a cluster model update. The procedure also assumes that the cases used in the model update come from the same population as the cases used to create the original model. More specifically. memory allocation.396 Chapter 31 n Maximum Tree Depth. The model will then be updated with the data in the active file. For more information. that is. the procedure assumes that none of the selected cases in the working data file were used to create the original cluster model. the distance measure. you should run the TwoStep Cluster Analysis procedure on the combined sets of cases for the best results. noise handling.

showing error bars by cluster ID. n Importance Measure. The output is sorted by the importance rank of each variable. Variable Importance Plot. For each continuous variable. n Rank Variables. showing the category frequency by cluster ID. This option allows you to select which measure of variable importance to plot. a clustered bar chart is produced. For each categorical variable.397 TwoStep Cluster Analy sis TwoStep Cluster Analysis Plots Figure 31-3 TwoStep Cluster Analysis Plots dialog box Within cluster percentage chart. an error bar chart is produced. Chi-square or t-test of significance reports a Pearson chisquare statistic as the importance of a categorical variable and a t statistic as the importance of a continuous variable. Significance reports one minus the p value for . Displays charts showing the within-cluster variation of each variable. This option determines whether plots will be created for each cluster (By cluster) or for each variable (By variable). Cluster pie chart. Displays several different charts showing the importance of each variable within each cluster. Displays a pie chart showing the percentage and counts of observations within each cluster.

n Confidence level. while the information criterion table displays results for a range of cluster solutions. This option allows you to set the confidence level for the test of equality of a variable’s distribution within a cluster versus the variable’s overall distribution. n Descriptives by cluster. The value of the confidence level is shown as a vertical line in the variable importance plots. This group provides options for displaying tables of the clustering results. Displays two tables that describe the variables in each cluster.398 Chapter 31 the test of equality of means for a continuous variable and the expected frequency with the overall data set for a categorical variable. In one table. Specify a number less than 100 and greater than or equal to 50. TwoStep Cluster Analysis Output Figure 31-4 TwoStep Cluster Output dialog box Statistics. n Omit insignificant variables. if the plots are created by variable or if the significance measure is plotted. The descriptive statistics and cluster frequencies are produced for the final cluster model. means and standard deviations are reported for continuous . Variables that are not significant at the specified confidence level are not displayed in the variable importance plots.

SmartScore and future releases of WhatIf? will be able to use this file. The final cluster model and CF tree are two types of output files that can be exported in XML format. This group allows you to save variables to the working data file. n Export final model. where n is a positive integer indicating the ordinal of the working data file save operation completed by this procedure in a given session. If the number of clusters is fixed. n Information criterion (AIC or BIC). for different numbers of clusters. The final cluster model is exported to the specified file. n Cluster frequencies.” . Working Data File. This table is provided only when the number of clusters is being determined automatically. This variable contains a cluster identification number for each case. The other table reports frequencies of categorical variables by cluster. see “TwoStep Cluster Analysis Options. depending on the criterion chosen in the main dialog box. XML Files.399 TwoStep Cluster Analy sis variables by cluster. n Export CF tree. this setting is ignored and the table is not provided. Displays a table that reports the number of observations in each cluster. Displays a table containing the values of the AIC or BIC. The name of this variable is tsc_n. This option allows you to save the current state of the cluster tree and update it later using newer data. For more information about reading this file. n Create cluster membership variable.

.

This can be used to identify segments for marketing. Are there identifiable groups of television shows that attract similar audiences within each group? With hierarchical cluster analysis. Data. You can analyze raw variables or you can choose from a variety of standardizing transformations. Or you can cluster cities (cases) into homogeneous groups so that comparable cities can be selected to test various marketing strategies. or count data. The variables can be quantitative. Agglomeration schedule. Statistics are displayed at each stage to help you select the best solution. Example. binary. you could cluster television shows (cases) into homogeneous groups based on viewer characteristics. Distance or similarity measures are generated by the Proximities procedure. and cluster membership for a single solution or a range of solutions. Plots: dendrograms and icicle plots. If your variables have large differences in scaling (for example. Statistics. Scaling of variables is an important issue—differences in scaling may affect your cluster solution(s). distance (or similarity) matrix. you should consider standardizing them (this can be done automatically by the Hierarchical Cluster Analysis procedure). one variable is measured in dollars and the other is measured in years). 401 . using an algorithm that starts with each case (or variable) in a separate cluster and combines clusters until only one is left.Chapter 32 Hierarchical Cluster Analysis This procedure attempts to identify relatively homogeneous groups of cases (or variables) based on selected characteristics.

547 .484 .370 1. Sample Output Figure 32-1 Hierarchical cluster analysis output Agglomeration Schedule Cluster Combined Cluster 1 Stage 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 11 6 7 6 7 1 6 13 2 1 1 15 1 1 1 Cluster 2 12 11 9 8 10 3 7 14 5 4 2 16 15 6 13 Coefficients .112 .185 .423 .402 Chapter 32 Assumptions.772 Stage Cluster First Appears Cluster 1 0 0 0 2 3 0 4 0 0 6 10 0 11 13 14 Cluster 2 0 1 0 0 0 0 5 0 0 0 9 0 12 7 8 Next Stage 2 4 5 7 7 10 14 15 11 11 13 13 14 15 0 .716 2. Also.132 . The distance or similarity measures used should be appropriate for the data analyzed (see the Proximities procedure for more information on choices of distance and similarity measures). you should include all relevant variables in your analysis.227 . results should be treated as tentative until they are confirmed with an independent sample.438 .691 1. Omission of influential variables can result in a misleading solution.023 1.642 4.274 . Because hierarchical cluster analysis is an exploratory method.

403 Hierarchical Cluster Analysis Cluster Membership Label Case 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 Argentina Brazil Chile Domincan R. Indonesia Austria Canada Denmark Italy Japan Norway Switzerland Bangladesh India Bolivia Paraguay 4 Clusters 1 1 1 1 1 2 2 2 2 2 2 2 3 3 4 4 3 Clusters 1 1 1 1 1 2 2 2 2 2 2 2 3 3 1 1 2 Clusters 1 1 1 1 1 1 1 1 1 1 1 1 2 2 1 1 .

404 Chapter 32 Vertical Icicle 4:Domincan R 13:Banglades Case 12:Switzerlan 16:Paraguay 5:Indonesia Number of clusters 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X XX X X X XX X X XX X X XX X X XX * * * * * * H I E R A R C H I C A L C L U S T E R A N A L Y S I S * * * * * * Dendrogram using Average Linkage (Between Groups) Rescaled Distance Cluster Combine C A S E Label Num LIFEEXPF BABYMORT LITERACY BIRTH_RT FERTILTY URBAN LOG_GDP POP_INCR B_TO_D DEATH_RT LOG_POP 2 5 3 6 10 1 8 4 9 7 11 0 5 10 15 20 25 +---------+---------+---------+---------+---------+ ×à×××××Ý ×Ü Þ×××Ý ×××××××Ü Þ×××××××××××Ý ×à×××××××××Ü Þ×××××××××××××××Ý ×Ü Ø Ø ×××××××××××××××à×××××××Ü Þ×××××××××Ý ×××××××××××××××Ü Ø Ø ×××××××à×××××××××××××××××××××××××Ý Ø Ø ×××××××Ü Þ×××××Ü Ø ×××××××××××××××××××××××××××××××××Ü Ø ×××××××××××××××××××××××××××××××××××××××××××××××××Ü 1:Argentina 8:Denmark 12 11:Norway 15:Bolivia 7:Canada 10:Japan 6:Austria 14:India 2:Brazil 3:Chile 9:Italy 14 13 10 16 15 11 9 7 8 6 5 2 4 3 .

. select at least three numeric variables.405 Hierarchical Cluster Analysis To Obtain a Hierarchical Cluster Analysis From the menus choose: Analyze Classify Hierarchical Cluster. Optionally. .. Figure 32-2 Hierarchical Cluster Analysis dialog box If you are clustering cases. select at least one numeric variable. If you are clustering variables. you can select an identification variable to label cases.

and Yule’s Q. Sokal and Sneath 4. shape. Select the type of data and the appropriate distance or similarity measure: n Interval data. median clustering. Hamann. Kulczynski 1. Chebychev. squared Euclidean distance. lambda. Sokal and Sneath 5. squared Euclidean distance. and customized. Anderberg’s D. nearest neighbor. Ochiai. n Binary data. variance. Minkowski. Pearson correlation. . pattern difference. Russel and Rao. block. Available alternatives are Euclidean distance. phi 4-point correlation. Measure. dice. Yule’s Y. and Ward’s method. within-groups linkage. Allows you to specify the distance or similarity measure to be used in clustering. cosine. n Count data. simple matching. Kulczynski 2. furthest neighbor. Jaccard. size difference. Rogers and Tanimoto. Lance and Williams. dispersion. Available alternatives are between-groups linkage. Sokal and Sneath 2. Available alternatives are chi-square measure and phi-square measure. Sokal and Sneath 3.406 Chapter 32 Hierarchical Cluster Analysis Method Figure 32-3 Hierarchical Cluster Analysis Method dialog box Cluster Method. Available alternatives are Euclidean distance. centroid clustering. Sokal and Sneath 1.

Hierarchical Cluster Analysis Statistics Figure 32-4 Hierarchical Cluster Analysis Statistics dialog box Agglomeration schedule. Cluster Membership. mean of 1. Proximity matrix. and rescale to 0–1 range. and the last cluster level at which a case (or variable) joined the cluster. range –1 to 1. and standard deviation of 1. Gives the distances or similarities between items. Available options are single solution and range of solutions. maximum magnitude of 1.407 Hierarchical Cluster Analysis Transform Values. Allows you to transform the values generated by the distance measure. Allows you to standardize data values for either cases or values before computing proximities (not available for binary data). Available alternatives are absolute values. Available standardization methods are z scores. Displays the cases or clusters combined at each stage. the distances between the cases or clusters being combined. Transform Measures. . Displays the cluster to which each case is assigned at one or more stages in the combination of clusters. change sign. They are applied after the distance measure has been computed. range 0 to 1.

Saved variables can then be used in subsequent analyses to explore other differences between groups. Allows you to save cluster memberships for a single solution or a range of solutions.408 Chapter 32 Hierarchical Cluster Analysis Plots Figure 32-5 Hierarchical Cluster Analysis Plots dialog box Dendrogram. Hierarchical Cluster Analysis Save New Variables Figure 32-6 Hierarchical Cluster Analysis Save dialog box Cluster Membership. Displays a dendrogram. Icicle plots display information about how cases are combined into clusters at each iteration of the analysis. Orientation allows you to select a vertical or horizontal plot. Dendrograms can be used to assess the cohesiveness of the clusters formed and can provide information about the appropriate number of clusters to keep. . Displays an icicle plot. including all clusters or a specified range of clusters. Icicle.

If you want to use another distance or similarity measure. you can specify a variable whose values are used to label casewise output. If your variables are binary or counts. While these statistics are opportunistic (the procedure tries to form groups that do differ). You can select one of two methods for classifying cases. Complete solution: initial cluster centers. However. Distances are computed using simple Euclidean distance. You can save cluster membership. You can specify initial cluster centers if you know this information. and final cluster centers. Optionally. either updating cluster centers iteratively or classifying only. Variables should be quantitative at the interval or ratio level. Data. Each case: cluster information. ANOVA table. distance information. distance from cluster center. using an algorithm that can handle large numbers of cases. Statistics. the relative size of the statistics provides information about each variable’s contribution to the separation of the groups. What are some identifiable groups of television shows that attract similar audiences within each group? With k-means cluster analysis.Chapter 33 K-Means Cluster Analysis This procedure attempts to identify relatively homogeneous groups of cases based on selected characteristics. This can be used to identify segments for marketing. Example. Or you can cluster cities (cases) into homogeneous groups so that comparable cities can be selected to test various marketing strategies. Assumptions. use the Hierarchical Cluster Analysis 409 . use the Hierarchical Cluster Analysis procedure. the algorithm requires you to specify the number of clusters. you could cluster television shows (cases) into k homogeneous groups based on viewer characteristics. You can also request analysis of variance F statistics.

99641 -.12785 -.62725 -.46008 -1.16291 1.42699 .78455 -.69358 -1.99285 -.75481 2.52581 -2.51770 3.89037 . If you have chosen an inappropriate number of clusters or omitted important variables.54314 -1.33278 -1.52182 2.24626 2 -1.41517 -1.08033 .55724 .88606 -3. you should consider standardizing your variables before you perform the k-means cluster analysis (this can be done in the Descriptives procedure).68796 4.89320 .31333 .88983 -1.24070 .53091 4. one variable is expressed in dollars and another is expressed in years).22118 -. your results may be misleading.45741 .16813 2.65246 3 1.03701 -.69589 . Sample Output Figure 33-1 K-means cluster analysis output Initial Cluster Centers Cluster 1 ZURBAN ZLIFEEXP ZLITERAC ZPOP_INC ZBABYMOR ZBIRTH_R ZDEATH_R ZLOG_GDP ZB_TO_D ZFERTILT ZLOG_POP -1.65146 .29624 4 .38422 . In such cases. Scaling of variables is an important consideration—if your variables are measured on different scales (for example.99370 .410 Chapter 33 procedure.40082 .63185 1. The procedure assumes that you have selected the appropriate number of clusters and that you have included all relevant variables.88601 -1. your results may be misleading.76793 -.74406 .93737 4.63185 -1.

77704 -.43210 1.13880 .000 .29856 1.45301 .19154 -.640 2.466 .000 Final Cluster Centers Cluster 1 ZURBAN ZLIFEEXP ZLITERAC ZPOP_INC ZBABYMOR ZBIRTH_R ZDEATH_R ZLOG_GDP ZB_TO_D ZFERTILT ZLOG_POP -1.199 .080 .074 .13716 -.84758 -.83475 2 -.000 .22199 Distances between Final Cluster Centers 1 Cluster 1 2 3 4 5.596 .28417 -.52826 -2.724 .924 2.80817 -.000 .49499 4 .000 .30833 .95175 -.077 .604 .253 .99285 .12929 -.337 .16816 -.897 3.62767 .924 3.195 .623 .13400 .640 7.314 .097 3 3.932 .411 K-Means Cluster Analy sis Iteration History Change in Cluster Centers 1 Iteration 1 2 3 4 5 6 7 8 9 10 1.000 .22286 .343 .627 5.471 .071 .44640 -.15939 .414 .150 .160 .10314 -1.627 3 5.70745 -2.12150 .87669 -.16871 1.80611 .084 .73368 -.185 4 1.249 5.27010 -.167 .246 2 5.59747 2.000 .249 5.51003 .287 .71414 -.30863 -.897 4 7.000 2 2.000 .237 .31319 .81671 1.000 .172 .000 .25622 1.861 .58745 .52607 2.34577 3 .94249 -.246 .000 .45251 1.

.000 .000 .628 17.210 .731 18.614 81.219 .409 19.599 13.234 92.006 The F tests should be used only for descriptive purposes because the clusters have been chosen to maximize the differences among cases in different clusters.167 .313 56.287 .339 30.412 Chapter 33 ANOVA Cluster Mean Square ZURBAN ZLIFEEXP ZLITERAC ZPOP_INC ZBABYMOR ZBIRTH_R ZDEATH_R ZLOG_GDP ZB_TO_D ZFERTILT ZLOG_POP 10.877 df 68 68 68 68 68 68 68 68 68 68 68 F 19.444 .316 18.676 61.000 . The observed significance levels are not corrected for this and thus cannot be interpreted as tests of the hypothesis that the cluster means are equal.859 117.907 df 3 3 3 3 3 3 3 3 3 3 3 Error Mean Square . .541 .000 .229 .457 Sig.428 77.621 19.000 .655 84.000 .000 .000 .239 .464 18.599 16.288 .682 112.829 3.000 .273 4.410 18.000 .168 .

you can select an identification variable to label cases. Select either the Iterate and classify method or the Classify only method.. Figure 33-2 K-Means Cluster Analysis dialog box Select the variables to be used in the cluster analysis.. . Specify the number of clusters. The number of clusters must be at least two and must not be greater than the number of cases in the data file. Optionally.413 K-Means Cluster Analy sis To Obtain a K-Means Cluster Analysis From the menus choose: Analyze Classify K-Means Cluster.

iteration ceases when a complete iteration does not move any of the cluster centers by a distance of more than two percent of the smallest distance between any of the initial cluster centers.414 Chapter 33 K-Means Cluster Analysis Efficiency The k-means cluster analysis command is efficient primarily because it does not compute the distances between all pairs of cases. Convergence criterion. If the criterion equals 0. new cluster centers are calculated after all cases have been assigned. as do many clustering algorithms. and select Classify only as the method. Determines when iteration ceases. take a sample of cases and use the Iterate and classify method to determine cluster centers.0. set Maximum iterations to 1. so it must be greater than 0 but not greater than 1. Allows you to request that cluster centers be updated after each case is assigned. Maximum iterations.02. If you do not select this option. . Use running means. This number must be between 1 and 999. It represents a proportion of the minimum distance between initial cluster centers. Limits the number of iterations in the k-means algorithm. For maximum efficiency. Click Centers and select Write final as File. Click Centers and Read initial from File to classify the entire file using the centers estimated from the sample. for example. Iteration stops after this many iterations even if the convergence criterion is not satisfied. K-Means Cluster Analysis Iterate Figure 33-3 K-Means Cluster Analysis Iterate dialog box These options are available only if you select the Iterate and Classify method from the main dialog box. Then restore the entire data file. including that used by the hierarchical clustering command. To reproduce the algorithm used by the Quick Cluster command prior to version 5.

You can select the following statistics: initial cluster centers. Distance from cluster center. ANOVA table. and cluster information for each case.415 K-Means Cluster Analy sis K-Means Cluster Analysis Save Figure 33-4 K-Means Cluster Analysis Save New Variables dialog box You can save information about the solution as new variables to be used in subsequent analyses: Cluster membership. . K-Means Cluster Analysis Options Figure 33-5 K-Means Cluster Analysis Options dialog box Statistics. Creates a new variable indicating the final cluster membership of each case. Values of the new variable range from 1 to the number of clusters. Creates a new variable indicating the Euclidean distance between each case and its classification center. Available options are Exclude cases listwise or Exclude cases pairwise. Missing Values.

.

Two-Independent-Samples Tests. Tests for Several Related Samples. Compares the distributions of two or more variables. maximum. Friedman’s test. Tests whether the order of occurrence of two values of a variable is random. Quartiles and the mean. Two-Related-Samples Tests. Kendall’s W.Chapter 34 Nonparametric Tests The Nonparametric Tests procedure provides several tests that do not require assumptions about the shape of the underlying distribution: Chi-Square Test. and the Jonckheere-Terpstra test are available. the Median test. The Kruskal-Wallis test. and number of nonmissing cases are available for all of the above tests. One-Sample Kolmogorov-Smirnov Test. minimum. standard deviation. and Cochran’s Q are available. The Wilcoxon signed-rank test. Compares the distributions of two variables. Tests for Several Independent Samples. uniform. 417 . which may be normal. The Mann-Whitney U test. Tabulates a variable into categories and computes a chi-square statistic based on the differences between observed and expected frequencies. and the McNemar test are available. the sign test. Runs Test. Compares the observed cumulative distribution function for a variable with a specified theoretical distribution. Compares two or more groups of cases on one variable. Moses test of extreme reactions. Compares two groups of cases on one variable. or Poisson. Binomial Test. and the Wald-Wolfowitz runs test are available. Compares the observed frequency in each category of a dichotomous variable with expected frequencies from the binomial distribution. the two-sample Kolmogorov-Smirnov test.

Mean. The chi-square test could be used to determine if a bag of jelly beans contains equal proportions of blue. and 15% yellow candies. No more than 20% of the categories should have expected frequencies of less than 5. maximum. The expected frequencies for each category should be at least 1. To convert string variables to numeric variables. and the chi-square statistic. residuals.418 Chapter 34 Chi-Square Test The Chi-Square Test procedure tabulates a variable into categories and computes a chisquare statistic. and quartiles. green. Examples. 30% brown. minimum. 15% red. This goodness-of-fit test compares the observed and expected frequencies in each category to test either that all categories contain the same proportion of values or that each category contains a user-specified proportion of values. 10% green. use the Automatic Recode procedure. Data. Nonparametric tests do not require assumptions about the shape of the underlying distribution. and yellow candies. The number and the percentage of nonmissing and missing cases. red. the number of cases observed and expected for each category. The data are assumed to be a random sample. 20% orange. You could also test to see if a bag of jelly beans contains 5% blue. orange. Use ordered or unordered numeric categorical variables (ordinal or nominal levels of measurement). . standard deviation. Assumptions. Statistics. brown. available on the Transform menu.

8 14.7 33.6 3.0 -.8 18.6 Residual . Color of Jelly Bean Observed N Blue Brown Green Yellow Orange Red Total 6 33 9 17 22 26 113 Expected N 5. 0 Cells .4 .000 1..8 18..0% low freqs 18.2 -9.3 .8 18.3 17.9 11.8 -1.9 -2.2 Test Statistics Color of Jelly Bean Chi-Square df Asymptotic Significance 1 27.6 22.8 18.973 5 .8 3.419 Nonparametric Tests Sample Output Figure 34-1 Chi-Square Test output Color of Jelly Bean Observed N Blue Brown Green Yellow Orange Red Total 6 33 9 17 22 26 113 Expected N 18.8 expected low.3 -.8 18.0 22.8 Residual -12.2 7.

0 Cells .420 Chapter 34 Test Statistics Color of Jelly Bean Chi-Square df Asymptotic Significance 1 1. To Obtain a Chi-Square Test From the menus choose: Analyze Nonparametric Tests Chi-Square. quartiles...959 1. Figure 34-2 Chi-Square Test dialog box Select one or more test variables.041 5 . . Each variable produces a separate test.. and control of the treatment of missing data. Optionally.0% low freqs 5..7 expected low. you can click Options for descriptive statistics.

Displays the mean. 5. For example. Each time you add a value. and 4/16. You can choose one or both of the following summary statistics: n Descriptive. The first value of the list corresponds to the lowest group value of the test variable. 4 specifies expected proportions of 3/16. and cases with values outside of the bounds are excluded. Categories can have user-specified expected proportions. minimum. Select Values. it appears at the bottom of the value list. enter a value greater than 0 for each category of the test variable. For example. and the last value corresponds to the highest value. if you specify a lowerbound value of 1 and an upperbound value of 4. and then each value is divided by this sum to calculate the proportion of cases expected in the corresponding category. Expected values. Categories are established for each integer value within the inclusive range. a value list of 3. and number of nonmissing cases. standard deviation. click Use specified range and enter integer values for lower and upper bounds. each distinct value of the variable is defined as a category. all categories have equal expected values. Chi-Square Test Options Figure 34-3 Chi-Square Test Options dialog box Statistics. maximum. By default. 4. By default. and click Add. To establish categories within a specific range. 5/16. Elements of the value list are summed. it corresponds to the ascending order of the category values of the test variable. . 4/16. The order of the values is important.421 Nonparametric Tests Chi-Square Test Expected Range and Expected Values Expected range. only the integer values of 1 through 4 are used for the chi-square test.

The probability for the second group will be 1 minus the specified probability for the first group. By default. Mean. you might find that 3/4 of the tosses were heads and that the observed significance level is small (0. Displays values corresponding to the 25th. the coin is probably biased. number of nonmissing cases. a dime is tossed 40 times. n Exclude cases test-by-test. maximum. Binomial Test The Binomial Test procedure compares the observed frequencies of the two categories of a dichotomous variable to the frequencies expected under a binomial distribution with a specified probability parameter. Cases with missing values for any variable are excluded from all analyses.422 Chapter 34 n Quartiles. the probability of a head equals 1/2. n Exclude cases listwise. Based on this hypothesis. NPAR TESTS Command Additional Features (Chi-Square Test) The SPSS command language also allows you to: n Specify different minimum and maximum values or expected frequencies for different variables (with the CHISQUARE subcommand). From the binomial test. minimum. See the SPSS Syntax Reference Guide for complete syntax information.5. n Test the same variable against different expected frequencies or use different ranges (with the EXPECTED subcommand). . When several tests are specified. each test is evaluated separately for missing values. and the outcomes are recorded (heads or tails). the probability parameter for both groups is 0. When you toss a dime. 50th. you can enter a test proportion for the first group. Controls the treatment of missing values.0027). Example. and quartiles. Missing Values. These results indicate that it is not likely that the probability of a head equals 1/2. Statistics. and 75th percentiles. standard deviation. To change the probabilities.

25 1. available on the Transform menu. The cut point assigns cases with values greater than the cut point to one group and the rest of the cases to another group. 0 or 1. Nonparametric tests do not require assumptions about the shape of the underlying distribution. you must specify a cut point.75 . true or false. Based on Z Approximation Head Tail N 30 10 40 Observed Proportion .00 Test Proportion . etc. The data are assumed to be a random sample.50 .0031 Category Coin Group 1 Group 2 Total 1. If the variables are not dichotomous. The variables tested should be numeric and dichotomous.423 Nonparametric Tests Data. Assumptions. To convert string variables to numeric variables. A dichotomous variable is a variable that can take on only two possible values: yes or no. use the Automatic Recode procedure. Sample Output Figure 34-4 Binomial Test output Binomial Test Asymptotic Significance (2-tailed) .

and control of the treatment of missing data. Optionally. quartiles. Binomial Test Options Figure 34-6 Binomial Test Options dialog box .. you can click Options for descriptive statistics.424 Chapter 34 To Obtain a Binomial Test From the menus choose: Analyze Nonparametric Tests Binomial. Figure 34-5 Binomial Test dialog box Select one or more numeric test variables..

number of nonmissing cases. Suppose that 20 people are polled to find out if they would purchase a product. Controls the treatment of missing values. See the SPSS Syntax Reference Guide for complete syntax information. You can choose one or both of the following summary statistics: n Descriptive. A sample with too many or too few runs suggests that the sample is not random. A run is a sequence of like observations. and 75th percentiles. minimum. standard deviation. n Exclude cases test-by-test. Cases with missing values for any variable tested are excluded from all analyses. standard deviation. The runs test can be used to determine if the sample was drawn at random. maximum. When several tests are specified. each test is evaluated separately for missing values. . Missing Values. Displays the mean. maximum. The assumed randomness of the sample would be seriously questioned if all 20 people were of the same gender. n Specify different cut points or probabilities for different variables (with the BINOMIAL subcommand). NPAR TESTS Command Additional Features (Binomial Test) The SPSS command language also allows you to: n Select specific groups (and exclude others) when a variable has more than two categories (with the BINOMIAL subcommand). Examples. Displays values corresponding to the 25th. Runs Test The Runs Test procedure tests whether the order of occurrence of two values of a variable is random. and number of nonmissing cases. n Exclude cases listwise. minimum.425 Nonparametric Tests Statistics. n Test the same variable against different cut points or probabilities (with the EXPECTED subcommand). and quartiles. 50th. Statistics. n Quartiles. Mean.

025 Cases < Test Value Cases >= Test Value Total Cases Number of Runs Z Asymptotic Significance (2-tailed) 1.426 Chapter 34 Data. To convert string variables to numeric variables.00 7 13 20 15 2. available on the Transform menu. The variables must be numeric. Median . Sample Output Figure 34-7 Runs Test output Runs Test Gender Test Value 1 1. Nonparametric tests do not require assumptions about the shape of the underlying distribution. Assumptions. Use samples from continuous probability distributions. use the Automatic Recode procedure.234 .

and cases with values greater than or equal to the cut point are assigned to another group.. median.. You can use either the observed mean. or a specified value as a cut point. quartiles. and control of the treatment of missing data. Cases with values less than the cut point are assigned to one group. or mode. you can click Options for descriptive statistics. Specifies a cut point to dichotomize the variables you have chosen. . Runs Test Cut Point Cut Point.427 Nonparametric Tests To Obtain a Runs Test From the menus choose: Analyze Nonparametric Tests Runs. Optionally. One test is performed for each cut point chosen. Figure 34-8 Runs Test dialog box Select one or more numeric test variables.

each test is evaluated separately for missing values. and number of nonmissing cases. See the SPSS Syntax Reference Guide for complete syntax information. . You can choose one or both of the following summary statistics: n Descriptive. n Exclude cases test-by-test. maximum. Cases with missing values for any variable are excluded from all analyses. and 75th percentiles. Controls the treatment of missing values.428 Chapter 34 Runs Test Options Figure 34-9 Runs Test Options dialog box Statistics. Missing Values. 50th. minimum. n Exclude cases listwise. When several tests are specified. n Test the same variable against different custom cut points (with the RUNS subcommand). standard deviation. Displays values corresponding to the 25th. Displays the mean. NPAR TESTS Command Additional Features (Runs Test) The SPSS command language also allows you to: n Specify different cut points for different variables (with the RUNS subcommand). n Quartiles.

or exponential. standard deviation. and quartiles.429 Nonparametric Tests One-Sample Kolmogorov-Smirnov Test The One-Sample Kolmogorov-Smirnov Test procedure compares the observed cumulative distribution function for a variable with a specified theoretical distribution. uniform. Many parametric tests require normally distributed variables. The Kolmogorov-Smirnov test assumes that the parameters of the test distribution are specified in advance. minimum. the sample mean is the parameter for the Poisson distribution. number of nonmissing cases. Statistics. Data. Example. say income. This procedure estimates the parameters from the sample. This goodness-of-fit test tests whether the observations could reasonably have come from the specified distribution. The Kolmogorov-Smirnov Z is computed from the largest difference (in absolute value) between the observed and theoretical cumulative distribution functions. The sample mean and sample standard deviation are the parameters for a normal distribution. maximum. is normally distributed. Use quantitative variables (interval or ratio level of measurement). . the sample minimum and maximum values define the range of the uniform distribution. Poisson. The onesample Kolmogorov-Smirnov test can be used to test that a variable. which may be normal. and the sample mean is the parameter for the exponential distribution. Mean. Assumptions.

2 20 Mean Std.760 .611 Most Extreme Differences Absolute Positive Negative Kolmogorov-Smirnov Z Asymptotic Significance (2-tailed) 1.170 .40 . Deviation 56250. . Test Distribution is Normal 2.430 Chapter 34 Sample Output Figure 34-10 One-Sample Kolmogorov-Smirnov Test output One-Sample Kolmogorov-Smirnov Test Income N Normal Parameters 1..170 -.00 45146.. Calculated from data To Obtain a One-Sample Kolmogorov-Smirnov Test From the menus choose: Analyze Nonparametric Tests 1-Sample K-S.164 .

quartiles. Displays the mean. You can choose one or both of the following summary statistics: n Descriptive.431 Nonparametric Tests Figure 34-11 One-Sample Kolmogorov-Smirnov Test dialog box Select one or more numeric test variables. . Each variable produces a separate test. and number of nonmissing cases. standard deviation. n Quartiles. Displays values corresponding to the 25th. and control of the treatment of missing data. you can click Options for descriptive statistics. Optionally. maximum. and 75th percentiles. 50th. One-Sample Kolmogorov-Smirnov Test Options Figure 34-12 One-Sample K-S Options dialog box Statistics. minimum.

New dental braces have been developed that are intended to be more comfortable. to look better. random samples. Moses extreme reactions. Two-Independent-Samples Tests The Two-Independent-Samples Tests procedure compares two groups of cases on one variable. and to provide more rapid progress in realigning teeth. those with the new braces did not have to wear the braces as long as those with the old braces. and another 10 are chosen to wear the new braces. number of nonmissing cases. See the SPSS Syntax Reference Guide for complete syntax information. Use numeric variables that can be ordered. and quartiles. you might find that. each test is evaluated separately for missing values. Tests: Mann-Whitney U. n Exclude cases listwise. NPAR TESTS Command Additional Features (One-Sample KolmogorovSmirnov Test) The SPSS command language also allows you to: n Specify the parameters of the test distribution (with the K-S subcommand). When several tests are specified. maximum. Assumptions. Cases with missing values for any variable are excluded from all analyses. The Mann-Whitney U test requires that the two samples tested be similar in shape. n Exclude cases test-by-test. 10 children are randomly chosen to wear the old braces. Use independent. Statistics. . KolmogorovSmirnov Z. From the Mann-Whitney U test. standard deviation. minimum. Mean.432 Chapter 34 Missing Values. Data. To find out if the new braces have to be worn as long as the old braces. Wald-Wolfowitz runs. Example. on average. Controls the treatment of missing values.

90 Sum of Ranks 141.721 .)] 1.433 Nonparametric Tests Sample Output Figure 34-13 Two-Independent-Samples output Ranks Mean Rank 14. Grouping Variable: Type of Braces 14. Not corrected for ties.000 -2. 2.000 69.005 .00 N Time Worn in Days Type of Braces Old Braces New Braces Total 10 10 20 Test Statistics 2 Time Worn in Days Mann-Whitney U Wilcoxon W Z Asymptotic Significance (2-tailed) Exact Significance [2*(1-tailed Sig.10 6.007 1 .00 69.

with the average rank assigned in the case of ties.. the ranks should be . The number of ties should be small relative to the total number of observations. If the populations are identical in location. Four tests are available to test whether two independent samples (groups) come from the same population. It is equivalent to the Wilcoxon rank sum test and the Kruskal-Wallis test for two groups. Figure 34-14 Two-Independent-Samples Tests dialog box Select one or more numeric variables.434 Chapter 34 To Obtain Two-Independent-Samples Tests From the menus choose: Analyze Nonparametric Tests 2 Independent Samples. Two-Independent-Samples Test Types Test Type. The observations from both groups are combined and ranked. Select a grouping variable and click Define Groups to split the file into two groups or samples.. The Mann-Whitney U test is the most popular of the two-independent-samples tests. Mann-Whitney tests that two sampled populations are equivalent in location.

Because chance outliers can easily distort the range of the span. The span of the control group is computed as the difference between the ranks of the largest and smallest values in the control group plus 1. Cases with other values are excluded from the analysis. The Kolmogorov-Smirnov test is based on the maximum absolute difference between the observed cumulative distribution functions for both samples. The Wald-Wolfowitz runs test combines and ranks the observations from both groups. The Moses extreme reactions test assumes that the experimental variable will affect some subjects in one direction and other subjects in the opposite direction. Two-Independent-Samples Tests Define Groups Figure 34-15 Two-Independent-Samples Define Groups dialog box To split the file into two groups or samples. It tests for extreme responses compared to a control group. the two groups should be randomly scattered throughout the ranking. Observations from both groups are combined and ranked. The control group is defined by the group 1 value in the Two-Independent-Samples Define Groups dialog box. W is the rank sum of the group named first in the Two-Independent-Samples Define Groups dialog box. the two distributions are considered different. When this difference is significantly large. The number of times a score from group 1 precedes a score from group 2 and the number of times a score from group 2 precedes a score from group 1 are calculated. The Mann-Whitney U statistic is the smaller of these two numbers. also displayed. If the two samples are from the same population. If both samples have the same number of observations.435 Nonparametric Tests randomly mixed between the two samples. The Kolmogorov-Smirnov Z test and the Wald-Wolfowitz runs test are more general tests that detect differences in both the locations and the shapes of the distributions. . 5% of the control cases are trimmed automatically from each end. is the rank sum of the smaller sample. The Wilcoxon rank sum W statistic. enter an integer value for Group 1 and another for Group 2. This test focuses on the span of the control group and is a measure of how much extreme values in the experimental group influence the span when combined with the control group.

Cases with missing values for any variable are excluded from all analyses. NPAR TESTS Command Additional Features (Two Independent Samples) The SPSS command language also allows you to: n Specify the number of cases to be trimmed for the Moses test (with the MOSES subcommand). Displays the mean. n Quartiles. and the number of nonmissing cases. Displays values corresponding to the 25th. Missing Values. minimum. n Exclude cases test-by-test. When several tests are specified. . You can choose one or both of the following summary statistics: n Descriptive. See the SPSS Syntax Reference Guide for complete syntax information. Controls the treatment of missing values. standard deviation. 50th. maximum.436 Chapter 34 Two-Independent-Samples Tests Options Figure 34-16 Two-Independent-Samples Options dialog box Statistics. and 75th percentiles. each test is evaluated separately for missing values. n Exclude cases listwise.

minimum.80 N Hours Brand Brand A Brand B Brand C Total Test Statistics 1.20 25. Grouping Variable: Brand .50 5. Sample Output Figure 34-17 Tests for Several Independent Samples output Ranks Mean Rank 10 10 10 30 15. The Kruskal-Wallis H test requires that the samples tested be similar in shape. Do three brands of 100-watt lightbulbs differ in the average time the bulbs will burn? From the Kruskal-Wallis one-way analysis of variance. Use numeric variables that can be ordered. you might learn that the three brands do differ in average lifetime. Assumptions. standard deviation.437 Nonparametric Tests Tests for Several Independent Samples The Tests for Several Independent Samples procedure compares two or more groups of cases on one variable. Tests: Kruskal-Wallis H. Mean.000 1. number of nonmissing cases. median. Example.2 Hours Chi-Square df Asymptotic Significance 25.061 2 . Use independent. Kruskal Wallis Test 2. random samples. Data. maximum. and quartiles. Statistics.

The Kruskal-Wallis H test. which is a more general test but not as powerful. Several-Independent-Samples Test Types Test Type. the median test.. The Kruskal-Wallis H test and the median test assume there is no a priori ordering of the k populations from which the samples are drawn. Three tests are available to determine if several independent samples come from the same population. detects distributional differences in location and shape. The median test. Select a grouping variable and click Define Range to specify minimum and maximum integer values for the grouping variable. is the nonparametric analog of one-way analysis of variance and detects differences in distribution location. and the Jonckheere-Terpstra test all test whether several independent samples are from the same population. an extension of the Mann-Whitney U test.438 Chapter 34 To Obtain Tests for Several Independent Samples From the menus choose: Analyze Nonparametric Tests K Independent Samples. Figure 34-18 Tests for Several Independent Samples dialog box Select one or more numeric variables.. The KruskalWallis H test. When there is a natural a priori ordering (ascending or descending) of the k .

enter integer values for minimum and maximum that correspond to the lowest and highest categories of the grouping variable. only the integer values of 1 through 3 are used.439 Nonparametric Tests populations. Tests for Several Independent Samples Define Range Figure 34-19 Several Independent Samples Define dialog box To define the range. the Jonckheere-Terpstra test is more powerful. Here the alternative hypothesis is ordered. Tests for Several Independent Samples Options Figure 34-20 Several Independent Samples Options dialog box . Jonckheere-Terpstra is the most appropriate test to use. if you specify a minimum value of 1 and a maximum value of 3. the magnitude of the response increases. The minimum value must be less than the maximum value. Cases with values outside of the bounds are excluded. For example. The hypothesis that different temperatures produce the same response distribution is tested against the alternative that as the temperature increases. The Jonckheere-Terpstra test is available only if you have installed SPSS Exact Tests. For example. the k populations might represent k increasing temperatures. and both values must be specified. therefore.

n Quartiles. n Exclude cases listwise. Statistics. n Exclude cases test-by-test. You can choose one or both of the following summary statistics. Tests: Wilcoxon signed rank. Although no particular distributions are assumed for the two variables. maximum. Two-Related-Samples Tests The Two-Related-Samples Tests procedure compares the distributions of two variables. 50th. Displays values corresponding to the 25th. Cases with missing values for any variable are excluded from all analyses. do families receive the asking price when they sell their homes? By applying the Wilcoxon signed-rank test to data for 10 homes. Controls the treatment of missing values. In general. and the number of nonmissing cases. one family receives more than the asking price. maximum. Missing Values. each test is evaluated separately for missing values. Assumptions. standard deviation. Mean. and quartiles.440 Chapter 34 Statistics. Use numeric variables that can be ordered. n Descriptive. McNemar. minimum. number of nonmissing cases. the population distribution of the paired differences is assumed to be symmetric. Example. See the SPSS Syntax Reference Guide for complete syntax information. . When several tests are specified. NPAR TESTS Command Additional Features (K Independent Samples) The SPSS command language also allows you to: n Specify a value other than the observed median for the median test (with the MEDIAN subcommand). Data. and two families receive the asking price. you might learn that seven families receive less than the asking price. sign. Displays the mean. minimum. standard deviation. and 75th percentiles.

Wilcoxon Signed Ranks Test -2. Asking Price < Sale Price 2.Sale Price Z Asymptotic Significance (2-tailed) 1.021 .50 4.441 Nonparametric Tests Sample Output Figure 34-21 Two-Related-Samples output Ranks Mean Rank 7 1 1 N Asking Price .50 1. Asking Price = Sale Price Sum of Ranks 34. Asking Price > Sale Price 3.93 1.Sale Price Negative Ranks Positive Ranks Ties Total 1. Based on positive ranks 2.3131 .50 2 23 10 Test Statistics 2 Asking Price .

use the sign test or the Wilcoxon signed-rank test. click the arrow button to move the pair into the Test Pair(s) list. Figure 34-22 Two-Related-Samples Tests dialog box Select one or more pairs of variables. n After you have selected a pair of variables. The appropriate test to use depends on the type of data. If your data are continuous. The tests in this section compare the distributions of two related variables. negative. You may select more pairs of variables. The first variable appears in the Current Selections group as Variable 1. If the two variables are similarly distributed. or tied.442 Chapter 34 To Obtain Two-Related-Samples Tests From the menus choose: Analyze Nonparametric Tests 2 Related Samples. select a pair in the Test Pair(s) list and click the arrow button.. Two-Related-Samples Test Types Test Type. To remove a pair of variables from the analysis. and the second appears as Variable 2. the number of positive and negative differences will not differ . The sign test computes the differences between the two variables for all cases and classifies the differences as either positive. as follows: n Click each of two variables..

This test is useful for detecting changes in responses due to experimental intervention in before-and-after designs. use the McNemar test. standard deviation. Missing Values. Cases with missing values for any variable are excluded from all analyses. This test is typically used in a repeated measures situation. n Quartiles. maximum. Displays the mean. each test is evaluated separately for missing values. The McNemar test determines whether the initial response rate (before the event) equals the final response rate (after the event). . You can choose one or both of the following summary statistics: n Descriptive. 50th. Two-Related-Samples Tests Options Figure 34-23 Two-Related-Samples Options dialog box Statistics. n Exclude cases test-by-test. The marginal homogeneity test is available only if you have installed Exact Tests. Controls the treatment of missing values. use the marginal homogeneity test. When several tests are specified. and 75th percentiles. and the number of nonmissing cases. once before and once after a specified event occurs. If your data are binary. n Exclude cases listwise. Displays values corresponding to the 25th. Because the Wilcoxon signed-rank test incorporates more information about the data. The Wilcoxon signed-rank test considers information about both the sign of the differences and the magnitude of the differences between pairs. it is more powerful than the sign test. If your data are categorical.443 Nonparametric Tests significantly. in which each subject’s response is elicited twice. This is an extension of the McNemar test from binary response to multinomial response. It tests for changes in response using the chi-square distribution and is useful for detecting response changes due to experimental intervention in before-and-after designs. minimum.

and quartiles. Mean. Tests: Friedman. Use numeric variables that can be ordered. Statistics. See the SPSS Syntax Reference Guide for complete syntax information.40 2.50 2. Tests for Several Related Samples The Tests for Several Related Samples procedure compares the distributions of two or more variables.60 . standard deviation. Nonparametric tests do not require assumptions about the shape of the underlying distribution. Assumptions. number of nonmissing cases. minimum.444 Chapter 34 NPAR TESTS Command Additional Features (Two Related Samples) The SPSS command language also allows you to: n Test a variable with each variable on a list. Sample Output Figure 34-24 Tests for Several Related Samples output Ranks Mean Rank Doctor Lawyer Police Teacher 1. a lawyer. and Cochran’s Q. Friedman’s test indicates that the public does in fact associate different amounts of prestige with these four professions.50 3. Does the public associate different amounts of prestige with a doctor. Use dependent. maximum. Data. Example. Kendall’s W. a police officer. and a teacher? Ten people are asked to rank these four occupations in order of prestige. random samples.

Friedman Test 1 10 10..920 3 . Figure 34-25 Tests for Several Related Samples dialog box Select two or more numeric test variables. .445 Nonparametric Tests Test Statistics N Chi-Square df Asymptotic Significance 1..012 To Obtain Tests for Several Related Samples From the menus choose: Analyze Nonparametric Tests K Related Samples.

Kendall’s W is interpretable as the coefficient of concordance. Friedman tests the null hypothesis that k related variables come from the same population. the k variables are ranked from 1 to k. and the number of nonmissing cases. standard deviation. maximum. The Friedman test is the nonparametric equivalent of a one-sample repeated measures design or a two-way analysis of variance with one observation per cell. It is an extension of the McNemar test to the k-sample situation. For each variable. The variables are measured on the same individual or on matched individuals. 50th. and 75th percentiles. Displays the mean. Three tests are available to compare the distributions of several related variables. Kendall’s W is a normalization of the Friedman statistic. Tests for Several Related Samples Statistics Figure 34-26 Several Related Samples Statistics dialog box n Descriptive. the sum of ranks is computed. Kendall’s W ranges between 0 (no agreement) and 1 (complete agreement). The test statistic is based on these ranks. NPAR TESTS Command Additional Features (K Related Samples) See the SPSS Syntax Reference Guide for complete syntax information. Displays values corresponding to the 25th. . For each case.446 Chapter 34 Tests for Several Related Samples Test Types Test Type. minimum. Each case is a judge or rater and each variable is an item or person being judged. Cochran’s Q is identical to the Friedman test but is applicable when all responses are binary. n Quartiles. Cochran’s Q tests the hypothesis that several related dichotomous variables have the same mean. which is a measure of agreement among raters.

you find that due to the deregulation of airlines. Before using either procedure. By perusing a sample of questionnaires. and Other). Further. The first question reads: Circle all airlines you have flown at least once in the last six months on this route—American. TWA. You must use several variables to map responses to each question. you might discover that no user has flown more than three different airlines on this route in the last six months. The other way to map responses is the multiple category method. Other. This is a multiple response question. since the passenger can circle more than one response. One is to define a variable corresponding to each of the choices (for example. American. Example. United. in which you estimate the maximum number of possible responses to the question and set up the same number of variables. USAir. you must define multiple response sets. The flight attendant hands each passenger a brief questionnaire upon boarding. TWA. American Airlines wants to know about its passengers’ use of other airlines on the Chicago-New York route and the relative importance of schedule and service in selecting an airline. This example illustrates the use of multiple response items in a market research survey. An airline might survey passengers flying a particular route to evaluate competing carriers. However. with codes used to specify the airline flown. this question cannot be coded directly because a variable can have only one value for each case. The Multiple Response Frequencies procedure displays frequency tables. Using the 447 . In this example. There are two ways to do this. otherwise 0. United. The Multiple Response Crosstabs procedure displays two. If the passenger circles United.Chapter 35 Multiple Response Analysis Two procedures are available for analyzing multiple dichotomy and multiple category sets. The data are fictitious and should not be interpreted as real. This is a multiple dichotomy method of mapping variables. the variable united is assigned a code of 1. USAir.and three-dimensional crosstabulations. 10 other airlines are named in the Other category.

for which you can obtain frequency tables and crosstabulations. Although either method of mapping is feasible for this survey. Each set must have a unique name. Each variable having at least one occurrence of the counted value becomes a category of the multiple dichotomy set. and click Change. You cannot refer to multiple response set names in other procedures. To remove a set. highlight it on the list. You cannot use the following reserved names: casenum. Enter an integer value for Counted value. Multiple Response Define Sets The Define Multiple Response Sets procedure groups elementary variables into multiple dichotomy and multiple category sets. You can define up to 20 multiple response sets.448 Chapter 35 multiple response method. . The label can be up to 40 characters long. the second has a code of 5. you would define three variables. You can code your elementary variables as dichotomies or categories. The procedure prefixes a dollar sign ($) to the name you assign. 2 = united. If you use the multiple dichotomy method. 3 = twa. the second has a code of 3. the first variable has a code of 1. Thus. you can enter a descriptive variable label for the multiple response set. and so on. To use dichotomous variables. and the third has a missing-value code. If a given passenger circles American and TWA. the method you choose depends on the distribution of responses. and width. Empty categories are not tabulated. The procedure totals each distinct integer value in the inclusive range across all component variables. Select Categories to create a multiple category set having the same range of values as the component variables. 5 = delta. The name of the multiple response set exists only for use in multiple response procedures. time. select Dichotomies to create a multiple dichotomy set. To change a set. and the third a missing-value code. highlight it on the list of multiple response sets and click Remove. Optionally. Another passenger might have circled American and entered Delta. date. on the other hand. sysmis. you end up with 14 separate variables. 4 = usair. Enter integer values for the minimum and maximum values of the range for categories of the multiple category set. each coded as 1 = american. jdate. length. the first variable has a code of 1. modify any set definition characteristics. Each multiple response set must be assigned a unique name of up to seven characters.

define the range of the categories. Click Add to add the multiple response set to the list of defined sets. indicate which value you want to have counted. . If your variables are coded as categories. Figure 35-1 Define Multiple Response Sets dialog box Select two or more variables.. If your variables are coded as dichotomies.. Enter a unique name for each multiple response set.449 Multiple Response Analysis To Define Multiple Response Sets From the menus choose: Analyze Multiple Response Define Sets.

By default. To analyze a multiple response item. if an airline survey asked which of three airlines (American. the values are tabulated by adding the same codes in the elementary variables together. a case is considered missing for a multiple dichotomy set if none of its component variables contains the counted value. 448). For example. variable names are used as labels. You must first define one or more multiple response sets (see “Multiple Response Define Sets” on p. Missing Values. each of the three variables in the set would become a category of the group variable. a case is considered missing for a multiple category set only if none of its components has valid values within the defined range. If you discover that no respondent mentioned more than two airlines. category labels come from the value labels of the first variable in the group. If you define a multiple category set. United. one for each airline. By default. Example. Excludes cases with missing values for any variable from tabulation of the multiple category set. The resulting set of values is the same . you can choose one or both of the following: n Exclude cases listwise within dichotomies. Cases with missing values are excluded on a table-by-table basis. you must combine the variables into one of two types of multiple response sets: a multiple dichotomy set or a multiple category set. define a value label for the missing categories. category names shown in the output come from variable labels defined for elementary variables in the group. The counts and percentages for the three airlines are displayed in one frequency table. For multiple category sets. Each variable created from a survey question is an elementary variable. This applies only to multiple response sets defined as dichotomy sets. Cases with missing values for some (but not all) variables are included in the tabulations of the group if at least one variable contains the counted value. Excludes cases with missing values for any variable from the tabulation of the multiple dichotomy set. For multiple dichotomy sets. each having three codes. If categories missing for the first variable are present for other variables in the group. n Exclude cases listwise within categories.450 Chapter 35 Multiple Response Frequencies The Multiple Response Frequencies procedure produces frequency tables for multiple response sets. If the variable labels are not defined. TWA) you have flown in the last six months and you used dichotomous variables and defined a multiple dichotomy set. This applies only to multiple response sets defined as category sets. Alternatively. you could create two variables.

and number of missing cases. The Multiple Response Define Sets procedure allows you to define multiple response sets. The counts and percentages for the three airlines are displayed in one frequency table.0 ----137.451 Multiple Response Analysis as those for each of the elementary variables. 30 responses for United are the sum of the 5 United responses for airline 1 and the 25 United responses for airline 2. Related procedures.. 81 valid cases To Obtain Multiple Response Frequencies From the menus choose: Analyze Multiple Response Frequencies. .6 5.. Sample Output Figure 35-2 Multiple Response Frequencies output Group $AIRDICH (Value tabulated = 1) Pct of Pct of Responses Cases 67. Assumptions.6 7. percentages of cases. Statistics.0 Dichotomy label American TWA United Name AMERICAN TWA UNITED Total responses Count 75 6 30 ------111 19 missing cases.0 92. number of valid cases. Use multiple response sets.4 37.0 ----100. For example. The counts and percentages provide a useful description for data from any distribution.4 27. Data. percentages of responses. Frequency tables displaying counts.

An airline passenger survey asks passengers for the following information: “Circle all of the following airlines you have flown at least once in the last six months (American. The procedure displays category labels for columns on three lines. Multiple Response Crosstabs The Multiple Response Crosstabs procedure crosstabulates defined multiple response sets. United. If categories missing for the first variable are present for other variables in the group. For multiple category sets. If the variable labels are not defined. define a value label for the missing categories. or get paired crosstabulations. category labels come from the value labels of the first variable in the group. To avoid splitting words. Example. variable names are used as labels. modify the handling of missing values. TWA). with up to eight characters per line.452 Chapter 35 Figure 35-3 Multiple Response Frequencies dialog box Select one or more multiple response sets. elementary variables. 449). For multiple dichotomy sets. You must first define one or more multiple response sets (see “To Define Multiple Response Sets” on p. category names shown in the output come from variable labels defined for elementary variables in the group. You can also obtain cell percentages based on cases or responses. or a combination. Which is more important in . you can reverse row and column items or redefine labels. Both multiple dichotomy and multiple category sets can be crosstabulated with other variables in this procedure.

0 Count $AIRCAT American United TWA .3 45.0 +--------+--------+ 3 | 3 | 3 | 6 | | | 7. Use multiple response sets or numeric categorical variables. Assumptions. and total percentages.7 100. you can crosstabulate the airline choices with the question involving service or schedule. Related procedures. row.6 +--------+--------+ 2 | 27 | 3 | 30 | | | 37. The cell percentages can be based on cases or responses. Sample Output Figure 35-4 Multiple Response Crosstabs output * * * $AIRCAT (group) by SELECT Select C R O S S T A B U L A T I O N * * * SELECT |Schedule Service | Row | Total | 0 | 1 | --------+--------+--------+ 1 | 41 | 34 | 75 | | | 92. Statistics. column.4 +--------+--------+ Column 44 37 81 Total 54.453 Multiple Response Analysis selecting a flight—schedule or service? Select only one. The Multiple Response Define Sets procedure allows you to define multiple response sets. and total counts.” After entering the data as dichotomies or multiple categories and combining them into a set. The counts and percentages provide a useful description of data from any distribution. and cell. Crosstabulation with cell. row. Data. column.

Multiple Response Crosstabs Define Variable Ranges Figure 35-6 Multiple Response Crosstabs Define Variable Range dialog box .454 Chapter 35 To Obtain Multiple Response Crosstabs From the menus choose: Analyze Multiple Response Crosstabs.. Figure 35-5 Multiple Response Crosstabs dialog box Select one or more numeric variables or multiple response sets for each dimension of the crosstabulation. Define the range of each elementary variable.. Optionally. Select one or more items for the Layer(s) list. you can obtain a two-way crosstabulation for each category of a control variable or multiple response set.

Missing Values. You can choose to display row percentages. column percentages. You can choose one or both of the following: n Exclude cases listwise within dichotomies. You can base cell percentages on cases (or respondents). variables are included in the tabulations of the group if at least one variable contains the counted value. Excludes cases with missing values for any variable from the tabulation of the multiple dichotomy set. the number of responses is equal to the number of counted values across cases. Cell counts are always displayed. Cases with missing values for some. and two-way table (total) percentages. Multiple Response Crosstabs Options Figure 35-7 Multiple Response Crosstabs Options dialog box Cell Percentages. This applies only to multiple response sets defined as dichotomy sets. Values within the inclusive range are assumed to be integers (non-integers are truncated). Categories outside the range are excluded from analysis. . By default. Enter the integer minimum and maximum category values that you want to tabulate. a case is considered missing for a multiple dichotomy set if none of its component variables contains the counted value.455 Multiple Response Analysis Value ranges must be defined for any elementary variable in the crosstabulation. but not all. This is not available if you select matching of variables across multiple category sets. the number of responses is the number of values in the defined range. Percentages Based on. You can also base cell percentages on responses. For multiple dichotomy sets. For multiple category sets.

some responses can appear more than once in a table.456 Chapter 35 n Exclude cases listwise within categories. Pairing is not available for multiple dichotomy sets or elementary variables. Excludes cases with missing values for any variable from tabulation of the multiple category set. and so on. a case is considered missing for a multiple category set only if none of its components has valid values within the defined range. when crosstabulating two multiple category sets. You can choose the following option: Match variables across response sets. MULT RESPONSE Command Additional Features The SPSS command language also allows you to: n Obtain crosstabulation tables with up to five dimensions (with the BY subcommand). the procedure tabulates each variable in the first group with each variable in the second group and sums the counts for each cell. By default. therefore. This applies only to multiple response sets defined as category sets. See the SPSS Syntax Reference Guide for complete syntax information. If you select this option. By default. including suppression of value labels (with the FORMAT subcommand). Pairs the first variable in the first group with the first variable in the second group. n Change output formatting options. the procedure bases cell percentages on responses rather than respondents. .

457 . and the store and division in which each employee works. Lists the report variables for which you want case listings or summary statistics and controls the display format of data columns. in a separate column to the left of all data columns. If you want to display the information in a different format. division. and division within each store. job tenure. Break Columns. frequency counts and descriptive statistics with the Frequencies procedure. with or without summary statistics. there will be a separate group for each category of each break variable within categories of the preceding break variable in the list. Report Summaries in Rows and Report Summaries in Columns give you the control you need over data presentation. A company with a chain of retail stores keeps records of employee information. Data Columns. sorted. mean salary) for each store. Example. Each of these uses a format designed to make information clear. Individual values of each break variable appear. Break variables should be discrete categorical variables that divide cases into a limited number of meaningful categories. Report Summaries in Rows Report Summaries in Rows produces reports in which different summary statistics are laid out in rows. For multiple break variables. including salary. Case listings are also available. You can obtain case listings with the Data Editor or the Summarize procedure. Lists optional break variables that divide the report into groups and controls the summary statistics and display formats of break columns. and subpopulation statistics with the Means procedure. with summary statistics (for example. You could generate a report that provides individual employee information (listing) broken down by store and division (break variables).Chapter 36 Reporting Results Case listings and descriptive statistics are basic tools for studying and presenting data.

Display cases.500 $11.00 4.00 4.83 3.92 2.00 27.000 $10. including overall summary statistics.700 $8.000 $15. This option is useful for previewing the format of your report without processing the whole report.00 24. Preview.00 32.000 $8.900 $10.08 3.25 3.000 $10.200 $10.300 $12.00 33.000 $15.42 5.00 42.00 33.17 2.00 34. which can be much longer than a summary report.67 3.25 4.92 4.520 $19.00 3. If your data file is already sorted by values of the break variables. Data are already sorted.00 30.00 30. This produces a listing report. the data file must be sorted by break variable values before generating the report.50 6.81 2.00 35.67 5.75 21.17 6.975 $18.67 2. This option is particularly useful after running a preview report.92 4. you can save processing time by selecting this option.50 3.42 3.508 Division __________ Carpeting Age _____ 27.500 $28.08 3.00 44.000 $7.08 3.00 24.92 2.754 $8.92 3.00 35. and titles.54 $9.11 . Controls overall report characteristics. Displays the actual values (or value labels) of the data-column variables for every case.08 2. page numbering.000 $9. For reports with break variables.25 3.00 26.33 3.17 3.31 2.900 $15.75 4.50 2.900 $8.33 2.67 3.00 Mean Appliances 30.00 Mean 31.33 3.458 Chapter 36 Report.00 38.00 23.08 3.67 2.900 $10. Sample Output Figure 36-1 Combined report with case listings and summary statistics Tenure Tenure in in Company Grade Salary--Annual _______ ______ ______________ 3.17 6. display of missing values. Displays only the first page of the report.00 5.04 2.00 33.300 $8.690 $10.50 2.67 4.83 3.92 3.00 22.335 $10.00 36.67 3.08 4.

One column in the report is generated for each variable selected. For reports with summary statistics for subgroups defined by break variables. click Summary in the Report group to specify the summary measure(s). Figure 36-2 Report Summaries in Rows dialog box . For reports with overall summary statistics.459 Reporting Results To Obtain a Summary Report: Summaries in Rows From the menus choose: Analyze Reports Report Summaries in Rows. Select one or more variables for Data Columns.. For reports sorted and displayed by subgroups. select one or more variables for Break Columns. select the break variable in the Break Columns list and click Summary in the Break Columns group to specify the summary measure(s)..

For the selected variable. For the selected variable. text alignment. column width. controls the column title. Value Position within Column. controls the alignment of data values or value labels within the column. Break Format controls the format of break columns on the left side. Figure 36-3 Report Data Column Format dialog box Column Title. Column Content.) . Alignment of values or labels does not affect alignment of column headings. controls the display of either data values or defined value labels. and the display of data values or value labels. Data Column Format controls the format of data columns on the right side of the report page. You can either indent the column contents by a specified number of characters or center the contents.460 Chapter 36 Report Column Format The Format dialog boxes control column titles. For the selected variable. Data values are always displayed for any values that do not have defined value labels. Use the Enter key to manually insert line breaks where you want titles to wrap. Long titles are automatically wrapped within the column. (Not available for data columns in column summary reports.

and skewness. kurtosis. Summary Lines controls subgroup statistics for each category defined by the break variable(s). displayed at the end of the report. mean. . number of cases. standard deviation. Figure 36-4 Report Summary Lines dialog box Available summary statistics are sum. percentage of case above or below a specified value. Final Summary Lines controls overall statistics. percentage of cases within a specified range of values.461 Reporting Results Report Summary Lines The two Summary Lines dialog boxes control the display of summary statistics for break groups and for the entire report. variance. maximum. minimum.

Controls spacing and pagination for categories of the selected break variable. Report Options Report Options controls the treatment and display of missing values and report page numbering. in these reports. Figure 36-6 Report Options dialog box . Figure 36-5 Report Break Options dialog box Page Control. you can insert space between the case listings and the summary statistics. Controls the number of blank lines between break category labels or data and summary statistics. This is particularly useful for combined reports that include both individual case listings and summary statistics for break categories. Blank Lines before Summaries.462 Chapter 36 Report Break Options Break Options controls spacing and pagination of break category information. You can specify a number of blank lines between break categories or start each break category on a new page.

Controls the number of lines that separate page titles and footers from the body of the report. If multiple break variables are specified. Break Columns. Controls the page margins expressed in lines (top and bottom) and characters (left and right) and report alignment within the margins. placement of the report on the page. they can be in separate columns or in the first column.463 Reporting Results Exclude cases with missing values listwise. Report Layout Report Layout controls the width and length of each report page. Allows you to specify the symbol that represents missing values in the data file. Controls the display of break columns. Allows you to specify a page number for the first page of the report. Number Pages from. . Figure 36-7 Report Layout dialog box Page Layout. Page Titles and Footers. Missing Values Appear as. Placing all break variables in the first column produces a narrower report. The symbol can be only one character and is used to represent both system-missing and user-missing values. Eliminates (from the report) any case with missing values for any of the report variables. and the insertion of blank lines and labels.

In titles. .464 Chapter 36 Column Titles. the actual value is displayed. the current value label or value of the variable is displayed in the title or footer. Data Column Rows & Break Labels. with left-justified. You can specify up to 10 lines of page titles and up to 10 lines of page footers. space between titles and the body of the report. The first row of data column information can start either on the same line as break category label or on a specified number of lines after the break category label. centered. (Not available for columns summary reports. including title underlining. the value label corresponding to the value of the variable at the end of the page is displayed. the value label corresponding to the value of the variable at the beginning of the page is displayed. Controls the display of column titles. and right-justified components on each line.) Report Titles Report Titles controls the content and placement of report titles and footers. Figure 36-8 Report Titles dialog box If you insert variables into titles or footers. and vertical alignment of column titles. If there is no value label. In footers. Controls the placement of data column information (data values and/or summary statistics) in relation to the break labels at the start of each break category.

job tenure. Example. . you cannot use these variables in report titles or footers. For multiple break variables. and titles. Report. Break Columns. Report Summaries in Columns Report Summaries in Columns produces summary reports in which different summary statistics appear in separate columns. Data are already sorted. The special variables DATE and PAGE allow you to insert the current date or the page number into any line of a report header or footer. minimum. Lists optional break variables that divide the report into groups and controls the display formats of break columns. the data file must be sorted by break variable values before generating the report. A company with a chain of retail stores keeps records of employee information. Lists the report variables for which you want summary statistics and controls the display format and summary statistics displayed for each variable. You could generate a report that provides summary salary statistics (for example. For reports with break variables. you can save processing time by selecting this option. If your data file is already sorted by values of the break variables. Break variables should be discrete categorical variables that divide cases into a limited number of meaningful categories. including salary. mean. page numbering. Preview. Controls overall report characteristics.465 Reporting Results Special Variables. maximum) for each division. Displays only the first page of the report. and the division in which each employee works. there will be a separate group for each category of each break variable within categories of the preceding break variable in the list. This option is particularly useful after running a preview report. If your data file contains variables named DATE or PAGE. including display of missing values. This option is useful for previewing the format of your report without processing the whole report. Data Columns.

This places a variable called total into the Data Columns list. To obtain more than one summary measure for a variable.754 $12. select the variable in the Data Columns list and click Summary. select the variable in the source list and move it into the Data Columns list multiple times.255 $17. . For reports sorted and displayed by subgroups. To display a column containing the sum.20 To Obtain a Summary Report: Summaries in Columns From the menus choose: Analyze Reports Report Summaries in Columns.508 $13.. Select one or more variables for Data Columns.580 Mean Annual Salary ________ $9.450 Minimum Annual Salary ________ $19.466 Chapter 36 Sample Output Figure 36-9 Summary report with summary statistics in columns Annual Salary ________ $11.87 36. mean. or other function of existing columns.500 $8. select one or more variables for Break Columns.200 $7.975 $7..050 $22.300 $17. One column in the report is generated for each variable selected. one for each summary measure you want.75 31.500 Maximum Division __________ Carpeting Appliances Furniture Hardware Mean Age ________ 30.500 $28.11 36. click Insert Total. ratio. To change the summary measure for a variable.

Figure 36-11 Report Summary Lines dialog box .467 Reporting Results Figure 36-10 Report Summaries in Columns dialog box Report Summary Lines Summary Lines controls the summary statistic displayed for the selected data column variable.

mean of columns. The total column is the average of the columns in the Summary Column list. percentage of case above or below a specified value. percentage of cases within a specified range of values. 1st column – 2nd column. The total column is the sum of the columns in the Summary Column list. Minimum of columns. quotient of values in one column divided by values in another column. Available total summary statistics are sum of columns. The Summary Column list must contain exactly two columns. Mean of columns. and skewness. kurtosis. The total column is the minimum of the columns in the Summary Column list. maximum. difference between values in two columns. mean. variance. Maximum of columns. . minimum. The total column is the maximum of the columns in the Summary Column list. minimum. Figure 36-12 Report Summary Column dialog box Sum of columns.468 Chapter 36 Available summary statistics are sum. standard deviation. maximum. number of cases. Total Summary Column Summary Column controls the total summary statistics that summarize two or more data columns. The total column is the difference of the columns in the Summary Column list. and product of columns values multiplied together.

Product of columns. The total column is the product of the columns in the Summary Column list. Report Break Options for Summaries in Columns Break Options controls subtotal display. Figure 36-13 Report Break Options dialog box Subtotal. The total column is the quotient of the columns in the Summary Column list. and pagination for break categories. Controls the display subtotals for break categories. % 1st column / 2nd column. The Summary Column list must contain exactly two columns. The total column is the first column’s percentage of the second column in the Summary Column list. spacing. The Summary Column list must contain exactly two columns.469 Reporting Results 1st column / 2nd column. . Report Column Format Data and break column formatting options for Report Summaries in Columns are the same as those described for Report Summaries in Rows.

You can specify a number of blank lines between break categories or start each break category on a new page. Missing values. displayed at the bottom of the column. Blank Lines before Subtotal. Displays and labels a grand total for each column. Figure 36-14 Report Options dialog box Grand Total. the display of missing values. . Controls spacing and pagination for categories of the selected break variable. and pagination in column summary reports. Report Layout for Summaries in Columns Report layout options for Report Summaries in Columns are the same as those described for Report Summaries in Rows. You can exclude missing values from the report or select a single character to indicate missing values in the report. Report Options for Summaries in Columns Options controls the display of grand totals. Controls the number of blank lines between break category data and subtotals.470 Chapter 36 Page Control.

n Control more precisely the display format of summary statistics. Mode. .471 Reporting Results REPORT Command Additional Features The SPSS command language also allows you to: n Display different summary functions in the columns of a single summary line. Frequency. n Insert blank lines after every nth case in listing reports. and Percent as summary functions. Because of the complexity of the REPORT syntax. copy and paste the corresponding syntax. n Use Median. See the SPSS Syntax Reference Guide for complete syntax information. to approximate the report generated from the dialog boxes. n Insert blank lines at various points in reports. n Insert summary lines into data columns for variables other than the data column variable. when building a new report with syntax. and refine that syntax to yield the exact report that you want. you may find it useful. or for various combinations (composite functions) of summary functions.

.

Does my questionnaire measure customer satisfaction in a useful way? Using reliability analysis. The Reliability Analysis procedure calculates a number of commonly used measures of scale reliability and also provides information about the relationships between individual items in the scale. Intraclass correlation coefficients can be used to compute interrater reliability estimates. This is a model of internal consistency. This model makes the assumptions of the parallel model and also assumes equal means across items. Statistics.Chapter 37 Reliability Analysis Reliability analysis allows you to study the properties of measurement scales and the items that make them up. inter-item correlations and covariances. based on the average inter-item correlation. The following models of reliability are available: n Alpha (Cronbach). Models. n Split-half. Example. n Guttman. This model splits the scale into two parts and examines the correlation between the parts. Descriptives for each variable and for the scale. and you can identify problem items that should be excluded from the scale. ANOVA table. and Tukey’s test of additivity. n Parallel. 473 . Hotelling’s T2. you can get an overall index of the repeatability or internal consistency of the scale as a whole. n Strict parallel. This model computes Guttman’s lower bounds for true reliability. summary statistics across items. intraclass correlation coefficients. This model assumes that all items have equal variances and equal error variances across replications. reliability estimates. you can determine the extent to which the items in your questionnaire are related to each other.

Data can be dichotomous. or interval. use Factor Analysis or Multidimensional Scaling. ordinal.9439 .4995 Cases 906. 4.5003 .0 906.8150 .9439 4 items Standardized item alpha = . and errors should be uncorrelated between items. To identify homogeneous groups of variables. 2.8128 .0000 . but they should be coded numerically.5033 .8045 1. Observations should be independent.5003 .0 906.5022 . If you want to explore the dimensionality of your scale items (to see if more than one construct is needed to account for the pattern of item scores).8256 .8068 1. Scales should be additive. so that each item is linearly related to the total score.7823 BORED CRITICS PEERS 1.4868 .0000 .0 906.0 Correlation Matrix ANY ANY BORED CRITICS PEERS 1. Assumptions. Related procedures.474 Chapter 37 Data.0000 Reliability Coefficients Alpha = . 3. you can use Hierarchical Cluster Analysis to cluster variables.0000 .5287 Std Dev . Sample Output Figure 37-1 Reliability output Mean 1. ANY BORED CRITICS PEERS . Each pair of items should have a bivariate normal distribution.5001 .

Choose a model from the Model drop-down list.475 Reliability Analy sis To Obtain a Reliability Analysis From the menus choose: Analyze Scale Reliability Analysis… Figure 37-2 Reliability Analysis dialog box Select two or more variables as potential components of an additive scale. .

Available options are Item. Spearman-Brown reliability (equal and unequal length).476 Chapter 37 Reliability Analysis Statistics Figure 37-3 Reliability Analysis Statistics dialog box You can select various statistics describing your scale and items. and true variance. For dichotomous data. the number of items. Produces descriptive statistics for scales or items across cases. Guttman split-half reliability. . and Correlations. common variance. Summaries. and reliability estimates as follows: n Alpha models: Coefficient alpha. this is equivalent to the Kuder-Richardson 20 (KR20) coefficient. and unbiased estimate of reliability. estimated common interitem correlation. Scale. and coefficient alpha for each half. Descriptives for. estimates of error variance. Covariances. n Parallel and Strictly parallel models: Test for goodness-of-fit of model. Variances. Available options are Means. and Scale if item deleted. n Split-half models: Correlation between forms. estimated reliability. Provides descriptive statistics of item distributions across all items in the scale. n Guttman models: Reliability coefficients lambda 1 through lambda 6. Statistics reported by default include the number of cases.

n Confidence interval. and One-way random. Default is 95%. Produces tests of equal means. n Write a correlation matrix for later analysis. n Test value. Specify the level for the confidence interval. Default value is 0. Two-way random. Specify the hypothesized value of the coefficient for the hypothesis test. Tukey’s test of additivity. Available alternatives are None. n Model. n Specify splits other than equal halves for the split-half method. n Type. This is the value to which the observed value is compared. Available models are Two-way mixed. RELIABILITY Command Additional Features The SPSS command language also allows you to: n Read and analyze a correlation matrix. Produces matrices of correlations or covariances between items. Friedman chi-square. Produces a test of the assumption that there is no multiplicative interaction among the items. Produces measures of consistency or agreement of values within cases. F test. Select the type of index. Hotelling’s T-square. Select the model for calculating the intraclass correlation coefficient.477 Reliability Analy sis Inter-item. Intraclass correlation coefficient. Produces a multivariate test of the null hypothesis that all items on the scale have the same mean. ANOVA Table. . or Cochran chi-square. Available types are Consistency and Absolute Agreement.

.

How do people perceive relationships between different cars? If you have data from respondents indicating similarity ratings between different makes and models of cars. the dimensions of this conceptual space can be interpreted and used to further understand your data. Multidimensional scaling can also be applied to subjective ratings of dissimilarity between objects or concepts. stimulus coordinates. Statistics. that the price and size of a vehicle define a two-dimensional space.or three-dimensional). average stress and RSQ for each stimulus (RMDS models). For each matrix in replicated multidimensional scaling models: stress and RSQ for each stimulus. all dissimilarities should be quantitative and should be measured in the same metric. If your data are dissimilarity data. For individual difference (INDSCAL) models: subject weights and weirdness index for each subject. Data.or three-dimensional) such that the distances between points in the space match the given dissimilarities as closely as possible. This is accomplished by assigning observations to specific locations in a conceptual space (usually two. you can use multidimensional scaling as a data reduction technique (the Multidimensional Scaling procedure will compute distances from multivariate data for you. If your data are multivariate data. You might find. optimally scaled data matrix. Additionally. If you have objectively measured variables. Scaling of variables is an important issue— 479 . which accounts for the similarities reported by your respondents. In many cases. if necessary). scatterplot of disparities versus distances. or count data. variables can be quantitative. as you might have with multiple raters or questionnaire respondents. for example. stress (Kruskal’s). the Multidimensional Scaling procedure can handle dissimilarity data from multiple sources. Example.Chapter 38 Multidimensional Scaling Multidimensional scaling attempts to find the structure in a set of distance measures between objects or cases. For each model: data matrix. Plots: stimulus coordinates (two. multidimensional scaling can be used to identify dimensions that describe consumers’ perceptions. S-stress (Young’s). binary. RSQ.

If you want to identify groups of similar cases. interval. Assumptions. consider supplementing your multidimensional scaling analysis with a hierarchical or k-means cluster analysis. Be sure to select the appropriate measurement level (ordinal. or ratio) under Options to be sure that the results are computed correctly. one variable is measured in dollars and the other is measured in years). The Multidimensional Scaling procedure is relatively free of distributional assumptions. an alternative method to consider is factor analysis. If your goal is data reduction. you should consider standardizing them (this can be done automatically by the Multidimensional Scaling procedure).480 Chapter 38 differences in scaling may affect your solution. particularly if your variables are quantitative. Related procedures. To Obtain a Multidimensional Scaling Analysis From the menus choose: Analyze Scale Multidimensional Scaling… Figure 38-1 Multidimensional Scaling dialog box . If your variables have large differences in scaling (for example.

. and you can click Shape to indicate the shape of the distance matrix.481 Multidimensional Scaling In Distances. you must select at least one numeric variable. Choose an alternative: Square symmetric. or Rectangular. You can create separate matrices for each category of a grouping variable (which can be either numeric or string) by moving that variable into the Individual Matrices For list. you must specify the shape of your data matrix in order to get the correct results. and you can click Measure to specify the type of distance measure you want. you must select at least four numeric variables for analysis. or distances between two sets of objects. If your data are distances. If you want SPSS to create the distances before analyzing them. Note: You cannot select Square symmetric if the Model dialog box specifies row conditionality. Square asymmetric. Multidimensional Scaling Shape of Data Figure 38-2 Multidimensional Scaling Shape of Data dialog box If your working data file represents distances among a set of objects. select either Data are distances or Create distances from data.

. Chi-square measure or Phi-square measure. Select one alternative from the Measure group corresponding to your type of data. Block. Euclidean distance. You can specify the details of creating dissimilarity measures from your data. Squared Euclidean distance. Create Distance Matrix. n Binary. Alternatives are Between variables or Between cases. Size difference. Chebychev. or Customized. Allows you to choose the unit of analysis. and then select one of the measures from the drop-down list corresponding to that type of measure. If your data are multivariate data (values of measured variables). Pattern difference. Available alternatives are: n Interval. or Lance and Williams. Euclidean distance. Measure. Variance. Minkowski. n Count. you must create dissimilarity data in order to compute a multidimensional scaling solution. Allows you to specify the dissimilarity measure for your analysis. squared Euclidean distance.482 Chapter 38 Multidimensional Scaling Create Measure Figure 38-3 Multidimensional Scaling Create Measure from Data dialog box Multidimensional scaling uses dissimilarity data to create a scaling solution.

Select a standardization method from the Standardize dropdown list (if no standardization is required. Alternatives are Ordinal. Dimensions. specify the same number as minimum and maximum. Multidimensional Scaling Model Figure 38-4 Multidimensional Scaling Model dialog box Correct estimation of a multidimensional scaling model depends on aspects of the data and the model itself. In certain cases. For a single solution. such as when variables are measured on very different scales. or Ratio.483 Multidimensional Scaling Transform Values. so that ties (equal values for different cases) are resolved optimally. you may want to standardize values before computing proximities (not applicable to binary data). Row. Level of measurement. . Allows you to specify the dimensionality of the scaling solution(s). selecting Untie tied observations requests that they be treated as continuous variables. Allows you to specify the level of your data. Alternatives are Matrix. Conditionality. select None). a minimum of 1 is allowed only if you select Euclidean distance as the scaling model. Interval. One solution is calculated for each number in the range. Allows you to specify which comparisons are meaningful. Specify integers between 1 and 6. or Unconditional. If your variables are ordinal.

Allows you to select various types of output. you can select Allow negative subject weights. Allows you to specify the assumptions by which the scaling is performed. Criteria. Available options are Group plots. Data matrix. Treat distances less than n as missing. enter values for S-stress convergence. if appropriate for your data.484 Chapter 38 Scaling Model. Allows you to determine when iteration should stop. and Model and options summary. Distances less than this value are excluded from the analysis. Minimum S-stress value. Individual subject plots. Available alternatives are Euclidean distance or Individual differences Euclidean distance (also known as INDSCAL). . For the Individual differences Euclidean distance model. Multidimensional Scaling Options Figure 38-5 Multidimensional Scaling Options dialog box You can specify options for your multidimensional scaling analysis: Display. To change the defaults. and Maximum iterations.

485 Multidimensional Scaling Multidimensional Scaling Command Additional Features The SPSS command language also allows you to: n Use three additional model types. Analyze similarities (rather than distances) with ordinal data. . and GEMSCAL in n n n n n the literature on multidimensional scaling. Analyze nominal data. Carry out polynomial transformations on interval and ratio data. Constrain multidimensional unfolding. Save various coordinate and weight matrices into files and read them back in for analysis. known as ASCAL. AINDS.

.

coefficient of dispersion (COD). The variables that define the numerator and denominator of the ratio should be scale variables that take positive values.Chapter 39 Ratio Statistics The Ratio Statistics procedure provides a comprehensive list of summary statistics for describing the ratio between two scale variables. range. Median. standard deviation. minimum and maximum values. confidence intervals. price-related differential (PRD). The ratio statistics report can be suppressed in the output and the results saved to an external file. median-centered coefficient of variation. Assumptions. mean. Statistics. 487 . weighted mean. average absolute deviation (AAD). Example. Use numeric codes or short strings to code grouping variables (nominal or ordinal level measurements). Data. you might learn that the distribution of ratios varies considerably from county to county. mean-centered coefficient of variation. Is there good uniformity in the ratio between the appraisal price and sale price of homes in each of five counties? From the output. You can sort the output by values of a grouping variable in ascending or descending order. and the concentration index computed for a user-specified range or percentage within the median ratio.

and specify the name of the file to which the results are saved. . Select a denominator variable. n Choose whether or not to display the results in the Output Viewer. n Choose whether or not to save the results to an external file for later use. Optionally... you can: n Select a grouping variable and specify the ordering of the groups in the results.488 Chapter 39 To Obtain Ratio Statistics From the menus choose: Analyze Descriptive Statistics Ratio. Figure 39-1 Ratio Statistics dialog box Select a numerator variable.

the median. The value such that the number of ratios less than this value and the number of ratios greater than this value are the same. n Confidence intervals. The result of summing the ratios and dividing the result by the total number of ratios. Measures of central tendency are statistics that describe the distribution of ratios. This displays confidence intervals for the mean. Specify a value greater than or equal to 0 and less than 100 as the confidence level.489 Ratio Sta tistics Ratio Statistics Figure 39-2 Statistics dialog box Central Tendency. n Mean. n Median. n Weighted mean. The result of dividing the mean of the numerator by the mean of the denominator. and the weighted mean (if requested). . It is also the mean of the ratios weighted by the denominator.

Here the interval is defined explicitly by specifying the low and high values of the interval. n PRD. or spread. Here the interval is defined implicitly by specifying the percentage of the median. n COD.490 Chapter 39 Dispersion. in the observed values. n AAD. The coefficient of dispersion is the result of expressing the average absolute deviation as a percentage of the median. Enter values for the low and high proportions and click Add to obtain an interval. The mean-centered coefficient of variation is the result of expressing the standard deviation as a percentage of the mean. The smallest ratio. The largest ratio. Concentration Index. and the upper end is equal to ( 1 + 0. n Range. . n Standard deviation. also known as the index of regressivity. These are statistics that measure the amount of variation.01 × value ) × median . n Maximum. Enter a value between 0 and 100 and click Add. The result of subtracting the minimum ratio from the maximum ratio. dividing the result by the total number of ratios minus one. n Mean centered COV. The lower end of the interval is equal to ( 1 – 0. The median-centered coefficient of variation is the result of expressing the root mean squares of deviation from the median as a percentage of the median.01 × value ) × median . n Median centered COV. The result of summing the squared deviations of the ratios about the mean. The price-related differential. and taking the positive square root. The coefficient of concentration measures the percentage of ratios that fall within an interval. is the result of dividing the mean by the weighted mean. n Ratios Within. n Minimum. It can be computed in two different ways: n Ratios Between. The average absolute deviation is the result of summing the absolute deviations of the ratios about the median and dividing the result by the total number of ratios.

as shown in Figure 40-1. Interactive charts. This chapter provides an overview of the chart facility. you can create a chart by selecting a chart type from the Graphs menu. Creating and Modifying a Chart Before you can create a chart. 491 .Chapter 40 Overview of the Chart Facility High-resolution charts and plots are created by the procedures on the Graphs menu and by many of the procedures on the Analyze menu. available on the Interactive submenu of the Graphs menu are covered in a separate book. or read a spreadsheet. tab-delimited data file. SPSS Interactive Graphics. The Tutorial menu selection on the Help menu has online examples of creating and modifying a chart. open a previously saved data file. and the online Help system provides information on how to create and modify all chart types. or database file. This opens a chart dialog box. You can enter the data directly into the Data Editor. you need to get your data into the Data Editor. Creating the Chart After you get your data into the Data Editor.

.492 Chapter 40 Figure 40-1 Chart dialog box The dialog box contains icons for various types of charts and a list of data structures. For information about the various choices. click Help. you can select the variables appropriate for the chart and choose the options you want. Figure 40-2 Chart definition dialog box In this dialog box. Click Define to open a chart definition dialog box such as the following one.

Figure 40-3 Chart in Viewer .493 Overv iew of the Chart Facility The chart is displayed in the Viewer. as shown in Figure 40-3.

This displays the chart in a chart window. double-click anywhere on the chart. Figure 40-4 Original chart in chart window Analyze You can modify any part of the chart or use the gallery to change to another type of chart illustrating the same data. which identifies the colors or patterns of the bars. Figure 40-5 shows a modified chart. n Add a title. n Add an outer frame. as shown in Figure 40-4.494 Chapter 40 Modifying the Chart To modify a chart. n Change the location of the bar origin line. Some typical modifications include the following: n Edit axis titles and labels. n Edit the legend. . n Add annotation.

These global options are available for most charts. or time series charts. as shown in Figure 40-6. . Chart Definition Global Options When you are defining a chart.495 Overv iew of the Chart Facility Figure 40-5 Modified chart Chart modifications are saved when you close the chart window. They are not available for P-P plots. regardless of type. sequence charts. the specific chart definition dialog box usually contains the pushbuttons Titles and Options and a Template group. and the modified chart is displayed in the Viewer. Q-Q plots.

Titles.496 Chapter 40 Figure 40-6 A chart definition dialog box Template group Titles Options (missing values and case labels) The Titles dialog box allows you to specify titles. This opens the Titles dialog box. You can click Options to control the treatment of missing values for most charts and case labels for scatterplots. one subtitle line. as shown in Figure 40-7. and footnotes. You can apply a template of previously selected attributes either when you are defining the chart or after the chart has been created. subtitles. Subtitles. . and two footnote lines as part of your original chart definition. To specify titles or footnotes while defining a chart. The next few sections describe how to define these characteristics at the time you define the chart. click Titles in the chart definition dialog box (see Figure 40-6). you can define two title lines. and Footnotes In any chart.

Pie chart titles. You can also add. . Figure 40-8 Options dialog box The availability of each option depends on your previous choices. if too long. size.497 Overv iew of the Chart Facility Figure 40-7 Titles dialog box Each line can be up to 72 characters long. are cropped on the right. This dialog box is available from the chart definition dialog box (see Figure 40-6). as well as change their font. The number of characters that will actually fit in the chart depends upon the font and size. and justification. delete. Options The Options dialog box provides options for treatment of missing values and display of case labels. within the Chart Editor. by default. as shown in Figure 40-8. are centerjustified and. Most titles are left-justified by default and. if too long. are cropped at both ends. or revise text lines. Missing-value options are not available for charts using values of individual cases or for histograms.

For both charts. n Exclude cases variable by variable.498 Chapter 40 The case-labels display option is available only for a scatterplot that has a variable selected for case labels. or an extra box to a boxplot. which shows a bar chart for each of the two options. are displayed in the bar labels. an extra bar. the “missing” category is not displayed. for example. the cases having those missing values are excluded when the variable is analyzed. To see the difference between listwise and variable-by-variable exclusion of missing values. adding. Number of cases. If there are missing values in the data for variables used to define categories or subgroups. you can choose one of the following alternatives for exclusion of cases having missing values: n Exclude cases listwise. The charts were created from a version of the bank. . This option is not available for an overlay scatterplot or for single-series charts in which the data are summarized by separate variables. The following option is also available for missing values: n Display groups defined by missing values. the option Display groups defined by missing values is selected. If any of the variables in the chart has a missing value for a given case. If a selected variable has any missing values. This option is selected by default. If you want to suppress display after the chart is drawn. If you selected summaries of separate variables for a categorical chart or if you are creating a scatterplot.sav employee data file that was edited to have some system-missing (blank) values in the variables for current salary and job category. In each chart. the values of the summary function. The “missing” category is displayed on the category axis or in the legend. the value 9 was entered and defined as missing. a slice to a pie chart. Missing Values. consider Figure 40-9. the whole case is excluded from the chart. user-missing values (values identified as missing by the user) and system-missing values are included together in a category labeled Missing. In some other cases of the job category variable. select Displayed from the Series menu and move the categories you want suppressed to the Omit group. In a scatterplot. missing values add a “missing” category to the set of markers. If there are no missing values. which adds the category Missing to the other job categories displayed.

In the listwise chart. the number of cases is the same for both variables in each bar cluster because whenever a value was missing. .499 Overv iew of the Chart Facility Figure 40-9 Examples of missing-data treatment in charts 300 282 282 Listwise exclusion of missing values 200 100 Number of cases 68 39 0 Missing Clerical 39 19 19 68 Beginning salary Current salary Custodial Manager 350 333 300 282 250 Variable-by-variable exclusion of missing values 200 150 Number of cases 100 77 50 39 0 Missing Clerical 39 25 19 Manager Custodial 68 Beginning salary Current salary In both charts. 26 cases have a system-missing value for the job category and 13 cases have the user-missing value (9). the case was excluded for all variables. the number of nonmissing cases for each variable in a category is plotted without regard to missing values in other variables. In the variable-by-variable chart.

from the menus choose: File Apply Chart Template. This check box appears only if you are applying the template in a chart window. it is deselected—that is. select Use chart specifications from (in the Template group in the chart definition dialog box shown in Figure 40-6) and click File. If the old chart is a simple bar chart with drop shadows and the new chart is a simple line chart. If there are titles defined in the new chart. The attributes of the title and footnotes (font. any formatting information from the old chart that can apply to the new chart will automatically apply. By default. size. If there are titles in the template chart but not in the new chart. If you select this option. This opens a standard file selection dialog box.. n Apply title and footnote text.500 Chapter 40 The final selection in the Options dialog box controls the status of case labels when a scatterplot is first displayed. For example. if the old chart is a clustered bar chart with bar colors modified to yellow and green and the new chart is a multiple line chart. all case labels are displayed when a scatterplot is created. If you are creating a new chart. not when creating a new chart. they will override the titles in the template chart. Chart Templates You can apply many of the attributes and text elements from one chart to another. This allows you to modify one chart. When this option is selected. To use a template when creating a chart. the default scatterplot is displayed without labels. Applies the text of the title and footnotes of the template to the current chart. the filename you select is displayed in the Template group when you return to the chart definition dialog box. . and then use it as a template to create a number of other similar charts. To apply a template to a chart already in a chart window. A template is used to borrow the format from one chart and apply it to the new chart you are generating. save that chart. Select a file to use as a template. In general. the lines will be yellow and green. This opens a standard file selection dialog box. the lines will not have drop shadows because drop shadows don’t apply to line charts. case labels may overlap.. overriding any text defined in the Titles dialog box in the current chart. n Display chart with case labels. you will get the titles from the template chart. and color) are applied whether or not this item is selected.

...501 Overv iew of the Chart Facility To Create a Chart Template Create a chart. From the chart window menus choose: File Save Chart Template. Edit the chart to contain the attributes you want to save in a template.

.

while decreasing numbers on the scale represent the increasing belief that the subject belongs to the other category. The estimate of the area under the ROC curve can be computed either nonparametrically or parametrically using a binegative exponential model. Statistics. It is in a bank’s interest to correctly classify customers into those who will and will not default on their loans. Test variables are quantitative. It is also assumed that the true category to which each subject belongs is known. ROC curves can be used to evaluate how well these methods perform. so special methods are developed for making these decisions. Example. The value of the state variable indicates which category should be considered positive.Chapter 41 ROC Curves This procedure is a useful way to evaluate the performance of classification schemes in which there is one variable with two categories by which subjects are classified. The user must choose which direction is positive. Methods. The state variable can be of any type and indicates the true category to which a subject belongs. Assumptions. 503 . Data. It is assumed that increasing numbers on the rater scale represent the increasing belief that the subject belongs to one category. They are often composed of probabilities from discriminant analysis or logistic regression or scores on an arbitrary scale indicating a rater’s “strength of conviction” that a subject falls into one category or another. Area under the ROC curve with confidence interval and coordinate points of the ROC curve. Plots: ROC curve.

877 Std. Error Asymptotic Sig.Specificity Area Under the Curve Test Result Variable(s): PROBS Asymptotic 95% Confidence Interval Area .00 .823 1 2 Upper Bound . Null hypothesis: true area = 0.75 . ROC Curve 1.931 1.028 .504 Chapter 41 Sample Output Figure 41-1 ROC Curve output Case Processing Summary Valid N (listwise) 74 76 ACTUAL Positive1 Negative Larger values of the test result variable(s) indicate stronger evidence for a positive actual state.25 .5 .00. 1.50 .00 .00 0.00 1 . Under the nonparametric assumption 2. Lower Bound . The positive actual state is 1.000 .50 Sensitivity .25 0.75 1.

.. Figure 41-2 ROC Curve dialog box Select one or more test probability variables. Select one state variable. Identify the positive value for the state variable.505 ROC Curves Obtaining an ROC Curve From the menus choose: Graphs ROC Curve..

Allows you to specify the direction of the scale in relation to the positive category.9%. Allows you to specify the method of estimating the standard error of the area under the curve. Allows you to specify how missing values are handled. Also allows you to set the level for the confidence interval. . Available methods are nonparametric and binegative exponential. Missing Values. Test Direction. Allows you to specify whether the cutoff value should be included or excluded when making a positive classification. Parameters for Standard Error of Area.1% to 99. The available range is 50.506 Chapter 41 ROC Curve Options Figure 41-3 ROC Curve Options dialog box You can specify the following options for your ROC analysis: Classification. This currently has no effect on the output.

Chapter 42 Utilities This chapter describes the functions found on the Utilities menu and the ability to reorder target variable lists using the Windows system menus. including: n Data format n Variable label n User-missing values n Value labels Figure 42-1 Variables dialog box 507 . Variable Information The Variables dialog box displays variable definition information for the selected variable.

use the Variable view in the Data Editor. To Obtain Variable Information From the menus choose: Utilities Variables. Small variable sets make it easier to find and select the variables for your analysis and can also enhance performance. restricting dialog box source lists to smaller subsets of variables should reduce the amount of time it takes to open dialog boxes.508 Chapter 42 Go To. Pastes the selected variables into the designated syntax window at the cursor location.. If your data file has a large number of variables and dialog boxes that open slowly. This is particularly useful for data files with a large number of variables.) To modify variable definitions. Variable Sets You can restrict the variables that appear on dialog box source variable lists by defining and using variable sets. Select the variable for which you want to display variable definition information. Goes to the selected variable in the Data Editor window. Paste. (Not available in the Student version.. .

and long string variables can be included in a set.509 Utilities Define Variable Sets Define Variable Sets creates subsets of variables to display in dialog box source lists. Any combination of numeric.. can be used. including blanks. Click Add Set. To Define Variable Sets From the menus choose: Utilities Define Sets. short string. A variable can belong to multiple sets. Select the variables that you want to include in the set. Variables in Set.. Any characters. Set names are not case sensitive. Set names can be up to 12 characters long. The order of variables in the set has no effect on the display order of the variables on dialog box source lists. Enter a name for the set (up to 12 characters). . Figure 42-2 Define Variable Sets dialog box Set Name.

. The order of sets and the order of variables within a set have no effect on source list variable order. Displays the sets used to produce the source variable lists in dialog boxes. two system-defined sets are in use: ALLVARIABLES. To Restrict Dialog Box Source Lists to Defined Variable Sets From the menus choose: Utilities Use Sets.510 Chapter 42 Use Sets Use Sets restricts the variables displayed in dialog box source lists to the selected sets that you have defined. By default. Select the defined variable sets that contain the variables that you want to appear in dialog box source lists. If you don’t remove the ALLVARIABLES set from the Sets in Use list. Figure 42-3 Use Sets dialog box Sets in Use. . but there must be at least one set on the list.. You can remove these sets from the list and select others. any other sets you include are irrelevant. Variables appear on the source lists in alphabetical or file order. This set contains only new variables created during the session. NEWVARIABLES. This set contains all variables in the data file. including new variables created during a session.

. Moves the selected variable(s) down one position on the target list. You cannot move noncontiguous groups of variables. Move Selection Down. Moves the selected variable(s) up one position on the target list. You can move multiple variables simultaneously if they are contiguous (grouped together).511 Utilities Reordering Target Variable Lists Variables appear on dialog box target lists in the order in which they are selected from the source list. Figure 42-4 Windows system menu with target list reordering Move Selection Up. If you want to change the order of variables on a target list—but you don’t want to deselect all the variables and reselect them in the new order—you can move variables up and down on the target list using the system menu in the upper left corner of the dialog box (accessed by clicking the left side of the dialog box title bar).

.

Change the settings.. 513 .. which keeps a record of all commands run in every session. Click the tabs for the settings that you want to change. n Display order for variables in dialog box source lists. n Items displayed and hidden in new output results. To Change Options Settings From the menus choose: Edit Options. n Custom currency formats. including: n Session journal.Chapter 43 Options Options control a wide variety of settings. Click OK or Apply. n TableLook for new pivot tables and ChartLook for new interactive charts. n Autoscript files and autoscript functions to customize output.

This includes commands entered and run in syntax windows and commands generated by dialog box choices. You can display variable names or variable labels. You can turn journaling off and on. Target variable lists always reflect the order in which variables were selected. Session Journal. You can copy command syntax from the journal file and save it in a syntax file for use with the automated Production Facility. Controls display of variables in dialog box list boxes. You can edit the journal file and use the commands again in other sessions.) . and select the journal filename and location. which is the order in which they actually occur in the data file (and are displayed in the Data Editor window). Names or labels can be displayed in alphabetical order or in file order. Journal file of all commands run in a session. (Command syntax and automatic production are not available in the Student version.514 Chapter 43 General Options Figure 43-1 Options General tab Variable Lists. Display order affects only source variable lists. append or overwrite the journal file.

If you need to change the location of the temporary directory. Measurement system used (points. Syntax windows are text file windows used to enter. Does not apply to simple text output. contact your system administrator.515 Options Temporary directory. Recently used file list. Controls the manner in which the program notifies you that it has finished running a procedure and that the results are available in the Viewer. this does not affect the location of temporary data files. or maps (available with the Maps option). see “Script Options” in this chapter. or centimeters) for specifying attributes such as pivot table cell margins. select this option to automatically open a syntax window at the beginning of each session. (Not available with the Student version. which can be set only on the computer running the server version of the software.htm. For more information. Controls the location of temporary files created during a session. Notification. inches. The list of available languages depends on the currently installed language files. and space between tables for printing. This is useful primarily for experienced users who prefer to work with command syntax instead of dialog boxes. Measurement System. For additional language files. Controls the number of recently used files that appear on the File menu. Note: Custom scripts that rely on language-specific text strings in the output may not run correctly when you change the output language. Viewer Type at Start-up. A number of languages are automatically installed when you install SPSS. Controls the type of Viewer used and output format.spss. visit www. Very small decimal values will be displayed as 0 (or 0.000). .com/tech/downloads/base. Open syntax window at start-up. interactive graphics. and run commands. The Viewer produces interactive pivot tables and interactive charts. Language. cell widths. In distributed mode (available with the server version). Controls the language used in output. Suppresses the display of scientific notation for small decimal values in output. If you frequently work with command syntax. the location of temporary data files is controlled by the environment variable SPSSTMPDIR.) No scientific notation for small numbers in tables. edit. The Draft Viewer converts pivot tables to text output and charts to metafiles. In distributed mode.

Controls which items are automatically displayed or hidden each time you run a procedure and how items are initially aligned. pivot tables. charts. You can copy command syntax from the log and save it in a syntax file for use with the automated Production Facility.516 Chapter 43 Viewer Options Viewer output display options affect only new output produced after you change the settings. (Command syntax and automatic production are not available in the Student version. You can also turn the display of commands in the log on or off. Output already displayed in the Viewer is not affected by changes in these settings. . Centered and right-aligned items are identified by a small symbol above and to the left of the item. and text output (output not displayed in pivot tables). Only the alignment of printed output is affected by the justification settings.) Note: All output items are displayed left-aligned in the Viewer. titles. You can control the display of the following items: log. notes. Figure 43-2 Options Viewer tab Initial Output State. warnings.

For text output. and color for new page titles and page titles generated by TITLE and SUBTITLE command syntax or created by New Page Title on the Insert menu. If you select a non-monospaced font. Page Title Font. tabular output will not align properly. Text Output Font. Font used for text output. Text Output Page Size. some statistics are displayed only in wide format. Text output is designed for use with a monospaced (fixed-pitch) font. For some procedures. Figure 43-3 Options Draft Viewer tab . controls the page width (expressed in number of characters) and page length (expressed in number of lines). and color for new output titles. Controls the font style. Draft Viewer Options Draft Viewer output display options affect only new output produced after you change the settings. size.517 Options Title Font. Controls the font style. size. Output already displayed in the Draft Viewer is not affected by changes in these settings.

some statistics are displayed only in wide format. Font used for new output. specify a number of characters for the column width. charts.518 Chapter 43 Display Output Items. by default all line wrapping is removed and each column is set to the width of the longest label or value in the column. Controls settings for pivot table output converted to tabular text output. This format is useful for copying and pasting results to word processing applications where you can use any font that you want (not only fixed-pitch fonts) and set the tabs to align output properly. Note: Tab-separated tabular output will not align properly in the Draft Viewer. tabular output (pivot tables converted to text output). Controls which items are automatically displayed each time that you run a procedure. Font.) Page Breaks Between. controls the page width (expressed in number of characters) and page length (expressed in number of lines). warnings. titles. For space-separated tabular output. Inserts page breaks between output from different procedures and/or between individual output items. You can also turn on or off the display of commands in the log. (Command syntax and automatic production are not available in the Student version. For text output other than converted pivot table output. notes. You can control the display of the following items: log. For some procedures. Tabular Output. and text output (space-separated output). You can copy command syntax from the log and save it in a syntax file for use with the automated Production Facility. Text Output. Column width and column separator specifications are available only if you select Spaces for the column separator. To limit the width of columns and wrap long labels. Only fixed-pitch (monospaced) fonts are available because space-separated text output will not align properly with a proportional font. .

You can display variable names. Text output is not affected by these settings. Descriptive variable and value labels (Variable view in the Data Editor. However. defined value labels. long labels can be awkward in some tables. Output already displayed in the Viewer is not affected by changes in these settings. Figure 43-4 Options Output Labels tab Output label options affect only new output produced after you change the settings. or a combination. Label and Values columns) often make it easier to interpret your results. defined variable labels and actual data values.519 Options Output Label Options Output Label options control the display of variable and data value information in the outline and pivot tables. . These settings affect only pivot table output.

Font. Fill Patterns and Line Styles.0. New charts can use either the settings selected here or the settings from a chart template file. The initial assignment of colors and patterns for new charts. Values greater than 1 make charts that are wider than they are tall. Chart Aspect Ratio. Cycle through patterns uses only patterns to differentiate chart elements and does not use color. . its aspect ratio cannot be changed.1 to 10. Cycle through colors. To create a chart template file. The width-to-height ratio of the outer frame of new charts. You can specify a width-to-height ratio from 0. create a chart with the attributes that you want and save it as a template (choose Save Chart Template from the File menu). then patterns uses the default palette of 14 colors and then adds patterns to colors if necessary.520 Chapter 43 Chart Options Figure 43-5 Options Charts tab Chart Template. Click Browse to select a chart template file. Font used for all text in new charts. A value of 1 produces a square chart. Values less than 1 make charts that are taller than they are wide. Once a chart is created.

Grid Lines. . Controls the display of scale and category axis grid lines on new charts. the following options are available: ChartLook. the list displays the ChartLooks saved in the Looks directory of the directory in which the program is installed. Interactive Chart Options Figure 43-6 Options Interactive tab For interactive charts (Graphs menu. Note: These settings have no effect on interactive charts (the Graphs menu’s Interactive submenu). choose ChartLooks from the Format menu). You can use one of the ChartLooks provided with the program. Select a ChartLook from the list of files and click OK or Apply. Interactive submenu).521 Options Frame. or you can create your own in the Interactive Graphics Editor (in an activated chart. Controls the display of inner and outer frames on new charts. By default.

and background colors. However. lower resolution charts print faster. such as the size of the data region in a chart. In most cases. you can specify the minimum number of data values for a numeric variable used to classify the variable as scale or categorical. or centimeters) for specifying attributes. Any variable with defined value labels is classified as categorical. Measurement system used (points. Reading Pre-8. . Controls information saved with interactive charts once the charts are no longer attached to the data file that created them (for example. Pivot Table Options Pivot Table options sets the default TableLook used for new pivot table output. Measurement Units. Variables with fewer than the specified number of unique values are classified as categorical. if you open a Viewer file saved in a previous session). inches.522 Chapter 43 n Directory. regardless of the number of unique values. Print Resolution. and color. Allows you to select a ChartLook directory. particularly for large data files. this can substantially increase the size of Viewer files. For bitmaps. n Browse. size. Note: These settings affect only interactive charts (the Graphs menu’s Interactive submenu). For data files created in previous versions of SPSS. higher resolution charts look better. Allows you to select a ChartLook from another directory. TableLooks can control a variety of pivot table attributes.0 Data Files. Controls the print resolution of interactive charts. Data Saved with Chart. Saving data with the chart enables you to perform most of the interactive functions available for charts attached to the data file that created them (except adding variables that weren’t included in the original chart). Vector metafile will print faster and provide the best results. font style. including the display and width of grid lines. Use Browse to add directories to the list.

Controls the automatic adjustment of column widths in pivot tables. n Browse. the list displays the TableLooks saved in the Looks directory of the directory in which the program is installed. Allows you to change the default TableLook directory. the column label or the largest data value. This produces more compact tables. By default. n Labels only. Adjusts column width to whichever is larger. This produces wider tables. Allows you to select a TableLook from another directory.523 Options Figure 43-7 Options Pivot Tables tab TableLook. Select a TableLook from the list of files and click OK or Apply. but data values wider than the label will not be displayed (asterisks indicate values too wide to be displayed). but it ensures that all values will be displayed. or you can create your own in the Pivot Table Editor (choose TableLooks from the Format menu). . You can use one of the TableLooks provided with the program. n Labels and data. n Set TableLook Directory. Adjusts column width to the width of the column label. Adjust Column Widths for.

such as a statistical procedure. There is no default display format for new string variables. Controls the default display width and number of decimal places for new numeric variables. Display Format for New Numeric Variables. Data Options Figure 43-8 Options Data tab Transformation and Merge Options. select Calculate values before used to delay execution and save processing time.524 Chapter 43 Default Editing Mode. For large data files. Each time the program executes a command. it reads the data file. If a value is too large for the specified display format. Controls activation of pivot tables in the Viewer window or in a separate window. By default. Some data transformations (such as Compute and Recode) and file transformations (such as Add Variables and Add Cases) do not require a separate pass of the data. and execution of these commands can be delayed until the program reads the data to execute another command. You can choose to activate pivot tables in a separate window or select a size setting that will open smaller pivot tables in the Viewer window and larger pivot tables in a separate window. . double-clicking a pivot table activates the table in the Viewer window.

select the format name from the source list and make the changes that you want. Set Century Range for 2-Digit Years. CCD. CCC. beginning 69 years prior to and ending 30 years after the current year (adding the current year makes a total range of 100 years). Figure 43-9 Options Currency tab . the value 123456. 10/28/86. Display formats do not affect internal data values. Currency Options You can create up to five custom currency display formats that can include special prefix and suffix characters and special treatment for negative values. 29-OCT-87).525 Options first decimal places are rounded and then values are converted to scientific notation. The automatic range setting is based on the current year. For example. and CCE. CCB. To modify a custom currency format. You cannot change the format names or add new ones. Defines the range of years for date-format variables entered and/or displayed with a two-digit year (for example. the ending year is automatically determined based on the value that you enter for the beginning year.78 may be rounded to 123457 for display. For a custom range. The five custom currency format names are CCA. but the original unrounded value is used in any calculations.

A global procedures file is a library of script subroutines and functions that can be called by script files. suffix. CCB. including customizing pivot tables. Select one of the currency formats from the list (CCA. You can use scripts to automate many functions. suffixes. including autoscript files. Script Options Use the Scripts tab to specify your global procedures file and autoscript file. Many of the available scripts use functions and subroutines in this global procedures file and will not work if you specify a different global procedures file. . Enter the prefix. and decimal indicators defined for custom currency formats are for display purposes only.526 Chapter 43 Prefixes. To Create Custom Currency Formats Click the Currency tab. CCC. and select the autoscript subroutines that you want to use. CCD. and decimal indicator values. An autoscript file is a collection of script subroutines that run automatically each time you run procedures that create certain types of output objects. You cannot enter values in the Data Editor using custom currency characters. Note: The global procedures file that comes with the program is selected by default. CCE). Global Procedures. Autoscripts. Click OK or Apply.

You can also specify a different autoscript file or global procedure file. Select the autoscript subroutines that you want to enable.527 Options Figure 43-10 Options Scripts tab All of the subroutines in the current autoscript file are displayed. allowing you to enable and disable individual subroutines. . Select Enable Autoscripting. To Specify Global Procedure File and Autoscript File Click the Scripts tab.

.

Lotus 1-2-3 release 3. tab-delimited. 529 . With the Menu Editor you can: n Add menu items that run customized scripts. n Add menu items that run command syntax files.Chapter 44 Customizing Menus and Toolbars Menu Editor You can use the Menu Editor to customize your menus. Excel 4. and dBASE IV. You can send data to other applications in the following formats: SPSS. Select the menu item above which you want the new item to appear. To Add Items to the Menus From the menus choose: Utilities Menu Editor… In the Menu Editor dialog box.0. double-click the menu to which you want to add a new item. Click Insert Item to insert a new menu item. n Add menu items that launch other applications and automatically send data to other applications. SYLK.

Customizing Toolbars You can customize toolbars and create new toolbars.530 Chapter 44 Select the file type for the new item (script file. and create new toolbars. Toolbars can contain any of the available tools. run command syntax files. Toolbars can contain any of the available tools. run command syntax files. Optionally. you can automatically send the contents of the Data Editor to another application when you select that application on the menus. including tools for all menu actions. Click Browse to select a file to attach to the menu item. or run script files. customize toolbars. or run script files. or external application). Show Toolbars Use Show Toolbars to show or hide toolbars. They can also contain custom tools that launch other applications. including tools for all menu actions. Figure 44-1 Menu Editor dialog box You can also add entirely new menus and separators between menu items. . They can also contain custom tools that launch other applications. command syntax file.

or click New Toolbar to create a new toolbar. Drag and drop the tools you want onto the toolbar displayed in the dialog box. For new toolbars. drag it anywhere off the toolbar displayed in the dialog box. and click Customize.531 Customizing Menus and Toolbars Figure 44-2 Show Toolbars dialog box To Customize Toolbars From the menus choose: View Toolbars… Select the toolbar you want to customize and click Customize. select the windows in which you want the toolbar to appear. enter a name for the toolbar. Select an item in the Categories list to display available tools in that category. To remove a tool from the toolbar. .

to run a command syntax file. run a command syntax file. Click Browse to select a file or application to associate with the tool. Toolbar Properties Use Toolbar Properties to select the window types in which you want the selected toolbar to appear. This dialog box is also used for creating names for new toolbars.532 Chapter 44 To create a custom tool to open a file. or run a script). Select the action you want for the tool (open a file. Figure 44-3 Toolbar Properties dialog box . which also contains userdefined menu items. Enter a descriptive label for the tool. or to run a script: Click New Tool in the Customize Toolbar dialog box. New tools are displayed in the User-Defined category.

533 Customizing Menus and Toolbars To Set Toolbar Properties From the menus choose: View Toolbars… For existing toolbars. click New Tool. run command syntax files. For new toolbars. Select the window types in which you want the toolbar to appear. Customize Toolbar Use the Customize Toolbar dialog box to customize existing toolbars and create new toolbars. and then click Properties in the Customize Toolbar dialog box. or run script files. also enter a toolbar name. They can also contain custom tools that launch other applications. For new toolbars. Toolbars can contain any of the available tools. click Customize. Figure 44-4 Customize Toolbar dialog box . including tools for all menu actions.

and run script files. and other applications. syntax. .534 Chapter 44 Create New Tool Use the Create New Tool dialog box to create custom tools to launch other applications. This is particularly useful for custom tools you create to run scripts. Figure 44-5 Create New Tool dialog box Bitmap Editor Use the Bitmap Editor to create custom icons for toolbar buttons. run command syntax files.

Click the tool with the bitmap icon you want to edit on the example toolbar. Use the toolbox and the color palette to modify the bitmap or create a new bitmap icon.535 Customizing Menus and Toolbars Figure 44-6 Bitmap Editor To Edit Toolbar Bitmaps From the menus choose: View Toolbars… Select the toolbar you want to customize and click Customize. Click Edit Tool. .

.

Chapter 45 Production Facility The Production Facility provides the ability to run the program in an automated fashion. A command syntax file is a simple text file containing command syntax. such as weekly reports. The Production Facility uses command syntax files to tell the program what to do. so you can perform other tasks while it runs. you can view and edit them from the Production Facility. The program runs unattended and terminates after executing the last command. You can use any text editor to create the file. Production mode is useful if you often run the same set of time-consuming analyses. You can also generate command syntax by pasting dialog box selections into a syntax window or by editing the journal file. Figure 45-1 Production Facility 537 . After you create syntax files and include them in a production job.

Viewer output produces pivot tables and high-resolution. The output file is a Viewer document. For example. Click the Run button on the toolbar. Save the production job file. n Continuation lines must be indented at least one space. To use the Production Facility: Create a command syntax file. Text output can be edited in the Draft Viewer. Click Add to select the syntax files. . n The period at the end of the command is optional.538 Chapter 45 Production job results. Draft Viewer output produces text output and metafile pictures of charts. If you generate command syntax by pasting dialog box choices into a syntax window. a production job file named prodjob. or from the menus choose: Run Production Job Syntax Rules for the Production Facility Syntax rules for command syntax files used in the Production Facility are the same as the rules for Include files: n Each command must begin in the first column of a new line.spo.spo. Run the production job file. Each production run creates an output file with the same name as the production job and the extension . available on the Start menu. the format of the commands is suitable for the Production Facility. Specify the syntax files that you want to use in the production job. but charts cannot be edited in the Draft Viewer. interactive charts.spp creates an output file named prodjob. Start the Production Facility. Output Type.

not relative to your local computer. If you have network access to the remote server version of SPSS.sav’. we recommend that you use UNC (universal naming convention) path names to specify the location of data files in your command syntax files.539 Produc tion Facility UNC path names. Relative path specifications for data files are relative to the current server in distributed analysis mode. Figure 45-2 Command syntax pasted from dialog box selections . as in: GET FILE = ’\\hqdev01\public\july\sales.

Output Document (No Charts). and it saves charts in a variety of common formats used by other applications. For Word/RTF documents. charts are exported in Windows metafile format and embedded in the Word document. and charts. n Charts are not included in Excel documents. and you should export charts in a suitable format for inclusion in HTML documents. n For HTML and text formats. text. JPEG. export formats include: Windows metafile (WMF). text output. For text document format. n For Word/RTF format. PNG. charts are embedded by reference. Windows bitmap (BMP). Exports any combination of pivot tables. . charts are always exported in Windows metafile format. indicating the filename of the exported chart. Figure 45-3 Export Options dialog box Export This drop-down list specifies what you want to export. Output Document. a line is inserted in the text file for each chart. charts are exported in the currently selected chart export format. TIFF. and Excel format. and Macintosh PICT. Exports pivot tables and text output. Exports charts only. Any charts in the Viewer are ignored. Charts Only. Word/RTF. For HTML document format. For HTML and text documents. encapsulated PostScript (EPS).540 Chapter 45 Export Options Export Options saves pivot tables and text output in HTML.

a sequential number. etc. pivot tables and text are exported in the following manner: n HTML file (*. Text and Image Options Text export options (for example. size. and Excel. cell borders. color settings. TIFF. Image Format Image Format controls the export format for charts. Windows bitmap (BMP). n Text file (*. Text output in SPSS is always displayed in a fixed-pitch font and is exported with the same font attributes. the available options are HTML. background colors.gif. for HTML and text formats. n Excel file (*. or Macintosh PICT. and cells.gif. with the entire contents of the line contained in a single cell. n Word/RTF file (*. Text output is exported as formatted RTF. Pivot tables can be exported in tab-separated or space-separated format. Use Export on the File menu in SPSS to change text and chart export options. Pivot tables are exported as Word tables with all formatting attributes—for example. Each line in the text output is a row in the Excel file.541 Produc tion Facility Export Format For output documents. A fixed-pitch (monospaced) font is required for proper alignment of space-separated text output. prodjob2. CGM. font styles. Exported chart names are based on the production job filename. with all formatting attributes—for example. and cells are exported as Excel rows. prodjob3. charts are exported in the selected chart format. Text output is exported with all font attributes. . and the extension of the selected format. etc. PNG. Text output is exported as preformatted HTML.txt). select a chart export format from the drop-down list. if the production job prodjob.gif. columns. Charts can be exported in the following formats: Windows metafile (WMF). cell borders. text.doc). All text output is exported in space-separated format.htm). font styles. For output documents. the chart names would be prodjob1. encapsulated PostScript (EPS). Pivot tables are exported as HTML tables.spp exports charts in Windows metafile format. and so on. tab-separated or space-separated) and chart export options (for example. For example. Word/RTF. For Charts Only. background colors. Pivot table rows. columns. JPEG.xls). and resolution) are set in SPSS and cannot be changed in the Production Facility.

User Prompts Macro symbols defined in a production job file and used in a command syntax file simplify tasks such as running the same analysis for different data files or running the same set of commands for different sets of variables. The macro name used in the command syntax file to invoke the macro that prompts the user to enter information. The macro symbol name must begin with an @ and cannot exceed eight characters. Figure 45-4 User Prompts dialog box Macro Symbol. you could define the macro symbol @datfile to prompt you for a data filename each time you run a production job that uses the string @datfile in place of a filename. Prompt. The descriptive label that is displayed when the production job prompts you to enter information. Charts for Draft Viewer output cannot be exported. . For example. For example.542 Chapter 45 Draft Viewer Export The only Export option available for Draft Viewer output is to export the output in simple text format. you could use the phrase “What data file do you want to use?” to identify a field that requires a data filename.

This value is displayed when the production job prompts you for information. leave the field blank or enter N or No. Otherwise. Enclose Value in Quotes? Enter Y or Yes if you want the value enclosed in quotes. The value that the production job supplies by default if you don’t enter a different value. You can replace or modify the value at runtime. you should enter Yes for a filename specification because filename specifications should be enclosed in quotes.543 Produc tion Facility Default. Figure 45-5 Macro prompts in a command syntax file . For example.

Figure 45-6 Production macro prompting dialog box Production Options Production Options enable you to: n Specify a default text editor for syntax files accessed with the Edit button in the main dialog box.544 Chapter 45 Production Macro Prompting The Production Facility prompts you for values whenever you run a production job that contains defined macro symbols. . and password for distributed analysis (applicable only if you have network access to the server version of SPSS). n Specify a remote server. Those values are then substituted for the macro symbols in all command syntax files associated with the production job. n Run the production job as an invisible background process or display the results it generates as the job runs. You can replace or modify the default values that are displayed. domain name. If you don’t specify these settings. Switch Server. Add). user ID. You can select only remote servers that you have previously defined in the Add Server dialog box in SPSS (File menu. the default settings in the SPSS Server Login dialog box are used.

. you can control many pivot table attributes. Options.545 Produc tion Facility Figure 45-7 Options dialog box Changing Production Options From the Production Facility menus choose: Edit Options. By editing and saving TableLooks (Format menu in an activated pivot table). colors. Output label options (Edit menu. To ensure that wide tables do not split across pages. and borders. Format Control for Production Jobs There are a number of settings in SPSS that can help ensure the best format for pivot tables created in production jobs: TableLooks. Output Labels tab) control the display of variable and data value information in pivot tables. You can specify font sizes and styles. Output labels. You can display variable . select Rescale wide table to fit page on the Table Properties General tab..

Using SET commands in syntax files enables you to use multiple TableLooks and Options settings in the same job. Click the Pivot Tables tab. This produces more compact tables. From the menus choose: Edit Options.. n Labels and data adjusts the column width to whichever is larger. long labels can be awkward in some tables. Options. Select a TableLook from the list and click Edit Look. the column label or the largest data value.. n Labels only adjusts the column width to the width of the column label. . Adjust the table properties for the attributes that you want. but it ensures that all values will be displayed.. Column width. however. Click Save Look or Save As to save the TableLook and click OK. Creating a Custom Default TableLook Activate a pivot table (double-click anywhere in the table). or you can use SET commands in your syntax files to control them. but data values wider than the label will not be displayed (asterisks indicate values too wide to be displayed). actual data values and/or defined value labels. You can set the TableLook and Options settings before running your production job.. This produces wider tables.546 Chapter 45 names and/or defined variable labels. From the menus choose: Format TableLook. Pivot table options (Edit menu. Select the TableLook from the list and click OK. Production jobs use the current TableLook and Options settings in effect. Pivot Table tab) control the default TableLook and the automatic adjustment of column widths in pivot tables. Descriptive variable and value labels often make it easier to interpret your results.

. as in: n SET TLOOK = ’c:\prodjobs\mytable. Options settings are saved with the program. Controlling Pivot Table Format with Command Syntax SET TLOOK. the Options settings in effect the last time that you ran the program are applied to the production job. and automatic column width adjustment with Options. Controls the display of variable names and labels in new pivot tables. n SET TVARS = NAMES displays variable names. n SET ONUMBER = VALUES displays data values. You can set the default TableLook. SET ONUMBER. n SET TFIT = LABELS adjusts column width to the width of the column label. output label settings. n SET TFIT = BOTH adjusts column width to the width of the column label or the largest data value. Controls the default TableLook for new pivot tables.547 Produc tion Facility Setting Options for Production Jobs From the menus choose: Edit Options. Click OK. whichever is wider. Controls automatic column width adjustment for new pivot tables. Select the options that you want.. When you run a production job. n SET ONUMBER = BOTH displays data values and value labels. Controls the display of data values or value labels in new pivot tables. SET TVARS. SET TFIT. n SET ONUMBER = LABELS displays value labels. . n SET TVARS = LABELS displays variable labels. n SET TVARS = BOTH displays both variable names and labels.tlo’.

Name or IP address of the remote server. Domain name. enclose the value in quotes or apostrophes. Port number. User ID for remote server access. -u.exe) and the production job. and -p). Runs the production job. and both should be enclosed in quotes. as in: "c:\program files\spss\spssprod. If you have network access to the server version of SPSS. -p. -d. you must supply the requested information before the production job will run.exe" "c:\spss\datajobs\prodjob. You can run production jobs from a command line with the following switches: -r. the default server and related information (if not specified in command line switches) is the default . -s. Runs the production job and suppresses any user prompts or alerts. you can also use the following switches to run the Production Facility in distributed analysis mode: -x.spp" -s -r For command line switches that require additional specifications. Distributed analysis. -n. You should provide the full path for both the Production Facility (spssprod. the switch must be followed by an equals sign followed immediately by the specification. -d. If you specify any of the command lines switches for distributed analysis. The default user prompt values are used automatically. -u. If you have network access to the server version of SPSS. -n. If the specification contains spaces (such as a two-word server name).548 Chapter 45 Running Production Jobs from a Command Line Command line switches enable you to schedule production jobs to run at certain times with scheduling utilities like the one available in Microsoft Plus!. Password for remote server access. as in: -x="HAL 9000" -u="secret word" Default server. you must specify all of the distributed analysis command line switches (-x. If the production job contains any user prompts.

All pivot tables and all text tables are published. (By default. specify null quoted strings for all of the distributed analysis command line switches. n Nothing. n Tables Only. Since all settings are saved with the production job (. This turns off publishing while still generating other types of output (Viewer files. Turns off publishing to the Web. . using a standard browser.spp file). Excludes charts. Allows you to specify the output that you want to publish: n Output Document. the job runs in local mode. in real time. n Text output is published as preformatted HTML. n Charts Only. results will be published every time that you run the production job unless you select Nothing. HTML files) specified in the production job.exe" "c:\spss\datajobs\prodjob.spp" -x="" -n="" -d="" -u="" -p="" Publish to Web Publish to Web exports output for publishing to SmartViewer Web Server. including hidden or collapsed items. If no default is specified there. Tables and reports published in SmartViewer can be viewed and manipulated over the Web. Publishes only the charts in the document.) Publish. If you want to run a production job in local mode but your local computer is not your default server. Excludes charts and Notes tables.549 Produc tion Facility server specified the SPSS Server Login dialog box. Publishes everything but the Notes tables that are automatically produced for each procedure. n Tables Only (No Notes). Publishes the entire output document. n Output Document (No Notes). most Web browsers use a fixed-pitch font for preformatted text. as in: "c:\program files\spss\spssprod. n Pivot tables are published as dynamic tables that can be manipulated over the Web to obtain different views of the data. n Charts are published as JPEG or PNG graphic files.

Tables are dynamic objects that can be manipulated over the Web to obtain different views of the data. This information is stored in the production job in encrypted format. Controls how pivot tables are published: n Interactive. If SmartViewer is unavailable at your site. Configure. . n Static. you will be prompted for your user ID and password. When you create a new production job to publish to the Web. Contact your system administrator or Webmaster for more information. Tables are static and cannot be manipulated after publishing. use Export Output to save output in HTML format. A user ID and password are also required to access the SmartViewer Web Server. Note: Publish to Web is available only for sites with SmartViewer Web Server installed and requires a plug-in to activate the publishing feature.550 Chapter 45 Publish Tables as. Contact your system administrator or Webmaster for instructions on downloading the plug-in. This is required when you create a new production job to publish to the Web. SmartViewer Web Server Login Publishing to SmartViewer Web Server requires a valid SmartViewer Web Server user name (user ID) and password. Opens the SmartViewer Web Server “Configure Automated Publishing” page in a browser window.

you can begin by choosing from a number of starter scripts. If you want to create your own scripts. n Export charts as graphic files in a number of formats. including autoscripts that run automatically every time a specific type of output is produced. A number of scripts are included with the software. including: n Automatically customize output in the Viewer. 551 . You can use these scripts as they are or you can customize them to your needs. n Display and manipulate dialog boxes. n Open and save data files.Chapter 46 Scripting Facility The scripting facility allows you to automate tasks. n Run data transformations and statistical procedures using command syntax.

Figure 46-1 Run Script dialog box Select the Scripts folder. The table must be selected before running the script.. For instructions on running a script from a menu or toolbar. Clean navigator. Select the script you want. The following scripts are included with the program: Analyze held out cases. Delete all Notes tables from an output document. The document must be open in the designated Viewer window before running the script. Repeats a Factor or Discriminant analysis using cases not selected in a previous analysis. . see Chapter 44. A Notes table produced by a previous run of Factor or Discriminant must be selected before running the script. to p= in the column labels of any pivot table.552 Chapter 46 To Run a Script From the menus choose: Utilities Run Script. Change Sig. Change significance to p..

The Scripts tab of the Options dialog box (Edit menu) displays the autoscripts that are available on your system and allows you to enable or disable individual scripts. Autoscripts Autoscripts run automatically when triggered by the creation of a specific piece of output by a given procedure. The Frequencies Statistics table must be selected before running the script. For example. Means report. apply the bold format and blue color to the row corresponding to the model that maximizes adjusted R2. The Means table must be selected before running the script. The Notes table must be selected before running the script. Remove labels. the script attempts to read the data file used originally. Extract information from a Means table and write results to several output ASCII files. Note: This list may not be complete. Insert statistics displayed in a Frequencies Statistics table as footnotes in the corresponding frequency table for each variable. or layer of data labeled Total in a pivot table. .553 Scripting Facility Frequencies footnote. Rsquare max. Apply the bold format and blue color to any row. column. Make totals bold. Rerun syntax from note. In a Regression Model Summary table. Delete all row and column labels from the selected pivot table. The table must be selected before running the script. Resubmit the command found in the selected Notes table using the active data file. If no data file is open. The Model Summary table must be selected before running the script. there is an autoscript that automatically removes the upper diagonal and highlights correlation coefficients below a certain significance whenever a Correlations table is produced by the Bivariate Correlations procedure. The table must be selected before running the script.

and you can have a different autoscript for each. An autoscript that formats the ANOVA tables produced by One-Way ANOVA is not triggered by ANOVA tables produced by other statistical procedures (although you could use global procedures to create separate autoscripts for these other ANOVA tables that shared much of the same code). For example. Frequencies produces both a frequency table and a table of statistics. . However. you can have a separate autoscript for each type of output produced by the same procedure.554 Chapter 46 Figure 46-2 Scripts tab of Options dialog box Autoscripts are specific to a given procedure and output type.

you can begin by choosing from a number of starter scripts.555 Scripting Facility Creating and Editing Scripts You can customize many of the scripts included with the software for your specific needs. Figure 46-3 Modifying a script in the Script Editor If you prefer to create your own scripts. For example. You can easily modify this script to remove output items of any type and label you want. there is a script that removes all Notes tables from the designated output document. .

If you open more than one script. Script Window The script window is a fully featured programming environment that uses the Sax BASIC language and includes a dialog box editor. each opens in its own window. .556 Chapter 46 To Edit a Script From the menus choose: File Open Script Figure 46-4 Opening a script file Select the Scripts folder. debugging features. object browser. select SPSS Script (*. Select the script you want.sbs). Under Files of Type. and context-sensitive Help.

You can also click these terms and press F1 for Help. but only where they appear in valid statements and are colored magenta. n Terms colored magenta are objects. You can access context-sensitive Help on these terms by clicking them and pressing F1. the name of the current procedure is displayed at the top of the window. . and methods. which displays objects. properties. properties. End Sub. n Press F2 at any time to display the object browser.557 Scripting Facility Figure 46-5 Script window n As you move the cursor. and Dim). n Terms colored blue are reserved words in BASIC (for example Sub. (Clicking the name of an object in a comment will not work because it brings up Help on the Sax BASIC language rather than on SPSS objects.) n Comments are displayed in green. or methods.

Starter Scripts When you create a new script. You can specify different colors for these elements and change the size and font for all text. . By default. Sax BASIC terms are blue. To Set Script Window Properties From the menus choose: Script Editor Properties… Figure 46-6 Editor Properties dialog box To change the color of a code element type. and methods are magenta. comments are green. properties.558 Chapter 46 Script Editor Properties Code elements in the script window are color-coded to make them easier to distinguish. and names of valid objects. select the element and choose a color from the drop-down palette. you can begin by choosing from a number of starter scripts.

column. Reformat a pivot table based upon the value of data cells or a combination of data cells and labels.559 Scripting Facility Figure 46-7 Use Starter Script dialog box Each starter script supplies code for one or more common procedures and is commented with hints on how to customize the script to your particular needs. the Hide empty rows and columns option must be selected in the Table Properties dialog box. you can use any of the other available scripts as starter scripts. Reformat a pivot table footnote. Delete navigator items. Reformat a pivot table based upon the row. or caption. Footnote. Reformat by value. Reformat or change the text in a pivot table title. change the text in a footnote. or add a footnote. In addition. Delete by label. or layer labels. . Delete items from the Viewer based on a number of different criteria. In order for this script to work. Reformat by labels. corner text. Reformat misc pivot. although they may not be as easy to customize. Just open the script and save it with a different filename. Delete rows or columns in a pivot table based on the contents of the RowLabels or ColumnLabels.

Figure 46-8 Creating a new autoscript Each autoscript you create is added to the current autoscript file (autscript. by default) as a new procedure. If you do not want to use a starter script. to create an autoscript that runs whenever a frequency table is produced. click Cancel. For example. The name of the procedure references the event that serves .560 Chapter 46 To Create a Script From the menus choose: File New Script… Select a starter script if you want to begin with one. create a frequency table in the usual manner and single-click the table in the Viewer to select it. Creating Autoscripts You create an autoscript by starting with the output object that you want to serve as the trigger. You can then right-click or use the Utilities menu to create a new autoscript triggered whenever that type of table is produced.sbs.

a new autoscript is created. the name of the autoscript subroutine would be Explore_Table_Descriptives_Create. If an autoscript already exists. From the menus choose: Utilities Create/Edit Autoscript… If no autoscript exists for the selected object. Figure 46-9 New autoscript procedure displayed in script window This makes autoscripts easier to develop because you do not need to write code to get the object you want to operate on. To Create an Autoscript Select the object you want to serve as a trigger in the Viewer. Type the code. but it requires that autoscripts are specific to a given piece of output and statistical procedure. For example.561 Scripting Facility as the trigger. choose Options to enable or disable the autoscript. From the Edit menu. if you create an autoscript triggered whenever Explore creates a Descriptives table. . the existing script is displayed.

Creation of warnings. The following events can trigger autoscripts: Creation of pivot table. Creation of notes. Correlations_Table_Correlations_Create. Figure 46-10 Autoscript procedure for Correlations table Creation of title.562 Chapter 46 Events That Trigger Autoscripts The name of the autoscript procedure references the event that serves as the trigger. The name of the procedure references both the table type and the procedure that created it—for example. . Referenced to the statistical procedure that created it: Correlations_Title_Create. Referenced by the procedure that created it. Referenced to the procedure that created it: Correlations_Notes_Create.

Figure 46-11 Autoscript subroutines displayed in Options dialog box The Options dialog box also displays all of the autoscripts in the currently selected autoscript file. For example. but only one can be active at any one time. Any new autoscripts you create are also added to this file. The default autoscript file is autscript. each of which is saved in a separate file). you could write a script that invokes the Correlations procedure. The name of the current autoscript file is displayed in the Scripts tab of the Options dialog box (Edit menu).563 Scripting Facility You can also use a script to trigger an autoscript indirectly. The Autoscript File All autoscripts are saved in a single file (unlike other scripts.sbs. . allowing you to enable and disable individual scripts. which in turn triggers the autoscript registered to the resulting Correlations table. You can specify a different autoscript file.

Then. First. The collection of all object classes (or types) is called the type library. at each step using properties or methods of objects higher in the hierarchy to get at the objects beneath. pivot tables are a class of objects. Figure 46-12 Tree view of object hierarchy Using objects is a two-step process. For example. With objects of this class. and you can use the TextColor property to change the color of selected text.564 Chapter 46 How Scripts Work Scripts work by manipulating objects using properties and methods. you can use the SelectTable method to select all of the elements in the table. You get objects by navigating the hierarchy of objects. For example. you create a reference to the object (called getting the object). Each object class has specific properties and methods associated with it. to get a . you use properties and methods to do something.

By convention. (This process has been referred to as “renaming the objects you want to use. Before writing a script. it is a good idea to declare all variables before using them. These are only conventions—you can name your variables anything you want—but following them makes it much easier to understand your code. This is most often done using Dim declaration statements: Dim objOutputDoc As ISpssOutputDoc Dim objPivotTable As PivotTable Dim intType As Integer Dim strLabel As String Each declaration specifies the variable name and type. Each object that you get is stored in a variable. Each object class has specific properties and methods associated with it. The variable does not yet have a value because it has not been set to a particular output document. Each class represents a type of object that the program can create. SPSS object classes. the first declaration above creates an object variable named objOutputDoc and assigns this variable to the ISpssOutputDoc object class.565 Scripting Facility pivot table object. and string variables begin with str. At each step. the name of each variable indicates its type. .) One of the first steps in creating a script is often to declare variables for the objects that you need. you have to first get the output document that contains the pivot table and then get the items in that output document. For example. consider what objects you are manipulating and what properties of each object you are changing. (Remember that all you are really storing in the variable is a reference to the object. All the statement does is declare that the variable exists. use the mouse to perform the task several times as you normally would. Declaring Variables Although not always required. Tip: It is difficult to understand how scripts work if you do not understand how the program works.”) Variable naming conventions. such as an output document or pivot table. The collection of all SPSS object classes (or types) is referred to as the type library. integer variables begin with int. Object variable names begin with obj. ISpssOutputDoc and PivotTable are names of SPSS object classes.

For example. Notice that with the exception of pivot tables. Object Type or Class IspssApp ISpssOptions ISpssInfo ISpssDocuments ISpssDataDoc ISpssSyntaxDoc ISpssOutputDoc ISpssPrintOptions ISpssItems ISpssItem ISpssChart ISpssRtf PivotTable ISpssFootnotes ISpssDataCells ISpssLayerLabels ISpssLabels ISpssLabels ISpssPivotMgr ISpssDimension Variable Name objSpssApp—variable is global SPSS application SPSS options SPSS file information Documents Data document Syntax document Viewer document Print options Output items collection Output item Chart Text Pivot table Footnotes Data cells Layer labels Column labels Row labels Pivot manager Dimension and does not require declaration objSpssOptions objSpssInfo objDocuments objDataDoc objSyntaxDoc objOutputDoc objPrintOptions objOutputItems objOutputItem objSPSSChart objSPSSText objPivotTable objFootnotes objDataCells objLayerLabels objColumnLabels objRowLabels objPivotMgr objDimension Getting Automation Objects To get an object means to create a reference to the object so that you can use properties and methods to do something. Each object reference that you get is stored in a variable. object classes have names beginning with ISpss. to get the designated output document: Dim objOutputDoc As ISpssOutputDoc Set objOutputDoc = objSpssApp. To get an object.GetDesignatedOutputDoc .566 Chapter 46 The following variable names are used in the sample scripts included with the software and are recommended for all scripts. then set the variable to the specific object. first declare an object variable of the appropriate class.

and then get the collection of items in that output document. to get a pivot table object. the script produces an error.GetItem(2) ’get third output item ’(item numbers start at 0 so "2" gets third) objOutputItem. The second statement above gets the designated output document using GetDesignatedOutputDoc. you first get the output document that contains the pivot table. See below for another example that activates the first pivot table in the designated output document. and so on.Activate ’activate output item End sub Example: Getting the First Pivot Table This script gets the first pivot table in the designated output document and activates it.Items() ’get collection of items in doc Set objOutputItem = objOutputItems.567 Scripting Facility you use properties and methods of objects higher in the object hierarchy to get at the objects beneath. Sub Main Dim objOutputDoc As ISpssOutputDoc ’declare object variables Dim objOutputItems As ISpssItems Dim objOutputItem As ISpssItem Dim objPivotTable As PivotTable .GetDesignatedOutputDoc ’get reference to designated output doc Set objOutputItems = objOutputDoc. a method associated with the application object. which is the highest-level object. Example: Getting an Output Item This script gets the third output item in the designated output document and activates it. If that item is not an OLE object. Sub Main Dim objOutputDoc As ISpssOutputDoc’declare object variables Dim objOutputItems As ISpssItems Dim objOutputItem As ISpssItem Set objOutputDoc = objSpssApp. Similarly.

SPSSType()’get type of current item If intItemType = SPSSPivot Then Set objPivotTable = objOutputItem.Count()’get number of output items For index = 0 To intItemCount’loop through output items Set objOutputItem = objOutputItems. activate it Exit For End If Next index End sub Examples are also available in the online Help.Activate()’if item is a pivot table.GetDesignatedOutputDoc’get reference to designated output doc Set objOutputItems = objOutputDoc.GetItem(index)’get current item intItemType = objOutputItem.568 Chapter 46 Set objOutputDoc = objSpssApp.Items()’get collection of items in doc Dim intItemCount As Integer’number of output items Dim intItemType As Integer’type of item (defined by SpssType property) intItemCount = objOutputItems. and the uses are referred to as methods. Each object class has specific methods and properties that determine what you can do with that object. Object Property Method Pencil (real world) Pivot table (SPSS) Hardness Color TextFont DataCellWidths CaptionText Write Erase SelectTable ClearSelection HideFootnotes . the features are referred to as properties. OLE automation objects have features and uses. Properties and Methods Like real world objects. You can try them yourself by pasting the code from Help into the script window. In programming terminology.

569 Scripting Facility Using Properties Properties set or return attributes of objects. to get the caption of the activated pivot table and save it in a variable: strFontName = objPivotTable. For example.GetDesignatedOutputDoc Set objItems = objOutputDoc.ClearSelection Some methods return another object.CaptionText = "Anita’s results" When a property appears on the right side. For example. to set the caption for an activated pivot table (objPivotTable) to “Anita's results”: objPivotTable. allowing you to access the items in that output document: Set objOutputDoc = objSpssApp. you are reading from it.SelectTable or removing a selection: objPivotTable.Items . the GetDesignatedOutputDoc method returns the designated output document. When a property appears to the left side of an equals sign. such as selecting all the elements in a table: objPivotTable. you are writing to it. For example.CaptionText Using Methods Methods perform actions on objects. Such methods are extremely important for navigating the object hierarchy. such as color or cell width.

You can also access Help on individual properties and methods and paste selected properties and methods into your script.. Figure 46-13 Object browser From the script window menus choose: Debug Object Browser..570 Chapter 46 The Object Browser The object browser displays all object classes and the methods and properties associated with each. Select an object class from the Data Type list to display the methods and properties for that class. . Select properties and methods for context-sensitive Help or to paste them into your script.

To Add a New Procedure in a Script From the menus choose: Script New Procedure. which makes it possible to share procedures between scripts. You can also call any procedure in the global script file. Organizing code in procedures makes it easier to manage and reuse pieces of code. Alternatively. A procedure begins with a statement that specifies the type of procedure and the name (for example. Figure 46-14 New Procedure dialog box Procedures can be subroutines or functions. As you scroll through the script window. aside from calls to subroutines that do most of the work. The Main procedure may contain few statements.. Type a name for the procedure. the name of the current procedure is displayed at the top of the script window. Within a script. Select Subroutine or Function. you can call any procedure as many times as you want.571 Scripting Facility Procedures A procedure is a named sequence of statements that are executed as a unit.. Scripts must have at least one procedure (the Main subroutine) and often they have several. you can create a new procedure by typing the statements that define the procedure directly in the script. Sub Main or Function DialogMonitor( )) and concludes with the appropriate End statement (End Sub or End Function). .

Procedures in the global script file can be called by all other scripts.sbs. You can also specify a different global file on the Scripts tab in the Options dialog box (Edit menu). That means that if you create a new global file and specify it as the global file. you can add it to the global script file. the procedures and functions in global. Global procedures must be called by other script procedures.572 Chapter 46 Global Procedures If you have a procedure or function that you want to use in a number of different scripts. but only one file can be active as the global file at any given time. . but you can edit it in only one window at a time.sbs are no longer available. You cannot run a global script directly from the Utilities menu or a script window. You can view the global script file in any script window (click the #2 tab on the left side of the window just below the toolbar). Figure 46-15 Global script file The default global script file is global. You can freely add procedures to this file.

For example: ’Begin Description ’This script changes "Sig. You do not need to type this code directly—the UserDialog Editor provides an easy.. graphical way to define the dialog box.. ’Requirement: The Pivot Table that you want to change must be selected. Just add a comment on the first line of the script that starts with Begin Description. The dialog box itself is defined by a Begin Dialog. and then create a dialog monitor function (DialogFunc) that monitors the dialog box and defines its behavior. ’End Description The description must be formatted as a comment (each line beginning with an apostrophe). Scripting Custom Dialog Boxes There are two steps to implementing a custom dialog box: first create the dialog box using the UserDialog Editor.End Dialog block. followed by End Description.573 Scripting Facility Adding a Description to a Script You can add a description to be displayed in the Run Script and Use Starter Script dialog boxes. followed by the desired comment (one or more lines)." to "p=" in the column labels of any pivot table. Figure 46-16 Creating a dialog box in the UserDialog Editor .

To Create a Custom Dialog Box In the script window. Right-click the form (with no control selected) and enter a name for the dialog monitor function in the DialogFunc field.574 Chapter 46 The Editor initially displays a blank dialog box form. Click the Save and Exit icon (far right on the toolbar) when you are finished. You have to edit your dialog monitor function manually to define the behavior of the dialog box. by selecting the appropriate tool and dragging with the mouse. After adding a control. Select tools from the palette and drag in the new dialog box form to add controls. click the cursor in the script where you want to insert the code for the dialog box. (Hold the mouse over each tool for a description. right-click the dialog box form (make sure no control is selected on the form) and enter a name for the function in the DialogFunc field. right-click the control to set properties for that control. Resize the dialog box by dragging the handles on the sides and corners.) You can also drag the sides and corners to resize the dialog box. Dialog monitor function.. The statements that define the function are added to your script. You can add controls. such as radio buttons and check boxes.. From the menus choose: Script Dialog Editor. . such as buttons and check boxes. although you will have to edit the function manually to define the behavior for each action. When finished. click the Save and Exit icon (far right on the toolbar) to add the code for the dialog box to your script. To create the dialog monitor function.

’statements to execute when dialog box is initialized Case 2 ’ value changing or button pressed . You must include all three parameters in the function definition even if you do not use all of them. Specify statements to execute when the dialog box is initialized. The parameters are values passed between the function and the dialog box. Case 3 ’ TextBox or ComboBox text changed .. You do not need to specify all five possible cases—only the ones that apply. The value of intAction indicates what action took place in the dialog box.. intAction = 1. omit Case 1. intSuppValue as Integer) Select Case intAction Case 1 ’ dialog box initialization . ’statements. Case 4 ’ focus changed . For example.. intAction changes to 2. and so on.. The function must be able to pass three parameters: one string (strDlgItem) and two integers (intAction and intSuppValue).. intSuppValue is 0. For example. depending on what action is taken. If the user presses a button.. Select Case intAction. if you do not want any statements to execute on initialization. For example. End Select End Function Parameters. when a user clicks a control in the dialog box. For example. . The second parameter (intAction) is a numeric value that indicates what action took place in the dialog box.575 Scripting Facility Dialog Monitor Functions (DialogFunc) A dialog monitor function defines the behavior of a dialog box for each of a number of specified cases. you could disable one or more controls or add a beep... The string strDlgItem is a null string. The third parameter is used for additional information in some cases... the name of the control is passed to the function as strDlgItem (the field name is specified in the dialog box definition). The function takes the following (generic) form: Function DialogFunc(strDlgItem as String. and you can specify statements that execute for each action as indicated below. when the dialog box initializes. n Case intAction = 1. Case 5 ’ idle . There are five possible actions... intAction as Integer.

and intSuppValue is the item that is losing focus (the first item is 0. Executes when the focus changes in the dialog box. strDlgItem is the item whose value has changed. If a button is pushed. see the examples and the DialogFunc prototype in the Sax BASIC Language Reference Help file. and intSuppValue is the new value. strDlgItem is the button. The string strDlgItem is a null string. See related sections for explanations of the BuildDialog subroutine and dialog monitor function. Set DialogFunc = True to continue receiving idle actions. Figure 46-17 Open Data File dialog box created by script . Executes when a button is pushed or when a value changes in a CheckBox. If a value changes. n Case 4. n Case 5. intSuppValue is 0. DropListBox. The string strDlgItem is gaining focus. The string strDlgItem is the control whose text changed and is losing focus. For more information. intSuppValue is the number of characters. ListBox or OptionGroup control.576 Chapter 46 n Case 2. Example: Scripting a Simple Dialog Box This script creates a simple dialog box that opens a data file. Executes when a value changes in a TextBox or ComboBox control. second is 1. and so on). Idle processing. and you must set DialogFunc = True to prevent the dialog from closing. n Case 3. intSuppValue is meaningless.

340.. .35.100. close dialog DialogFunc = False End Select End Select End Function Sub OpenDataFile(strFilename As Variant) ’Open data file with specified filename Dim objDataDoc As ISpssDataDoc Set objDataDoc = objSpssApp.577 Scripting Facility Sub Main Call BuildDialog End Sub ’define dialog box Sub BuildDialog Begin Dialog UserDialog 580. You can try them yourself by pasting the code from Help into the script window. intSuppValue As Integer) As Boolean Select Case intAction Case 1 ’ beep when dialog is initialized Beep Case 2 ’ value changing or button pressed Select Case strDlgItem Case "cmdOK" ’if user clicks OK."Open Data File". intAction As Integer.280.100.OpenDataDoc(strFilename) End Sub Examples are also available in the online Help..21.21.21.txtDialogTitle TextBox 40..DialogFunc Text 40.7. open data file with specified filename strFilename = DlgText("txtFilename") Call OpenDataFile(strFilename) DialogFunc = False Case "cmdCancel"’If user clicks Cancel.21..70.cmdOK CancelButton 470..cmdCancel End Dialog Dim dlg As UserDialog Dialog dlg End Sub ’define function that determines behavior of dialog box Function DialogFunc(strDlgItem As String.7.txtFilename OKButton 470."Data file to open:".28.

Step Into. Watch. Only statements in the current subroutine/function can be selected. The script pauses at the break point. Step Out. Step to Cursor. Show Next Statement. one line or subroutine at a time. Execute the current line. Display the value of the current expression. Use the toolbar (or hot keys) to continue stepping through the script. If the current line is a subroutine or function call. Execute to the current line. insert break points in the procedure that you want to debug. Set the next statement to be executed. and the debugging pane is displayed. Add Watch. If the current line is a subroutine or function call. Add the current expression to the watch window. along with the debugging toolbar. Object Browser. . To Step through a Script From the Debug menu. and then run the statistical procedure that triggers the autoscript. Toggle Break. stop on the first line of that subroutine or function. open the autoscript file in a script window. Execute to the next line. Step Over. Step out of the current subroutine or function call. executing one line or subroutine at a time and viewing the result. The Immediate. Display the next statement to be executed. Quick Watch. Stack. Insert or remove a break point. Set Next Statement. You can also insert a break point in the script to pause the execution at the line that contains the break point.578 Chapter 46 Debugging Scripts The Debug menu allows you to step through your code. execute the subroutine or function completely. Display the object browser. choose any of the Step options to execute code. To debug an autoscript. and Loaded tabs are displayed in the script window.

579 Scripting Facility Alternatively. Watch. and Loaded tabs are displayed. n Type subname args and press Enter to call a subroutine or built-in instruction. n Type ?expr and press Enter to show the value of expr. . Stack. The script pauses at the break point. Figure 46-18 Debugging pane displayed in script window Immediate tab. The Debugging Pane When you step through code. assign a variable. the Immediate. n Type var = expr and press Enter to change the value of var. or call a subroutine. Click the name of any variable and click the eyeglass icon to display the current value of the variable. You can also evaluate an expression. Trace mode prints each statement in the immediate window when a script is running. n Type Trace and press Enter to toggle trace mode. select Toggle Break to insert a break point at the current line.

Click any line to highlight that line in the edit window. or by embedding command syntax within a script. To display a variable. List the currently active scripts. the second line is the one that called the first. Script Files and Syntax Files Syntax files (*.sbs).sps) are not the same as script files (*. Displays the lines that called the current statement. The easiest way to build a command syntax file is to make selections in dialog boxes and paste the syntax for the selections into the script window. the part of the system that handles statistical computations and data transformations. click it and choose Add Watch from the Debug menu. Press Enter to update all the values immediately. You can combine scripts and syntax files for even greater flexibility. by running a script from within command syntax. and so on. Running Command Syntax from a Script You can run command syntax from within an automation script using the ExecuteCommands method. or expression. Press Ctrl-Y to delete the line. Syntax files have commands written in the command language that allows you to run statistical procedures and data transformations. . Stack tab. The first line is the current statement. Click a line to view that script. the command language provides an alternative method for communicating directly with the program’s back end. Displayed values are updated each time execution pauses. function. Command syntax allows you to run data transformations and statistical procedures and to produce charts. Much of this functionality cannot be automated directly from command scripts. You can edit the expression to the left of ->. While scripts allow you to manipulate output and automate other tasks that you normally perform using the graphical interface of menus and dialog boxes.580 Chapter 46 Watch tab. Loaded tab.

choose commands from the Statistics. Click Paste. otherwise. the Paste button pastes all of the code needed to run commands from within a script. commands will be pasted to a syntax window rather than the scripting window. Graphs. and Utilities menus to open dialog boxes. Note: You must use the script window menus to open the dialog box.581 Scripting Facility Figure 46-19 Pasting command syntax into a script When you open dialog boxes using the script window menus. To Paste Command Syntax into a Script From the script window menus. Make selections in the dialog box. .

SBS’. Running a Script from Command Syntax You can use the SCRIPT command to run a script from within command syntax. with the filename enclosed in quotes. Specify the name of the script you want to run. as follows: SCRIPT ’C:\PROGRAM FILES\SPSS\CLEAN NAVIGATOR. commands will be pasted to a syntax window rather than the scripting window.582 Chapter 46 Note: You must use the script window menus to open the dialog box. otherwise. .

” You can use the Database Access Administrator to specify up to three different views per database: Enterprise level. and Personal level. Instead. Both the Database Access Administrator and the Database Wizard recognize these files by the following names: n Enterprise level: dba01. The Database Access Administrator does not actually change your database. it will search your system’s path for these files and automatically display information for all three views of any data source you have configured. It allows users and administrators to customize their data source in the following ways: n Create aliases for database tables and fields.inf n Personal level: dba03. Department level.Appendix A Database Access Administrator The Database Access Administrator is a utility designed to simplify large or confusing data sources for use with the Database Wizard. which act as database “views. it generates files that hold all of your information. n Create variable names for fields.inf Each file contains level-specific information about any number of data sources. 583 . For example. and a database that you use to keep track of your CD collection.inf n Department level: dba02. n Hide extraneous tables and fields. your dba03. your company’s hourlog database. When you open the Database Access Administrator.inf file could contain personal view information for a corporate accounts database.

exe.inf. the original field (EmployeeSales. if the Employee Sales table is aliased as Employee Information at the Personal level. refer to its online Help. If the Regions table is hidden at the Enterprise level. For example.JOBCAT) would appear in the Database Wizard as 'Employee Information'. Example. it is invisible at both the Department and Personal levels. but it is aliased as Job Categories at the Department level. Each level’s file holds information about all of your data sources for that level. where the levels are. Aliases. Example.'Job Categories'. It appears as Job Categories at the Personal level. and Personal. and Hide Orders are inherited from the top down. .inf. your marketing department will have one file. that contains customized views of all of the databases that he or she uses. Variable Names. dba03. from highest to lowest. Whenever you use the Database Wizard. Enterprise. For more information about the Database Access Administrator. Additionally. The field JOBCAT in the EmployeeSales table is not aliased at the Enterprise level. run the file spssdbca. Department.584 Appendix A Inheritance and priorities. This table would not be displayed in the Database Wizard. it presents the lowest-level view of your data source that it can find on your system’s path. In the Database Access Administrator. To start the Database Access Administrator. that contains the aliasing information for all of the database views established for the marketing department. which is installed in your SPSS directory. Each person in the marketing department will have a file. dba02.

Appendix B Customizing HTML Documents You can automatically add customized HTML code to documents exported in HTML format. Note: If you change the name or location of the text file. Save the file as a text file. including: n HTML document titles n Document type specification n Meta tags and script code (for example.txt (located in the directory in which SPSS is installed) in a text editor. you have to modify the system registry to use the file to customize your exported HTML output. JavaScript) n Text displayed before and after exported output To Add Customized HTML Code to Exported Output Documents Open the file htmlfram. Replace the comments in the “fields” on the lines between the double open brackets (<<) with the text or HTML code you want to insert in your exported HTML documents. 585 .

choose: HHKEY_CURRENT_USER Software SPSS SPSS for Windows 11. From the Windows Start menu choose Run. comments that include document type specifications) << Text used as the document title (displayed in the title bar) << Meta tags or script code (for example. type regedit. and click OK.) To Use a Different File or Location for Custom HTML Code If you change the name or location of htmlfram. JavaScript code) << HTML code that modifies the <BODY> tag (for example. copyright notice) << Text and/or HTML code that is inserted before the exported output (for example. logo. company name. etc.txt. code that specifies background color) << Text and/or HTML code that is inserted after the exported output (for example. you must modify the system registry to use the file in customized HTML output. In the left pane of the Registry Editor. each delimited by two open angle brackets on the preceding line (<<): << Text or code that you want to insert at the top of the document before the <HTML> specification (for example.586 Appendix B Content and Format of the Text File for Customized HTML The HTML code that you want to add automatically to your HTML documents must be specified in a simple text file that contains six fields.5 Spsswin .

txt). double-click the string HTMLFormatFile.2//EN"> <HTML> <HEAD> <TITLE> NVI Sales. gimcracks"> . gadgets. Inc.gif" align=center></H4> << <h2 align=center>NVI Sales</h2> <h3 align=center>Regional Data</h3> Sample HTML Source for Customized HTML <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3..2//EN"> << NVI. gimcracks"> << bgcolor="#FFFFFF" << <H4 align=center>This page made possible by. gadgets. Sample Text File for Customized HTML << <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3. <br><br> <IMG SRC="spss2. << <META NAME="keywords" CONTENT="gizmos. c:\myfiles\htmlstuf.587 Customizing HTML Documents In the right pane. For Value data. </TITLE> <META NAME="keywords" CONTENT="gizmos. Inc.. enter the full path and name of the text file containing the custom HTML specifications (for example.

.588 Appendix B </HEAD> <BODY bgcolor="#FFFFFF"> <h2 align=center>NVI Sales</h2> <h3 align=center>Regional Data</h3> [Exported output] <H4 align=center>This page made possible by.gif" align=center></H4> </BODY> </HTML> . <br><br> <IMG SRC="spss2..

384 analysis of variance in Curve Estimation. 60 virtual active file. 489 backward elimination in Linear Regression. 278 ANOVA in GLM Univariate. 570 properties. 193 adding group labels. 563 creating. 424 options. 151. 60 creating a temporary active file. 424 Bivariate Correlations correlation coefficients. 315 model. 28 active file caching. 568 using in scripts. 570 autoscripts. 342 significance levels. 363 in Linear Regression. 473. 516 alpha coefficient in Reliability Analysis. 383 beta coefficients in Linear Regression. 248 in Data Editor. 5 ActiveX objects. 152 aggregate functions. 342 options. 560 trigger events. 339 missing values. 566. 357 bar charts in Frequencies. 327 aspect ratio. 187. 526 autoscript file. 269 Bartlett factor scores.Index Access (Microsoft). 315 Anderson-Rubin factor scores. 151 variable names and labels. 152 alignment. 323 in Means. 85 output. 537 automation objects methods. 342 block distance in Distances. 568 object browser. 424 statistics. 562 average absolute deviation (AAD) in Ratio Statistics. 520 automated production. 422 missing values. 85. 226 adjusted R2 in Linear Regression. 351 589 . 360 aggregating data. 339 statistics. 59 active window. 516 in cells. 187. 476 alpha factoring. 360 in Means. 360 Binomial Test dichotomies. 150. 564. 386 Bartlett’s test of sphericity in Factor Analysis. 386 Andrews’ wave estimator in Explore. 296 in One-Way ANOVA. 296 in One-Way ANOVA.

158. 231 borders. 233 margins. 279 comparing variables. 154. 93 inserting new cases. 497 options. 142. 157. 503. 279 break points. 252 case-control study Paired-Samples T Test. 93. 351 . 156. 246 fonts. 160 finding in Data Editor. 233 value formats. 516 chart options. 201. 500. 128 BMP files. 215 Draft Viewer. 196. 136 centering output. 360 categorical data. 158 casewise diagnostics in Linear Regression. 91 restructuring into variables. 130 cell borders. 187. 246 cells in pivot tables alignment. 520 case labels. 540 footnotes. 194. 185. 319 bookmarking pivot table views. 160 selecting subsets. 520. 496 templates. 196. 363 copying. 203. 215 Box’s M test in Discriminant Analysis. 351 chi-square in Crosstabs. 501 Chebychev distance in Distances. 320 buttons. 534 cache active file. 203. 520 charts. 191 missing values. 373 box-and-whiskers plots. 156. 196. 11 captions adding to a table. 246 widths. 540 aspect ratio. 192 copying into other applications. 496 vertical text. 244 formats. 246 shading. 194 ROC Curve. 578 in scripts. 540 exporting charts. 332 in One-Way ANOVA. 185 inserting in Viewer. 60 Cancel button. 496 hiding. 534 editing toolbar bitmap icons. 286 chi-square distance measure in Distances. 111 converting interval data to discrete categories. 191. 279 boxplots comparing factor levels. 503 subtitles. 520 titles. 248 changing properties. 540 Bonferroni in GLM. 150 Brown-Forsythe statistic in One-Way ANOVA. 249 properties. 91. 240 hiding. 215 cell properties with table properties. 142 weighing. 578 break variables. 154. 201. 252 outlines. 243 Draft Viewer. 192. 231 bookmarks. 249 showing. 249 modifying text. 192 exporting. 242 displaying hidden borders. 196. 497 pasting into other applications. 157 sorting. 245 centered moving average function. 307 cases. 215. 150 in Aggregate Data.590 Index Blom estimates. 279 in Explore.

503 ROC Curve. 17. 257 comparing groups in OLAP Cubes. 17 journal file. 118 concentration index in Ratio Statistics. 336 in Independent-Samples T Test. 503 cluster analysis efficiency. 278 in GLM. 263 running with toolbar buttons. 263. 85 pivot tables. 286 linear-by-linear association. 414 Hierarchical Cluster Analysis. 245 selecting in pivot tables. 286 likelihood-ratio. 489 coefficient of variation (COV) in Ratio Statistics. 360 colors in pivot tables borders. 82 comma-delimited data. 249 cell foreground. 516. 522 controlling default width. 489 Cohen’s kappa in Crosstabs. 249 font. 245 columns changing width in pivot tables. 320 in Paired-Samples T Test. 310 . 259. 548 Production Facility. 329. 301 comparing variables in OLAP Cubes. 242 cell background. 401 K-Means Cluster Analysis. 247 column percentages in Crosstabs. 307 in Linear Regression. 41 command line switches. 389 Cochran’s Q in Tests for Several Related Samples. 522 controlling maximum width. 85. 286 classification. 259 Production Facility formatting. 421 statistics. 286 Yates’ correction for continuity. 115 computing new string variables. 238 controlling width for wrapped text. 286 one-sample test. 538 adding to menus. 261. 514. 238 in Data Editor. 421 chi-square tests Fisher’s exact test. 517. 421 expected values. 534 syntax rules. 529 installing syntax reference. 538 running. 366 computing variables. 398 clustering choosing a procedure. 286 coefficient of dispersion (COD) in Ratio Statistics. 117 confidence intervals. 260 pasting. 288 column summary reports. 489 conditional transformations. 530. 421 missing values.591 Index Chi-Square Test expected range. 548 command syntax. 514 log. 547 Production Facility rules. 251 comma format. 421 options. 286 collinearity diagnostics in Linear Regression. 81. 244 column format changing in pivot tables. 517 output log. 409 cluster frequencies in TwoStep Cluster Analysis. 301 compound model in Curve Estimation. 312 in One-Way ANOVA. 286 in Crosstabs. 465 column width. 446 Cochran’s statistic in Crosstabs. 506 in Explore. 360 in One-Sample T Test. 418 Pearson. 516.

452 CSV-format data. 187. 285 formats. 81. 525 custom models in GLM. 283 crosstabulation in Crosstabs. 87–95 alignment. 285 in Partial Correlations. 41 cubic model in Curve Estimation. 286 creating toolbars. 158. 98 applying from another file. 363 models. 78. 283. 330 in One-Way ANOVA. 120 covariance matrix in Discriminant Analysis. 367 saving residuals. 136 currency formats. 187 pivot tables. 158 layers. 14 basic steps. 283 multiple response. 85 data value restrictions. 192 charts. 286 cell display. 288 clustered bar charts. 530 d in Crosstabs. 506 saving in Linear Regression. 327 customizing toolbars. 286 contingency tables. 339 in Bivariate Correlations. 335 in Linear Regression. 98 Data Editor. 283 continuation text for pivot tables. 228 contingency coefficient in Crosstabs. 243 contrasts in GLM. 286 in Partial Correlations.592 Index in ROC Curve. 367 including constant. 339 in Crosstabs. 373. 473. 75. 373 in Factor Analysis. 366 saving predicted values. 363 forecast. 384. 192 correlation matrix in Discriminant Analysis. 85 changing data type. 360 covariance ratio in Linear Regression. 192 output. 383 correlations bivariate. 14 data dictionary. 329. 367 saving prediction intervals. 359 context-sensitive Help finding label definitions in pivot tables. 286 control variables. 288 fractional weights. 345 zero-order. 367 custom currency formats. 414 Cook’s distance in GLM. 85. 285 statistics. 366 cumulative sum function. 286 suppressing tables. 335 in Linear Regression. 476 Crosstabs. 348 counting occurrences. 385 in K-Means Cluster Analysis. 530 Cronbach’s alpha in Reliability Analysis. 525 Curve Estimation analysis of variance. 347 convergence in Factor Analysis. 93 column width. 359 Cramér’s V in Crosstabs. 318 control variables in Crosstabs. 359 copying. 374 in GLM. 89 . 286 data analysis. 377.

160 dictionary information. 33 verifying results. 85. 118 time series. 524 two-digit years. 82 input formats. 524 date variables defining for time series data. 32 database security. 127 recoding values. 107 variable labels. 76 database files. 95 sending data to other applications. 93 custom currency. 94 finding cases. 98. 58 text. 525 changing. 131 string variables. 30 Microsoft Access. 91 inserting new variables. 87 entering non-numeric data. 524 computing variables. 578 Define Multiple Response Sets categories. 92 printing. 107 applying a data dictionary. 578 debugging pane. 98 copying and pasting attributes. 68. 134 data types. 160 saving. 448 defining variables. 55. 87 data types. 122. 78 display options. 93 inserting new cases. 82. 81 missing values. 81 display formats. 32. 92 moving variables. 40 selecting a data source. 81. 124. 23. 69. 28 conditional expressions. 94 editing data. 93. 525 defining. 58. 90 entering data. 56. 40 table joins. 39 creating relationships. 24 remote servers. 132. 39 logging in to a database. 87 data files. 55. 448 set names. 70 restructuring. 69. 28 parameter queries. 81. 82. 56 saving subsets of variables. 35 reading. 55. 85. 24. 52. 81. 70. 87 value labels. 448 set labels. 118 ranking cases. 88 filtered cases. 125. 335 in Linear Regression. 28 selecting data fields. 126. 579 stepping through scripts. 87. 524 functions. 30 relationship properties. 52 file information. 41 transposing. 359 . 59 data transformations. 35 converting strings to numeric variables. 143 Data List versus Get Data command. 143. 56 debugging scripts break points. 117 delaying execution. 35. 76 defining variables. 83. 35 SQL syntax. 529 data entry. 23. 23. 88 entering numeric data. 37 prompt for value. 56 opening. 23. 83 deleted residuals in GLM. 27. 35 date formats. 55. 84 templates. 68. 132 dBASE files. 52 flipping. 82 Data view. 81. 33 saving queries. 83–85. 115 conditional transformations. 30 defining variables.593 Index Data view. 448 dichotomies. 26. 30 specifying criteria. 26 saving. 28. 143 opening. 27. 40 Where clause. 52. 78. 37 random sampling.

373. 268 in GLM Univariate. 573. 510. 489 in Summarize. 373 stepwise methods. 373 display options.594 Index deleting multiple EXECUTES in syntax files. 511 scripting. 9 dictionary. 13 optional specifications. 12 using variable sets. 271 in Explore. 373 grouping variables. 374 plots. 13 variables. 514. 349 dissimilarity measures. 82 display order. 351 in Hierarchical Cluster Analysis. 359 dialog boxes. 374 criteria. 349 similarity measures. 59. 351. 369. 373 saving classification variables. 136 differences between groups in OLAP Cubes. 573. 301 differences between variables in OLAP Cubes. 330 difference function. 273 designated window. 514 getting Help. 575 defining variable sets. 398 Descriptives. 406 Distances computing distances between cases. 372 descriptive statistics. 514 variable information. 351 example. 373 disk space temporary. 52 difference contrasts in GLM. 349 transforming measures. 408 dependent t test in Paired-Samples T Test. 374 example. 336 in Ratio Statistics. 301 direct oblimin rotation in Factor Analysis. 329. 9–13. 5 detrended normal plots in Explore. 273 saving z scores. 263 deleting output. 369 function coefficients. 359 DfFit in Linear Regression. 349 computing distances between variables. 225 distance measures in Distances. 271 statistics. 351. 279 deviation contrasts in GLM. 373 missing values. 385 Discriminant Analysis covariance matrix. 373 matrices. 330 DfBeta in Linear Regression. 352 transforming values. 10. 12 pushbuttons. 369 Mahalanobis distance. 374 prior probabilities. 373 discriminant methods. 575 selecting variables. 329. 374 Rao’s V. 510 variable display order. 11 reordering target lists. 60 display formats. 352 . 186 dendrograms in Hierarchical Cluster Analysis. 271 display order. 292 in TwoStep Cluster Analysis. 514 displaying variable names. 508 displaying variable labels. 369 independent variables. 278 in Frequencies. 352 statistics. 369 Wilks’ lambda. 12 subdialog boxes. 508. 373 defining ranges. 372 statistics. 375 selecting cases. 307 descriptive statistics in Descriptives. 10.

540 equamax rotation in Factor Analysis. 281 plots. 213. 63. 69 UNC paths. 201. 219 column borders. 196. 82 Draft Viewer. 56 adding menu item to send data to Excel. 247 dot format. 55. 385 estimated marginal means in GLM Univariate. 517 box characters. 296 Euclidean distance in Distances. 68. 66. 332 in One-Way ANOVA. 332 in One-Way ANOVA. 220. 219.595 Index distributed mode. 288 Explore. 25 saving. 351 Excel files. 279 power transformations. 286 in Means. 278 exponential model in Curve Estimation. 360 embedding interactive charts. 280 statistics. 319 Durbin-Watson statistic in Linear Regression. 68. 70. 384 in Linear Regression. 221. 215 controlling default output display. 517 output format. 360 editing data. 540 exporting charts. 72 division dividing across report columns. 319 Dunnett’s t test in GLM. 529 opening. 332 in One-Way ANOVA. 69. 514 display options. 88 using value labels. 70 Production Facility. 215 changing fonts. 514 SPSSTMPDIR. 281 options. 366 . 468 dollar format. 296 eta-squared in GLM Univariate. 82 dollar sign in pivot tables. 514. 215 saving output. 544 available procedures. 201. 215 cell borders. 275 missing values. 336 eta coefficient in Crosstabs. 214. 72 data file access. 23. 204. 81. 336 eigenvalues in Factor Analysis. 514 EPS files. 544 saving data files. 215 printing. 90 editing output. 55. 234 effect-size estimates in GLM Univariate. 263 expected count in Crosstabs. 332 in One-Way ANOVA. 199 EXECUTE command pasted from dialog boxes. 193 embedding pivot tables. 56 Excel format exporting output. 89 environment variables. 215. 23. 72. 81. 204. 87–89 non-numeric. 88 numeric. 319 Dunnett’s C in GLM. 221 setting default viewer type. 336 in Means. 193 entering data. 196. 65. 319 Dunnett’s T3 in GLM. 220 row borders. 196. 214 Duncan’s multiple range test in GLM.

201 exporting data adding menu items to export data. 208. 377. 144. 119 . 387 convergence. 41 Frequencies. 153 transposing variables and cases. 158. 377 extraction methods. 199 HTML format. 460 draft output. 270 frequency tables in Explore. 191 adding a text file to the Viewer. 540 automated production. 196. 270 statistics. 382. 150. 215 columns in reports. 270 formats. 268 suppressing tables. 239. 386 loading plots. 537 chart size. 253 in charts. 150 merging data files. 385 selecting cases. 143 weighting cases. 199 publishing to Web. 41 fonts. 94 in Data Editor. 377 rotation methods. 142. 196. 278 in Frequencies. 386 file information. 118 missing value treatment. 23 filtered cases. 158 files. 191 opening. 147 restructuring data. 215 forward selection in Linear Regression. 300 in Summarize. 367 formatting. 153. 385 missing values. 190 footers. 327 function procedures. 52 file transformations. 199 extremes in Explore. 332 fixed format. 357 freefield format. 278 Factor Analysis. 160 sorting cases. 244 in Data Editor. 286 Fisher’s LSD in GLM. 384. 383 coefficient display format. 190. 446 full factorial models in GLM. 296 in OLAP Cubes. 537. 251 forecast in Curve Estimation.596 Index exporting charts. 496 markers. 94 in Draft Viewer. 387 overview. 292 Fisher’s exact test in Crosstabs. 269 display order. 201–205. 142 split-file analysis. 540. 94. 384 factor scores. 143. 265 charts. 147. 383 factor scores. 265 Friedman test in Tests for Several Related Samples. 200. 94 first in Means. 382 statistics. 250 renumbering. 219 colors. 160 aggregating data. 244 in cells. 383 example. 196. 529 exporting output. 550 Excel format. 385 descriptives. 219 in the outline pane. 571 functions. 196. 144. 550 Word format. 209 footnotes adding to a table.

476 Hampel’s redescending M-estimator in Explore. 327 global procedures. 407 cluster membership. 332 in One-Way ANOVA. 319 Games-Howell test in GLM. 186 captions. 17 hiding. 470 grid lines pivot tables. 160 growth model in Curve Estimation. 11 Help windows. 329. 278 harmonic mean in Means. 286 grand totals in column summary reports. 286 generalized least squares in Factor Analysis. 209 Helmert contrasts in GLM. 300 in Summarize. 526. 330 diagnostics. 329. 296 in OLAP Cubes. 401 clustering methods. 530 Hierarchical Cluster Analysis agglomeration schedules. 59 GLM model. 327 GLM Univariate build terms. 366 Guttman model in Reliability Analysis. 336 estimated marginal means. 407. 234 toolbars. 300 in Summarize. 335 sum of squares. 297 grouped median in Means. 407 distance measures. 185 rows and columns. 226 grouping variables. 336 post hoc tests. 286 Goodman and Kruskal’s lambda in Crosstabs. 408 distance matrices. 319 gamma in Crosstabs. 234 procedure results. 330 Help button. 292 Get Data versus Data List command. 296 in OLAP Cubes. 336 display. 300 in Summarize. 293.597 Index Gabriel test in GLM. 292 headers. 332 profile plots. 243 group labels. 406 . 406 clustering variables. 328 options. 286 Goodman and Kruskal’s tau in Crosstabs. 296 in OLAP Cubes. 401 dendrograms. 234 footnotes. 59 versus Get Capture command. 572 global scripts. 160 creating. 572 Goodman and Kruskal’s gamma in Crosstabs. 233 titles. 208. 186 results. 384 geometric mean in Means. 332 in One-Way ANOVA. 408 clustering cases. 328 contrasts. 331 saving matrices. 226 group means. 234 dimension labels. 185. 473. 336 interaction terms. 292 grouping rows or columns. 335 saving variables.

279 in Frequencies. 415 cluster membership. 187. 307 defining groups. 397 Independent-Samples T Test. 408 similarity measures. 540 Huber’s M-estimator in Explore. 540 justification. 366 iterations in Factor Analysis. 414 . 540 exporting charts. 192. 407 transforming measures. 319 homogeneity-of-variance tests in GLM Univariate. 521 intraclass correlation coefficient (ICC) in Reliability Analysis. 585 adding customized code. 336 in One-Way ANOVA. 193. 408 plot orientation. 269 in Linear Regression. 196. 199. 446 K-Means Cluster Analysis cluster distances. 476 inverse model in Curve Estimation. 415 convergence criteria. 307 string variables. 406 hierarchical decomposition in GLM. 226 interaction terms in GLM. 406 transforming values. 201. 196. 320 Hotelling’s T2 in Reliability Analysis. 306 grouping variables. 199. 332 in One-Way ANOVA. 82 inserting group labels. 278 missing values. 516 output. 286 Kendall’s W in Tests for Several Related Samples. 579 importance plots in TwoStep Cluster Analysis. 196. 521 saving data with chart. 328 high-resolution charts. 540. 476 HTML format. 406 statistics. 328 interactive charts. 202. 192 embedding as ActiveX objects. 394 input formats. 306 initial threshold in TwoStep Cluster Analysis. 408 icons. 339 in Crosstabs. 384. 534 editing toolbar bitmap icons. 202. 384 Immediate tab. 306 kappa in Crosstabs. 303 confidence intervals. 187. 358 Hochberg’s GT2 in GLM. 408 saving new variables. 401 icicle plots. 534 image factoring. 521 copying into other applications. 401. 473. 585 exporting output. 286 Kendall’s tau-b in Bivariate Correlations. See intraclass correlation coefficient icicle plots in Hierarchical Cluster Analysis.598 Index example. 414 journal file. 193 options. 514 JPEG files. 516 ICC. 491 histograms in Explore. 201. 385 in K-Means Cluster Analysis. 307 options. 579 script window. 286 Kendall’s tau-c in Crosstabs. 196.

111 defining. 357. 476 kurtosis in Descriptives. 351 language changing output language. 409 saving cluster information. 359 saving new variables. 409 iterations. 366 Linear Regression. 415 Kolmogorov-Smirnov Z in One-Sample Kolmogorov-Smirnov Test. 353 missing values. 358 residuals. 415 overview. 65 . 579 script window. 320 leverage values in GLM. 228. 415 statistics. 268 in Means. 273 in Explore. 319 level of measurement. 228 printing. 243 lead function. 414 examples. 434 KR20 in Reliability Analysis. 296 in OLAP Cubes. 353 blocks. 136 lambda in Crosstabs. 292 labels deleting. 300 in Report Summaries in Columns. 286 listing cases. 79 Levene test in Explore. 362 plots. 359 Lilliefors test in Explore. 279 in GLM Univariate. 409 missing values. 279 linear model in Curve Estimation. 286 Lance and Williams dissimilarity measure in Distances. 429 in Two-Independent-Samples Tests. 226 lag function. 335 in Linear Regression. 226 inserting group labels. 360 variable selection methods. 359 selection variable. 332 in One-Way ANOVA. 476 Kruskal’s tau in Crosstabs. 409. 230 in Crosstabs. 514 last in Means. 205 changing. 228 displaying. 414 methods. 238. 285 in pivot tables. 366 logging in to a server.599 Index efficiency. 296 in OLAP Cubes. 385 logarithmic model in Curve Estimation. 336 in One-Way ANOVA. 437 Kuder-Richardson 20 in Reliability Analysis. 362 weights. 286 Kruskal-Wallis H in Two-Independent-Samples Tests. 136 least significant difference in GLM. 353 linear-by-linear association in Crosstabs. 358 statistics. 292 layers. 461 in Summarize. 229 creating. 289 Loaded tab. 278 in Frequencies. 300 in Summarize. 205. 79. 467 in Report Summaries in Rows. 579 loading plots in Factor Analysis.

268 in Means. 320 in Ratio Statistics. 296 in OLAP Cubes. 23. 434 Mantel-Haenszel statistic in Crosstabs. 296 measurement level. 568 . 147 dictionary information. 293. 297 Means options. 468 in Descriptives. 359 Mann-Whitney U in Two-Independent-Samples Tests. 286 in Two-Related-Samples Tests. 268 in Means. 489 in Report Summaries in Columns. 79. 208 in cells. 394 maximum likelihood in Factor Analysis. 146. 489 in Summarize. 437 memory. 440 mean in Descriptives. 366 Lotus 1-2-3 files. 201. 300 in Ratio Statistics.600 Index logistic model in Curve Estimation. 300 in One-Way ANOVA. 6 customizing. 273 in Explore. 273 in Explore. 147 renaming variables. 56 Mahalanobis distance in Discriminant Analysis. 292 median test in Two-Independent-Samples Tests. 307 maximum comparing report columns. 568 OLE automation objects. 56 adding menu item to send data to Lotus. 540 methods. 268 in Means. 201. 55. 147 files with different cases. 278 in Frequencies. 489 measures of dispersion in Descriptives. 489 measures of distribution in Descriptives. 286 margins. 461 in Summarize. 144 files with different variables. 296 statistics. 268 median statistic in Explore. 146 M-estimators in Explore. 278 in Frequencies. 529 merging data files. 79 measurement system. 278 in Frequencies. 249 matched-pairs study in Paired-Samples T Test. 111 defining. 296 in OLAP Cubes. 273 in Frequencies. 196. 55. 268 in Ratio Statistics. 384 McNemar test in Crosstabs. 273 in Explore. 278 in Frequencies. 292 maximum branches in TwoStep Cluster Analysis. 300 in Ratio Statistics. 292 of multiple report columns. 540 exporting charts. 514 measures of central tendency in Explore. 278 in Frequencies. 529 opening. 394 menus. 278 metafiles. 296 in OLAP Cubes. 467 in Report Summaries in Rows. 268 in Ratio Statistics. 196. 373 in Linear Regression. 514 memory allocation in TwoStep Cluster Analysis. 468 subgroup. 23 saving. 489 in Summarize. 144.

449 defining sets. 353 multiple response analysis crosstabulation. 470 in Explore. 268 in Means. 319 multiple R in Linear Regression. 483 statistics. 443 replacing in time series data. 79 measurement level. 312 in One-Way ANOVA. 489 in Summarize. 506 defining. 482 criteria. 452 Define Multiple Response Sets. 111 . 484 defining data shape. 225 Multidimensional Scaling command additional features. 351 missing values. 479 transforming values. 479 levels of measurement. 310 in Partial Correlations. 462 in ROC Curve. 292 Minkowski distance in Distances. 455 percentages based on cases. 455 Multiple Response Define Sets Multiple Response Frequencies. 431 in One-Sample T Test. 84. 483 creating distance matrices. 439 in Two-Independent-Samples Tests. 296 in OLAP Cubes. 119. 360 multiple regression in Linear Regression. 450 missing values. 387 in functions. 506 in Runs Test. 362 in Multiple Response Crosstabs. 342 in charts. 497 in Chi-Square Test. 483 scaling models. 137 string variables. 449 frequency tables. 320 in Paired-Samples T Test. 79. 421 in column summary reports. 28 minimum comparing report columns. 394 nominal. 332 noise handling in TwoStep Cluster Analysis. 307 in Linear Regression. 268 Moses extreme reaction test in Two-Independent-Samples Tests. 468 names. 455 missing values. 455 defining value ranges. 66 Newman-Keuls in GLM. 450 Multiple Response Crosstabs. 455 percentages based on responses.601 Index Microsoft Access. 468 in Descriptives. 424 in Bivariate Correlations. 300 in Ratio Statistics. 434 moving rows and columns. 454 matching variables across response sets. 482 multiple comparisons in One-Way ANOVA. 483 display options. 482 example. 450 in One-Sample Kolmogorov-Smirnov Test. 278 in Frequencies. 119 in Independent-Samples T Test. 484 distance measures. 481 dimensions. 436 in Two-Related-Samples Tests. 273 in Explore. 450 multiplication multiplying across report columns. 452 Multiple Response Frequencies. 452 cell percentages. 281 in Factor Analysis. 66 servers. 428 in Tests for Several Independent Samples. 455 in Multiple Response Frequencies. 348 in Report Summaries in Rows. 84 in Binomial Test. 84 mode in Frequencies. 485 conditionality. 450 Multiple Response Crosstabs.

519. 27. 28 data files. 564. 524 Viewer. 320 online Help. 320 multiple comparisons. 189 changing levels. 111 outliers in Explore. 525 data. 519 pivot table look. 516 ordinal. 79. 431 options. 81. 566. 318 factor variables. 23 spreadsheet files. 296 in OLAP Cubes. 440 normal probability plots in Explore. 429 Runs Test. 23. 279 ntiles creating categorical data from interval data based on ntiles. 315 contrasts. 444 Two-Independent-Samples Tests. 564 using in scripts. 26 Excel files. 23 tab-delimited files. 279 in Linear Regression. 418 One-Sample Kolmogorov-Smirnov Test. 358 in TwoStep Cluster Analysis. 41 options. 315 missing values. 288 observed means in GLM Univariate. 525. 23. 15. 300 in Summarize. 516. 300 titles. 188. 570 objects. 521 output labels. 570 properties. 15 opening files. 514 two-digit years. 566. 358 normal scores in Rank Cases. 297 statistics. 25 Lotus 1-2-3 files. 564 overview. 564 methods. 310 confidence intervals. 312 options. 318 post hoc tests. 82 object browser. 130 number of cases in Means. 526 temporary directory. 11 OLAP Cubes. 564. 437 Tests for Several Related Samples. 425 Tests for Several Independent Samples. 517 general. 128 normality tests in Explore. 292 numeric format. 24. 566. 520–522.602 Index nonparametric tests Chi-Square Test. 189 . 431 statistics. 394 outline. 570 One-Sample Kolmogorov-Smirnov Test missing values. 26. 551 using objects. 312 missing values. 514 interactive charts. 23. 23. 429 One-Sample T Test. 551. 520 currency. 524 Draft Viewer. 25 SYSTAT files. 319 statistics. 522 scripts. 24 dBASE files. 568 overview. 302 OLE automation. 526 charts. 17 Statistics Coach. 312 One-Way ANOVA. 431 test distribution. 23. 25. 514. 517. 319 options. 23 text data files. 432 Two-Related-Samples Tests. 564. 278 in Linear Regression. 568 scripting with. 336 OK button. 524. 320 polynomial contrasts. 79 measurement level. 570 observed count in Crosstabs.

205. 196. 516 centering. 540. 288 percentiles in Explore. 188 size of items. 540 hiding. 360 missing values. 242 cell formats. 208. 212. 201. 377 Pearson chi-square in Crosstabs. 189 expanding. 269 titles. 195 copying into other applications. 183 overview. 203. 213. 209 Paired-Samples T Test. 522. 310 options. 249 output. 209. 540 alignment. 252 moving. 540 pie charts in Frequencies. 189 in Viewer. 186. 185 modifying. 497 pivot tables. 348 partial plots in Linear Regression. 469 in row summary reports. 191–196. 514 copying. 540 exporting charts. 268 permissions. 203. 194 pivot tables as tables. 187. 213 exporting. 186 pasting into other applications. 240 cell widths. 185. 195 pattern difference in Distances. 347 in Linear Regression. 185 Viewer. 470 in row summary reports. 196. 192. 211 headers and footers. 286 percent sign in pivot tables. 187 copying and pasting multiple items. 186 draft. 191. 183. 191 saving. 192 deleting. 307 parallel model in Reliability Analysis. 212 showing. 473. 245 . 190 outlining a cell. 212 Paste button. 223. 345 control variables. 348 options. 339 in Crosstabs. 516. 286 phi-square distance measure in Distances. 516 changing output language. 545 adding captions. 476 parameter estimates in GLM Univariate. 310 selecting paired variables. 462 page setup. 195 charts. 286 Pearson correlation in Bivariate Correlations. 185. 351 PICT files. 252 borders. 351 pattern matrix in Factor Analysis. 194 special objects. 196. 194 pivot tables. 211 in column summary reports. 11 pasting. 187. 278 in Frequencies. 201. 583 page control in column summary reports. 211 chart size. 187. 208. 348 zero-order correlations. 194. 72 phi in Crosstabs. 208 page numbering. 348 statistics. 195. 307 missing values. 247 percentages in Crosstabs. 358 password protection. 336 Partial Correlations. 196.603 Index collapsing. 462 page margins. 186.

225 ungrouping rows or columns. 522 default look for new tables. 545. 238. 205. 226 hiding. 359 prediction intervals saving in Curve Estimation. 243 space between output items. 243 selecting rows and columns. 211 text output. 238. 66 post hoc multiple comparisons. 384 printing. 246 changing appearance. 208 pivot tables. 228 manipulating. 191 pivoting. 254 data. 540 exporting output. 220 chart size. 196. 224 PNG files. 319 PostScript files (encapsulated). 540 finding label definitions. 254 copying. 540 . 196. 545 general properties. 196. 192 copying and pasting multiple tables. 193 exporting as HTML. 237 resetting defaults. 489 principal axis factoring. 318 port numbers. 203 polynomial contrasts in GLM. 329. 196. 544. 571 scripts. 359 price-related differential (PRD) in Ratio Statistics. 223 moving rows and columns. 191. 209. 538. 205 print preview. 540 See also EPS files power estimates in GLM Univariate. 384 principal components analysis. 205. 225 changing the look. 537. 211. 330 in One-Way ANOVA. 239 format control for production jobs. 542. 548 exporting charts. 367 saving in Linear Regression. 243 controlling table breaks. 243 editing. 95 draft output. 514. 377. 206 scaling tables. 203 exporting charts. 208. 205 controlling table breaks. 243 page numbers. 549 command line switches. 194 pasting into other applications. 522 deleting group labels. 220 headers and footers. 238 grid lines. 227 scaling to fit page. 224 embedding as ActiveX objects. 194 pasting as tables. 238. 571 Production Facility. 367 saving in Linear Regression. 211 charts. 226 layers. 227 rotating labels. 537. 226 using icons. 209 layers. 194 pasting as text. 185 identifying dimensions. 516. 225 inserting group labels. 228 footnote properties. 548. 233 transposing rows and columns. 206. 251 showing and hiding cells.604 Index cells. 205 properties. 225 pasting as metafiles. 205 prior moving average function. 224 printing large tables. 336 power model in Curve Estimation. 235 continuation text. 204 exporting charts. 223 editing two or more. 226 displaying hidden borders. 195 copying into other applications. 95. 540. 211 page setup. 136 procedures. 223. 254 printing layers. 192 default column width adjustment. 208. 243 grouping rows or columns. 366 predicted values saving in Curve Estimation. 517. 235 changing display order. 196. 204.

330 regression Linear Regression. 319 R-E-G-W Q in GLM. 360 in Means. 128 Rao’s V in Discriminant Analysis. 537 publishing output. 476 command additional features. 300 in Ratio Statistics. 238 proportion estimates in Rank Cases.605 Index format control for pivot tables. 332 in One-Way ANOVA. 353 multiple regression. 296 random number seed. 568 pivot tables. 286 Reliability Analysis ANOVA table. 128 Savage scores. 353 plots. 487 statistics. 128 fractional ranks. 329. 122. 360 in Means. 548 specifying a remote server. 319 related samples. 360 R-E-G-W F in GLM. 119 selecting. 538 using command syntax from journal file. 544 options. 477 descriptives. 156 range statistic in Descriptives. 128 Proximities in Hierarchical Cluster Analysis. 516. 444 relative risk ratio in Crosstabs. 126. 476 . 542 syntax rules. 332 in One-Way ANOVA. 440. 360 R statistic in Linear Regression. 366 quartiles in Frequencies. 296 R2 change. 550 with Production Facility. 544 output files. 127. 545 format control with command syntax. 549 quadratic model in Curve Estimation. 129 Rankit estimates. 517 profile plots in GLM. 358 regression coefficients in Linear Regression. 292 rank correlation coefficient in Bivariate Correlations. 156 database files. 237 table. 549 scheduling production jobs. 401 publishing output. 131 reference category in GLM. 385 r correlation coefficient in Bivariate Correlations. 489 in Summarize. 124. 547 macro prompting. 128 percentiles. 273 in Frequencies. 339 in Crosstabs. 549 publishing to Web. 544 substituting values in syntax files. 568 cells. 489 recoding variables. 296 in OLAP Cubes. 119 random sample. 268 in Means. 331 properties. 268 quartimax rotation in Factor Analysis. 125. 35 random number seed. 339 ranking cases. 514 using command syntax from log. 373 Ratio Statistics. 286 R2 in Linear Regression. 128 tied values. 246 OLE automation objects.

469 total columns. 359 restructuring data. 462. 169. 68.606 Index example. 225 repeated contrasts in GLM. 173. 69. 476 Kuder-Richardson 20. 169 creating multiple index variables for variables to cases. 476 inter-item correlations and covariances. 171. 226 reordering rows and columns. 462 column format. 464 missing values. 463 page numbering. 179. 72 removing group labels. 160 selecting data for cases to variables. 470 missing values. 476 statistics. 457 break spacing. 70. 72 data file access. 339 in Crosstabs. 65. 139 series mean. 66. 163–166. 470 page control. 468 row summary reports. 460 command syntax. 468 Reset button. 160. 174 overview. 65 Production Facility. 465 comparing columns. 468 multiplying column values. 139 median of nearby points. 464 reports column summary reports. 176. 163 options for cases to variables. 468 Report Summaries in Rows. 471 data columns. 457 footers. 286 ROC Curve. 170. 166 sorting data for cases to variables. 139 Report Summaries in Columns column format. 66 available procedures. 170 example of two indices for variables to cases. 336 residuals in Crosstabs. 460 command syntax. 165 rho in Bivariate Correlations. 473 Hotelling’s T2. 506 statistics and plots. 506 . 476 intraclass correlation coefficient. 63. 468 dividing column values. 465 break columns. 160 variable groups for variables to cases. 457 total columns. 11 residual plots in GLM Univariate. 457. 13 in dialog boxes. 70 editing. 181 and weighted data. 476 Tukey’s test of additivity. 66 logging in. 286 right mouse button Help. 330 replacing missing values linear interpolation. 176 selecting data for variables to cases. 171 example of variables to cases. 171 creating index variables for variables to cases. 469 page layout. 457 titles. 72. 179 options for variables to cases. 471 grand total. 544 saving data files. 544 adding. 164 example of one index for variables to cases. 329. 367 saving in Linear Regression. 288 saving in Curve Estimation. 177. 173 example of cases to variables. 174. 462 sorting sequences. 463 page numbering. 181 creating a single index variable for variables to cases. 462 page layout. 473. 468 composite totals. 464 variables in titles. 470 subtotals. 139 linear trend. 462 page control. 476 remote servers. 68. 503. 177 types of restructuring. 13 risk in Crosstabs. 139 mean of nearby points. 69 UNC paths.

221 text format. 540 PICT files. 428 statistics. 238. 203. 56. 201. 196. 514 scree plot. 319 scientific notation. 79. 473 measurement level. 540 JPEG files. 319 S model in Curve Estimation. 514 in pivot tables. 247 suppressing in output. 558 variable declarations. 500 in Linear Regression. 212 publishing to Web. 564 object browser. 540 EPS files. 578 Immediate tab. 196. 319 Ryan-Einot-Gabriel-Welsch multiple range in GLM. 243 scatterplots case labels. 81. 196. 200. 201. 570 procedures. 202. 425. 199. 526. 221. 521 TIFF files. 288 rows selecting in pivot tables. 550 saving draft output as text. 52 saving output. 571 properties and methods. 196. 500 Scheffé test in GLM. 200. 566 how scripts work. 556 Debug menu. 196. 212. 479 in Reliability Analysis. 540 metafiles. 156 SAS files saving. 203. 196. 196. 521. 332 in One-Way ANOVA. 579 Watch tab. 358 options. 227 row percentages in Crosstabs. 201. 196. 199 HTML format. 205. 540 BMP files. 540. 428 options. 551 adding a description. 573 . 156 random sample. 201 scaling pivot tables. 201. 204. 428 Ryan-Einot-Gabriel-Welsch multiple F in GLM. 203 PostScript files. 556 starter scripts. 579 scripting tips adding a description. 573 debugging. 540 password protection. 427 missing values. 201. 196. 199 saving pivot table views. 579 object browser. 573 custom dialog boxes. 578 getting automation objects. 201. 111 scaling exported charts. 384 script window. 55 Savage scores. 221 Excel format. 40 SPSS data files. 540 Word format. 558 Stack tab. 366 sampling. 540 PNG files. 79 in Multidimensional Scaling. 550 draft output. 565 scripts. 201. 203. 202. 55. 69 data files. 251 running median function. 205 WMF format. 570 properties. 332 in One-Way ANOVA. 231 scale. 204. 52. 332 in One-Way ANOVA. 196. 56. 204 saving interactive charts with data. 128 saving charts. 196. 55.607 Index rotating labels. 69 database file queries. 579 Loaded tab. 203 WMF files. 540 saving files. 136 Runs Test cut points. 568 script window. 196.

234 toolbars. 560. 558 using automation objects. 142 space-delimited data. 529 autoscript file. 254 spreadsheet files. 153 split-half reliability in Reliability Analysis. 251 selection variable in Linear Regression. 66 port numbers. 556. 156. 565 dialog boxes. 136 selecting cases. 65 names. 570 with command syntax. 268 in Means. 292 smoothing function. 440 similarity measures in Distances. 185 rows or columns. 66 session journal. 330 size difference in Distances. 286 sorting cases. 564. 156 range of cases. 157 time range. 234 results. 358 servers. 319 sign test in Two-Related-Samples Tests. 526. 556. 25 reading variable names. 185 captions.608 Index adding to menus. 558 starter scripts. 552 running from toolbars. 329. 157 based on selection criteria. 41 Spearman correlation coefficient in Bivariate Correlations. 279 shared drives. 234 footnotes. 66 logging in. 406 simple contrasts in GLM. 59 opening. 476 split-file analysis. 551 running. 157 random sample. 66 editing. 580. 514 shading in cells. 156 date range. 575 global procedures file. 526. 233 titles. 534 script window. 136 Somers’ d in Crosstabs. 300 in Report Summaries in Columns. 332 in One-Way ANOVA. 59 . 25 writing variable names. 560 debugging. 563 creating. 286 Spearman-Brown reliability in Reliability Analysis. 66 adding. 72 showing. 154. 351 sizing exported charts. 467 in Report Summaries in Rows. 296 in OLAP Cubes. 530 Sidak’s t test in GLM. 572 overview. 339 in Crosstabs. 582 seasonal difference function. 573. 65. 563 autoscripts. 201 skewness in Descriptives. 530 running with toolbar buttons. 566. 25. 473. 461 in Summarize. 249 Shapiro-Wilk’s test in Explore. 234 dimension labels. 23. 25 reading ranges. 278 in Frequencies. 273 in Explore. 157 selection methods selecting rows and columns in pivot tables. 476 splitting tables controlling table breaks. 352 in Hierarchical Cluster Analysis. 578. 553. 579 declaring variables.

357 stress in Multidimensional Scaling. 15 status bar. 473. 319 subgroup means. 81 string variables. 467 in Report Summaries in Rows. 300 in Summarize. 14 basic steps. 476 string data. 300 in Summarize. 296 in OLAP Cubes. 292 standardization in TwoStep Cluster Analysis. 351 S-stress in Multidimensional Scaling. 394 standardized residuals in GLM. 131 Student’s t test. 154. 297 subroutine procedures. 268 in GLM. 328 . 271 starter scripts. 506 in Descriptives. 296 in OLAP Cubes. 336 SPSS. 293. 336 in ROC Curve. 8. 300 in Summarize. 14 SPSSTMPDIR environment variable. 279 in GLM Univariate. 300 in Ratio Statistics. 335 in Linear Regression. 9 hiding. 154. 359 Student-Newman-Keuls in GLM. 278 in Frequencies. 268 in GLM Univariate. 558 Statistics Coach. 156 selecting. 9 stem-and-leaf plots in Explore. 157 random sample. 327. 579 script window. 292 sum of squares in GLM. 489 in Report Summaries in Columns. 332 in One-Way ANOVA. 336 in Means. 9 showing. 156. 273 in Explore.609 Index spread-versus-level plots in Explore. 579 standard deviation in Descriptives. 273 in Frequencies. 156. 292 standard error. 359 standardized values in Descriptives. 118 in dialog boxes. 9. 296 in OLAP Cubes. 335. 88 string format. 479 Stack tab. 84 recoding into consecutive integers. 571 subsets of cases. 273 in Explore. 296 in OLAP Cubes. 300 in Summarize. 514 squared Euclidean distance in Distances. 461 in Summarize. 296 in OLAP Cubes. 268 in Means. 292 standard error of skewness in Means. 157 subtotals in column summary reports. 469 sum in Descriptives. 84 computing new string variables. 278 in Frequencies. 88 entering data. 279 stepwise selection in Linear Regression. 479 strictly parallel model in Reliability Analysis. 292 standard error of the mean in Means. 506 standard error of kurtosis in Means. 303 Studentized residuals in Linear Regression. 9 missing values.

23. 213 data files. 496 in OLAP Cubes. 307 T4253H smoothing. 196. 25. 17 journal file. 439 grouping variables. 136 tab-delimited files. 540 adding a text file to the Viewer. 221 exporting output as text. 511 tau-b in Crosstabs. 582 SYSTAT files. 136 titles. 252 TIFF files. 310 in Paired-Samples T Test. 200. 259 pasting into scripts. 190 adding to Viewer. 263. 336 in Independent-Samples T Test. 516. 444 statistics. 59. 319 target lists. 85. 254 table properties with cell properties. 55. 55. 517. 221. 190 creating text output. 23 t tests. 439 missing values. 303 in One-Sample T Test. 56 writing variable names. 235 applying. 367 time series data creating new time series variables. 540 in cells. 336 in GLM Univariate. 259. 292 syntax. 56. 196. 213. 23 opening. 286 tau-c in Crosstabs. 201. 41. 191. 203. 516. 17. 263 running command syntax with toolbar buttons. 520 using an external data file as a template. 257 with scripts. 582 installing syntax reference. 59 table breaks. 538. 23 reading variable names. 520 in charts. 533 syntax rules. 85. 580. 132 defining date variables. 439 test types. 446 text. 286 templates. 302 . 203 exporting charts. 514 setting location in local mode. 41 exporting draft output as text. 190.610 Index Summarize options. 367 predicting cases. 538 running. 437 defining range. 60 tests for linearity in Means. 446 test types. 235 creating. 514. 540 time series analysis forecast. 191 adding to Viewer. 517 output log. 87. 236 tables controlling table breaks. 98 variable definition. 260 pasting. 60 temporary directory. 25 saving. 332 in One-Way ANOVA. 246 TableLooks. 137 transformation functions. 87 temporary active file. 500. 254 Tamhane’s T2 in GLM. 296 Tests for Several Independent Samples. 200. 98. 190 in charts. 439 options. 514 temporary disk space. 291 statistics. 59 opening. 134 data transformations. 514 log. 132 replacing missing values. 439 statistics. 514 SPSSTMPDIR environment variable. 261. 530. 196. 581 Production Facility rules. 438 Tests for Several Related Samples.

112 copying. 87 variable declarations. 562 trimmed mean in Explore. 434 Two-Related-Samples Tests. 84 V in Crosstabs. 397 save to external file. 440 missing values. 565 in scripts. 519 using for data entry. 147 in outline pane. 394 trigger events. 435 missing values. 278 Tukey’s honestly significant difference in GLM. 83. 432 defining groups. 436 test types. 87 copying and pasting. 532 editing bitmap icons.611 Index tolerance in Linear Regression. 391 assumptions. 377 transforming data converting interval data to discrete categories. 85. 443 options. 468 total percentages in Crosstabs. 112 in Data Editor. 393 options. 7. 319 Tukey’s biweight estimator in Explore. 6. 89 values pivot table display format. 288 transformation matrix in Factor Analysis. 303 TwoStep Cluster Analysis. 519 in pivot tables. 286 value labels. 435 grouping variables. 332 in One-Way ANOVA. 94. 473. 398 statistics. 436 statistics. 443 statistics. 476 Two-Independent-Samples Tests. 534 creating. 398 uncertainty coefficient in Crosstabs. 398 save to working file. 225 transposing variables and cases. 442 two-sample t test in Independent-Samples T Test. 128 variable attributes. 130 transposing rows and columns. 278 Tukey estimates. 94 in merged data files. 530 total column in reports. 247 Van der Waerden estimates. 286 unstandardized residuals in GLM. 335 unweighted least squares in Factor Analysis. 89. 565 variable importance plots in TwoStep Cluster Analysis. 7 showing and hiding. 519 applying to multiple variables. 360 toolbars. 147. 107. 534 moving. 533 displaying in different windows. 143 tree depth in TwoStep Cluster Analysis. 332 in One-Way ANOVA. 319 Tukey’s test of additivity in Reliability Analysis. 128 Tukey’s b test in GLM. 7. 443 test types. 436 options. 384 user-missing values. 394 plots. 534 customizing. 530. 533 creating new tools. 562 autoscripts. 85. 530. 397 .

296 in OLAP Cubes. 92 recoding. 273 in Explore. 514 in dialog boxes. 78 variable pairs. 187 deleting output. 510 defining.612 Index variable information. 268 in Means. 508. 519 expanding outline. 278 in Frequencies. 83. 185 inserting charts. 146 restructuring into cases. 514. 10. 13. 189 copying output. 188 outline pane. 186 outline. 519 variable lists. 227 Viewer. 300 in Report Summaries in Columns. 467 in Report Summaries in Rows. 10. 353 weighted mean in Ratio Statistics. 160 creating. 189 hiding results. 9 inserting new variables. 122. 292 variance inflation factor in Linear Regression. 12. 212 space between output items. 9. 160 selecting in dialog boxes. 181 weighted least squares in Linear Regression. 186 display options. 212. 126. 211 Wald-Wolfowitz runs in Two-Independent-Samples Tests. 579 Web. 183 pasting special objects. 507. 12 variable information in dialog boxes. 319 Watch tab. 78. 508 using. 10. 131 renaming for merged data files. 519 changing outline levels. 335 weighting cases. 519 displaying variable labels. 158 Welch statistic in One-Way ANOVA. 360 varimax rotation. 183 saving document. 160. 511 variable names. 92. 125. 489 weighted predicted values in GLM. 461 in Summarize. 519 in dialog boxes. 10. 508 definition information. 195 results pane. 146. 320 Wilcoxon signed-rank test in Two-Related-Samples Tests. 385 in Factor Analysis. 579 script window. 189 changing outline sizes. 190 changing outline font. 13 variance in Descriptives. 183. 191 moving output. 511 reordering target lists. 373 . 514 in dialog boxes. 92 moving. 78 defining variable sets. 195. 507 display order in dialog boxes. 519 displaying value labels. 514 defining. 181 and restructured data files. 516. 332 in One-Way ANOVA. 147. 147 in outline pane. 158 fractional weights in Crosstabs. 507 variable labels. 508. 514 in merged data files. 550 publishing output to. 211. 434 Waller-Duncan t test in GLM. 519 in pivot tables. 124. 78. 160 variable sets. 510 variables. 440 Wilks’ lambda in Discriminant Analysis. 519 displaying variable names. 550 weighted data. 385 vertical label text. 190 collapsing outline. 185–191. 514 rules. 516 displaying data values.

524 two-digit values. 540 exporting charts. 286 years. 196. 5 designated window. 199 wrapping controlling column width for wrapped text. 540 Word format exporting output. 5 active window. 196. 4. 201. 201. 271 zero-order correlations in Partial Correlations. 238 Yates’ correction for continuity in Crosstabs. 271 in Rank Cases. 348 . 5 WMF files.613 Index windows. 205. 196. 128 saving as variables. 524 z scores in Descriptives. 205.

- N6Jan2011
- v39-41
- AUTOMATIC UNSUPERVISED DATA CLASSIFICATION USING JAYA EVOLUTIONARY ALGORITHM
- K-Mean Algo. on Iris Data set_15129145.pdf
- D04010_01-3236
- Chapter 06 n
- Busm, A Case Study of Taluka Mir Pur Bathoro, Thatta.
- Spss17 Statistics
- 2004HarwoodCummingFletcher.pdf
- Simple Linear Regression
- candido120b Syllabus
- Assignment 4
- Logit Regression
- Curvas Regresionales Para Buques
- g 044044249
- shan's spm ppt
- Improving classification Accuracy of Neural Network through Clustering Algorithms
- Detector Placement for Critical Variables Using Static Backward Slicing
- www_statisticshowto_com_excel_regression_analysis_output_exp.pdf
- spss 簡單線性回歸分析 spss simple regression.pdf
- Data Collection Method
- Definition
- Shift Register Petri Net
- Synopsys Random-Constraints Proposal
- (2) Regression
- regrsi robust.pdf
- ENV2
- Spss Notes by Asprabhu
- PSTime11 Guidepstime
- Pair Strength Analyzer

Are you sure?

This action might not be possible to undo. Are you sure you want to continue?

We've moved you to where you read on your other device.

Get the full title to continue

Get the full title to continue reading from where you left off, or restart the preview.

scribd