SPSS For Dummies, 2nd Edition - Academia.dk

Transcription

sier! aEginthryevEgMakin2nd Edition SPSSLearn to: Configure SPSS to produce better results Get data into and out of SPSS Produce graphs that best display yourdata Extend SPSS with programmingoptionsArthur GriffithResearcher for the U.S. Department of Defense

Get More and Do More at Dummies.com Start with FREE Cheat SheetsCheat Sheets include Checklists Charts Common Instructions And Other Good Stuff!To access the Cheat Sheet created specifically for this book, go towww.dummies.com/cheatsheet/spssGet Smart at Dummies.comDummies.com makes your life easier with 1,000sof answers on everything from removing wallpaperto using the latest version of Windows.Check out our Videos Illustrated Articles Step-by-Step InstructionsPlus, each month you can win valuable prizes by enteringour Dummies.com sweepstakes. *Want a weekly dose of Dummies? Sign up for Newsletters on Digital Photography Microsoft Windows & Office Personal Finance & Investing Health & Wellness Computing, iPods & Cell Phones eBay Internet Food, Home & GardenFind out “HOW” at Dummies.com*Sweepstakes not currently available in all countries; visit Dummies.com for official rules.

SPSSFORDUMmIES‰2ND EDITION

SPSSFORDUMmIES‰2ND EDITIONby Arthur Griffith

SPSS For Dummies , 2nd EditionPublished byWiley Publishing, Inc.111 River StreetHoboken, NJ 07030-5774www.wiley.comCopyright 2010 by Wiley Publishing, Inc., Indianapolis, IndianaPublished by Wiley Publishing, Inc., Indianapolis, IndianaPublished simultaneously in CanadaNo part of this publication may be reproduced, stored in a retrieval system or transmitted in any form orby any means, electronic, mechanical, photocopying, recording, scanning or otherwise, except as permitted under Sections 107 or 108 of the 1976 United States Copyright Act, without either the prior writtenpermission of the Publisher, or authorization through payment of the appropriate per-copy fee to theCopyright Clearance Center, 222 Rosewood Drive, Danvers, MA 01923, (978) 750-8400, fax (978) 646-8600.Requests to the Publisher for permission should be addressed to the Permissions Department, John Wiley& Sons, Inc., 111 River Street, Hoboken, NJ 07030, (201) 748-6011, fax (201) 748-6008, or online at http://www.wiley.com/go/permissions.Trademarks: Wiley, the Wiley Publishing logo, For Dummies, the Dummies Man logo, A Reference for theRest of Us!, The Dummies Way, Dummies Daily, The Fun and Easy Way, Dummies.com, Making EverythingEasier, and related trade dress are trademarks or registered trademarks of John Wiley & Sons, Inc. and/or its affiliates in the United States and other countries, and may not be used without written permission.All other trademarks are the property of their respective owners. Wiley Publishing, Inc., is not associatedwith any product or vendor mentioned in this book.LIMIT OF LIABILITY/DISCLAIMER OF WARRANTY: THE PUBLISHER AND THE AUTHOR MAKE NOREPRESENTATIONS OR WARRANTIES WITH RESPECT TO THE ACCURACY OR COMPLETENESS OFTHE CONTENTS OF THIS WORK AND SPECIFICALLY DISCLAIM ALL WARRANTIES, INCLUDING WITHOUT LIMITATION WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE. NO WARRANTY MAY BECREATED OR EXTENDED BY SALES OR PROMOTIONAL MATERIALS. THE ADVICE AND STRATEGIESCONTAINED HEREIN MAY NOT BE SUITABLE FOR EVERY SITUATION. THIS WORK IS SOLD WITH THEUNDERSTANDING THAT THE PUBLISHER IS NOT ENGAGED IN RENDERING LEGAL, ACCOUNTING, OROTHER PROFESSIONAL SERVICES. IF PROFESSIONAL ASSISTANCE IS REQUIRED, THE SERVICES OFA COMPETENT PROFESSIONAL PERSON SHOULD BE SOUGHT. NEITHER THE PUBLISHER NOR THEAUTHOR SHALL BE LIABLE FOR DAMAGES ARISING HEREFROM. THE FACT THAT AN ORGANIZATIONOR WEBSITE IS REFERRED TO IN THIS WORK AS A CITATION AND/OR A POTENTIAL SOURCE OF FURTHER INFORMATION DOES NOT MEAN THAT THE AUTHOR OR THE PUBLISHER ENDORSES THE INFORMATION THE ORGANIZATION OR WEBSITE MAY PROVIDE OR RECOMMENDATIONS IT MAY MAKE.FURTHER, READERS SHOULD BE AWARE THAT INTERNET WEBSITES LISTED IN THIS WORK MAY HAVECHANGED OR DISAPPEARED BETWEEN WHEN THIS WORK WAS WRITTEN AND WHEN IT IS READ.For general information on our other products and services, please contact our Customer CareDepartment within the U.S. at 877-762-2974, outside the U.S. at 317-572-3993, or fax 317-572-4002.For technical support, please visit www.wiley.com/techsupport.Wiley also publishes its books in a variety of electronic formats. Some content that appears in print maynot be available in electronic books.Library of Congress Control Number: 2009940867ISBN: 978-0-470-48764-8Manufactured in the United States of America10 9 8 7 6 5 4 3 2 1

About the AuthorArthur Griffith is a computer programmer and a writer. He is the author oftwelve books and the coauthor of three. His education was many years ago ina land far away, and he has a degree in Computer Science and Mathematics.During his years as a computer programmer, he developed systems as variedas nuclear power-plant construction accounting, missile guidance, remotecontrol of cable-TV set-top boxes, and satellite communications control. Allthe work he did with computer programming required the use of mathematicsand the ability to explain complex concepts in simple language.He moved to Alaska in an attempt to retire, but that project failed. He is nowdeveloping online tutorials and writing books, like this one.He and his wife, Mary, live high up on a ridge in remote Alaska, with mooseand bear in the yard and eagles hunting from the roof.

DedicationTo the nurses of the South Peninsula hospital, who kept this Dummy aliveand able to write a book.

Author’s AcknowledgmentsI need to thank the professionals at SPSS. In particular, Matthew Maddenmade information available that was invaluable in the writing of this book.Aaron Rangel operated an excellent program that provided access to a prerelease copy of the software. Sarah Tomashek connected me with the information necessary to write and made certain I was able to receive a copy ofthe software. Beth Narrish was kind enough to provide me with early accessto a copy of the final release of SPSS.Amy Fandrei at John Wiley first came up with the idea that this book shouldbe written.Christopher Morris at John Wiley was patient and understanding when deliverydeadlines whisked by. He kept everything sane while I juggled the chapters ofthe book with the delivery schedule. Rhonda Smith checked the book formistakes, so if you find anything wrong, it’s her fault. (Kidding. Just kidding.)

Publisher’s AcknowledgmentsWe’re proud of this book; please send us your comments at http://dummies.custhelp.com. Forother comments, please contact our Customer Care Department within the U.S. at 877-762-2974,outside the U.S. at 317-572-3993, or fax 317-572-4002.Some of the people who helped bring this book to market include the following:Acquisitions, EditorialComposition ServicesSr. Project Editor: Christopher MorrisProject Coordinator: Patrick RedmondAcquisitions Editor: Amy FandreiLayout and Graphics: Melissa K. Jester,Ronald G. Terry, Christine WilliamsSr. Copy Editor: Barry Childs-HeltonTechnical Editor: Rhonda SmithEditorial Manager: Kevin KirschnerProofreader: Christine SabooniIndexer: Broccoli Information Mgt.Editorial Assistant: Amanda GrahamSr. Editorial Assistant: Cherie CaseCartoons: Rich Tennant(www.the5thwave.com)Publishing and Editorial for Technology DummiesRichard Swadley, Vice President and Executive Group PublisherAndy Cummings, Vice President and PublisherMary Bednarek, Executive Acquisitions DirectorMary C. Corder, Editorial DirectorPublishing for Consumer DummiesDiane Graves Steele, Vice President and PublisherComposition ServicesGerry Fahey, Vice President of Production ServicesDebbie Stailey, Director of Composition Services

Contents at a GlanceIntroduction. 1Part I: The Fundamental Mechanics of SPSS. 7Chapter 1: Introducing IBM SPSS Statistics. 9Chapter 2: Installing Software and Setting Options. 19Chapter 3: A Simple Statistical Analysis Example. 43Part II: Getting Data In and Out of SPSS. 63Chapter 4: Entering Data from the Keyboard. 65Chapter 5: Reading and Writing Files. 81Chapter 6: Data and Data Types. 97Chapter 7: Messing with the Data After It’s in There. 111Chapter 8: Getting Data Out of SPSS. 131Part III: Graphing Data. 147Chapter 9: Fundamentals of Graphing. 149Chapter 10: Some Types of Graphs. 167Chapter 11: More Types of Graphs. 191Part IV: Analysis. 211Chapter 12: Executing an Analysis. 213Chapter 13: Some Analysis Examples. 229Part V: Programming SPSS with Command Syntax. 247Chapter 14: The Command Syntax Language. 249Chapter 15: Command Syntax Language Examples. 261Part VI: Programming SPSS with Python and Scripts. 275Chapter 16: The Python Programming Language. 277Chapter 17: Python inside SPSS. 293Chapter 18: Scripts. 303

Part VII: The Part of Tens. 311Chapter 19: Ten (or So) Modules You Can Add to SPSS. 313Chapter 20: Ten Useful SPSS Things You Can Find on the Internet. 321Glossary. 329Index. 337

Table of ContentsIntroduction. 1About This Book. 1About the Data. 2Who This Book Is For. 2How This Book Is Organized. 3Part I: The Fundamental Mechanics of SPSS. 3Part II: Getting Data In and Out of SPSS. 3Part III: Graphing Data. 3Part IV: Analysis. 4Part V: Programming SPSS with Command Syntax. 4Part VI: Programming SPSS with Python and Scripts. 4Part VII: The Part of Tens. 4Icons Used in This Book. 4Where to Go from Here. 5Part I: The Fundamental Mechanics of SPSS. 7Chapter 1: Introducing IBM SPSS Statistics . . . . . . . . . . . . . . . . . . . . . . 9Garbage In, Garbage Out. 9Where Did SPSS Come From?. 10The Four Ways to Talk to SPSS. 11What You Can and Cannot Do with SPSS. 12How SPSS Works. 13Where SPSS Works. 14All the Strange Words. 14All Those Files. 15Where to Get Help When You Need It. 15Your Most Valuable Possession. 16You Can Dive as Deep as You Want to Go. 17Chapter 2: Installing Software and Setting Options . . . . . . . . . . . . . . . 19Getting SPSS into Your Computer. 19What you need for running SPSS. 20Cranking up the installer. 20The SPSS installation sequence. 21Late registration. 27Starting SPSS. 27

xivSPSS For Dummies, 2nd EditionExploring and Modifying: The Default Settings. 29General options. 29Viewer options. 31Data options. 32Currency options. 34Output Labels options. 35Chart options. 36Pivot Tables options. 37File Locations options. 38Scripts options. 39Multiple Imputations options. 40Syntax Editor options. 41Chapter 3: A Simple Statistical Analysis Example . . . . . . . . . . . . . . . . 43When the Tanana at Nenana Thaws. 43Entering the Data. 44Entering the data definitions. 44Entering the actual data. 49The Most Likely Hour. 52Transforming Data. 54The Two Kinds of Numbers. 57The Day It Is Most Likely to Happen. 60Part II: Getting Data In and Out of SPSS. 63Chapter 4: Entering Data from the Keyboard . . . . . . . . . . . . . . . . . . . . . 65The Variable View Is for Entering Variable Definitions. 65Name. 66Type. 67Width. 70Decimals. 71Label. 71Value. 72Missing. 73Columns. 73Align. 74Measure. 74Role. 75The Data View Is for Entering and Viewing Data Items. 76Filling In Missed Categorical Values. 77Chapter 5: Reading and Writing Files . . . . . . . . . . . . . . . . . . . . . . . . . . . 81The SPSS File Format. 81Formatting a Text File for Input into SPSS. 82Reading Simple Data from a Text File. 83

Table of ContentsTransferring Data from Another Program. 91Reading an Excel file. 92Reading from an unknown program type. 93Saving Data and Images. 94Chapter 6: Data and Data Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97Dates and Times. 97Time Schedule. 100Creating a Multiple Response Set. 102Copying Data Properties. 105Chapter 7: Messing with the Data After It’s in There . . . . . . . . . . . . . 111Sorting Cases. 111Counting Case Occurrences. 114Recoding Variables. 117Recoding into the same variables. 118Recoding into different variables. 120Automatic recoding. 122Binning. 124Chapter 8: Getting Data Out of SPSS . . . . . . . . . . . . . . . . . . . . . . . . . . . 131Printing. 131Exporting to a Database. 132Using SPSS Viewer. 132Creating an HTML Web page file. 135Creating a text file. 136Creating an Excel file. 138Creating a Word document file. 139Creating a PowerPoint slide document. 140Creating a PDF document. 142Creating a Graphics File. 143Part III: Graphing Data. 147Chapter 9: Fundamentals of Graphing . . . . . . . . . . . . . . . . . . . . . . . . . . 149Building Graphs the Easy Way. 150Gallery tab. 150Basic Elements tab. 154Groups/Point ID tab. 154Titles and footnotes tab. 155Element Properties dialog box. 156Options. 160Building Graphs the Fast Way. 161Building Graphs the Old-Fashioned Way. 163Editing a Graph. 164xv

xviSPSS For Dummies, 2nd EditionChapter 10: Some Types of Graphs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167Line Chart. 167Simple line charts. 168Charts with multiple lines. 169Scatterplots. 170Simple scatterplots. 170Scatterplots with multiple variables. 172Simple three-dimensional scatterplots. 173Grouped three-dimensional scatterplots. 174Summary Point plots. 175Simple Dot plots. 176Scatterplot matrices. 177Drop-line charts. 178Bar Graphs. 180Simple bar graphs. 180Clustered bar charts. 181Stacked bar charts. 182Simple three-dimensional bar charts. 183Clustered three-dimensional bar charts. 184Stacked three-dimensional bar charts. 186Simple error bars. 187Clustered error bars. 189Chapter 11: More Types of Graphs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191Histograms. 191Simple histograms. 192Stacked histograms. 193Frequency polygons. 194Population pyramids. 195Area Graphs. 196Simple area graphs. 197Stacked area charts. 198Pie Charts. 199Boxplots. 200Simple boxplots. 200Clustered boxplots. 201One-dimensional boxplots. 202High-Low Graphs. 204High-low-close graphs. 204Simple range bar graphs. 205Clustered range bar graphs. 206Differenced area graphs. 207Dual-Axis Graphs. 208Dual Y-axes with categorical X-axis. 208Dual Y-axes with scale X-axis. 209

Table of ContentsPart IV: Analysis. 211Chapter 12: Executing an Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213Generating Reports. 213Processing summaries. 213Case summaries. 214Summaries in rows. 217Summaries in columns. 221OLAP cubes. 224Modifying Pivot Tables. 226Chapter 13: Some Analysis Examples . . . . . . . . . . . . . . . . . . . . . . . . . . 229Comparison of Means Analyses. 229Simple means compare. 230One-sample T test. 231Independent-samples T test. 232Paired-samples T test. 233One-way ANOVA. 234Linear Model Analyses. 235One variable. 235More than one variable. 236Correlation Analyses. 237Bivariate. 238Partial correlation. 239Regression Analyses. 240Linear. 240Curve estimation. 242Log Linear Analyses. 244Part V: Programming SPSS with Command Syntax. 247Chapter 14: The Command Syntax Language . . . . . . . . . . . . . . . . . . . . 249Commands. 249Keywords. 250Variables and Constants.

Publishing and Editorial for Technology Dummies Richard Swadley, Vice President and Executive Group Publisher Andy Cummings, Vice President and Publisher Mary Bednarek, Executive Acquisitions Director Mary C. Corder, Editorial Director Publishing for Consumer Dummies Diane Graves