没有合适的资源?快使用搜索试试~ 我知道了~
SPSS编程和数据管理手册 SPSS Programming and Data Management, 2nd Edition A Guide for SPSS® and SAS® Users
资源推荐
资源详情
资源评论
SPSS
®
Programming
and Data Management, 2nd Edition
A Guide for SPSS
®
and SAS
®
Users
Raynald Levesque
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.
SAS is a registered trademark of SAS Institute Inc.
Windows is a registered trademark of Microsoft Corporation. Microsoft
®
Access, Microsoft
®
Excel, and Microsoft
®
Word are products of Microsoft Corporation.
DataDirect, DataDirect Connect, INTERSOLV, and SequeLink are registered trademarks of DataDirect Technologies.
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).
A portion of the SPSS software contains zlib technology. Copyright © 1995–2002 by Jean-loup Gailly and Mark Adler.
The zlib software is provided “as-is,” without express or implied warranty. In no event shall the authors of zlib be held
liable for any damages arising from the use of this software.
A portion of the SPSS software contains Sun Java Runtime libraries. Copyright © 2003 by Sun Microsystems, Inc. All
rights reserved. The Sun Java Runtime libraries include code licensed from RSA Security, Inc. Some portions of the
libraries are licensed from IBM and are available at http://oss.software.ibm.com/icu4j/. Sun makes no warranties to the
software of any kind.
Sax Basic is a trademark of Sax Software Corporation. Copyright © 1993–2004 by Polar Engineering and Consulting.
All rights reserved.
SPSS
®
Programming and Data Management, 2nd Edition: A Guide for SPSS
®
and SAS
®
Users
Copyright © 2005 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.
1 2 3 4 5 6 7 8 9 0 06 05 04 03
ISBN 1-56827-355-X
iii
Preface
Experienced data analysts know that a successful analysis or meaningful report often
requires more work in acquiring, merging, and transforming data than in specifying the
analysis or report itself. SPSS contains powerful tools for accomplishing and
automating these tasks. While much of this capability is available through the graphical
user interface, many of the most powerful features are available only through command
syntax, the macro facility that extends the power of command syntax, and the scripting
facility. Until now, no book or other documentation has focused on those features, and
many potential users have been unaware of the power available to them or have not
exploited it for lack of examples. This book fills that void.
Using This Book
The contents of this book and the accompanying CD are discussed in Chapter 1. In
particular, see the section “Using This Book” if you plan to run the examples on the
CD. The CD also contains additional command files, macros, and scripts that are
mentioned but not discussed in the book and that can be useful for solving specific
problems.
This edition has been updated to included numerous enhanced data management
features introduced in SPSS 13.0. Many examples will work with earlier versions, but
some examples rely on features not available prior to SPSS 13.0.
For SAS Users
If you have more experience with SAS than with SPSS for data management, see
Chapter 10 for comparisons of the different approaches to handling various types of
data management tasks. Quite often, there is not a simple command-for-command
relationship between the two programs, although each accomplishes the desired end.
iv
Send Me Comments
I welcome feedback from readers. Please send your suggestions and comments about
the book (not the software) to rlevesque@videotron.ca. Check my Web site at
www.spsstools.net for possible errata and generalizations or improvements of code
included on the companion CD.
Acknowledgments
First of all, I wish to thank the SPSS Senior Director of Publications, Bob Gruen, for
giving me the opportunity to work on this challenging project. In addition to providing
general guidance, Bob reviewed the macros chapter. Jon Peck reviewed and
contributed to the scripting chapter. Richard Cohen provided a new chapter on scoring.
In addition to reviewing all of the remaining chapters, Rick Oliver wrote the sections
on importing data from sources other than text files, data transformations, and the new
SPSS Output Management System. I enjoyed working with these gentlemen; the book
greatly benefited from their technical expertise and communications skills.
I also wish to thank Stephanie Schaller, who provided many sample SAS jobs and
helped to define what the SAS user would want to see, as well as Marsha Hollar and
Brian Teasley, the authors of the chapter “SPSS for SAS Programmers.”
On the nontechnical side, I am grateful to my spouse, Nicole Tousignant, who
demonstrated patience and provided support and encouragement during those
months when I was handling two jobs and working seven days a week. I dedicate this
book to her.
Raynald Levesque
v
Contents
1Overview 1
Data Management Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Using SPSS Data Management Facilities . . . . . . . . . . . . . . . . . . . 3
Graphical User Interface. . . . . . . . . . . . . . . . . . . . . . . . . . 3
Command Language . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Macro Facility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Scripting Facility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Working with Command Syntax . . . . . . . . . . . . . . . . . . . . . . . . 5
Creating Command Syntax Files . . . . . . . . . . . . . . . . . . . . . 5
Running SPSS Commands . . . . . . . . . . . . . . . . . . . . . . . . . 6
Syntax Rules. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Using This Book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Documentation Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2 Best Practices and Efficiency Tips 11
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Customizing the Programming Environment . . . . . . . . . . . . . . . . 11
Displaying Commands in the Log . . . . . . . . . . . . . . . . . . . . 11
Displaying the Status Bar in Command Syntax Windows . . . . . . 12
Customizing the Toolbars . . . . . . . . . . . . . . . . . . . . . . . . 13
Protecting the Original Data . . . . . . . . . . . . . . . . . . . . . . . . . 16
Do Not Overwrite Original Variables . . . . . . . . . . . . . . . . . . 16
Using Temporary Transformations . . . . . . . . . . . . . . . . . . . 17
Using Temporary Variables . . . . . . . . . . . . . . . . . . . . . . . 18
Using Command Syntax to Document Work . . . . . . . . . . . . . . . . 20
Creating Command Syntax Files . . . . . . . . . . . . . . . . . . . . 20
剩余389页未读,继续阅读
资源评论
qiaojh0527
- 粉丝: 0
- 资源: 1
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功