SPSS 16.0
Command Syntax Reference
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 trad emark an d license rights in the softw are and the copyrights in the published materials.
The S OFTWARE and documentation are provided with RESTRICTED RIGHTS. Use, duplication, or disclosure by the
Government is subject to restrictio ns as set forth in subd ivision (c) (1) (ii) of The Rights in Te chnical Data and Computer Softwar e
clause at 52.227-7013. Contractor/manufacturer is SPSS Inc., 233 South Wacker Drive, 11th Floor, Chicago, IL 60606-6412.
Patent N o. 7,023,453
General notice: Other product names mentioned herein are used for identification purposes only an d may be trademarks of
their respective companies.
Windows is a re gistered trademark of Microsoft C orporation.
Apple, Mac, and the Mac logo are trademarks of Apple Computer, Inc., registered in the U.S. and other countries.
This product uses WinWrap Basic, Copyright 1993-2007, Polar Engineering and Consulting, http://www.win wrap .com.
SPSS 16.0 Command Syntax Reference
Copyright © 2007 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 transm itted , in any form or by any means,
electronic, mechanical, photocopying, r ecording, or otherwise, without the prior w ritten permission of the publisher.
Contents
Introduction: A Guide to Command Syntax 1
Add-OnModules .............................................................12
ReleaseHistory ..............................................................15
Universals 31
Commands..................................................................31
RunningCommands........................................................33
Subcommands............................................................34
Keywords ...............................................................34
ValuesinCommandSpecifications ............................................34
StringValuesinCommandSpecifications .......................................35
Delimiters...............................................................35
CommandOrder...........................................................36
Files.......................................................................40
CommandFile............................................................40
JournalFile..............................................................40
DataFiles ...............................................................41
Variables ...................................................................43
VariableNames...........................................................43
KeywordTO..............................................................45
KeywordALL.............................................................46
ScratchVariables .........................................................46
SystemVariables..........................................................48
VariableTypesandFormats .....................................................49
InputandOutputFormats....................................................49
StringVariableFormats.....................................................50
NumericVariableFormats...................................................52
DateandTimeFormats .....................................................58
FORTRAN-likeInputFormatSpecifications ......................................63
TransformationExpressions.....................................................63
NumericExpressions.......................................................64
NumericFunctions ........................................................67
ArithmeticFunctions.......................................................67
StatisticalFunctions .......................................................68
RandomVariableandDistributionFunctions .....................................69
iii
DateandTimeFunctions....................................................93
StringExpressions........................................................ 101
StringFunctions.......................................................... 101
String/NumericConversionFunctions......................................... 106
LAGFunction............................................................ 106
VALUELABELFunction..................................................... 107
LogicalExpressions....................................................... 107
LogicalFunctions ........................................................ 111
ScoringExpressions(SPSSServer)........................................... 111
MissingValues.............................................................. 114
TreatmentofMissingValuesinArguments ..................................... 114
MissingValuesinNumericExpressions........................................ 116
MissingValuesinStringExpressions.......................................... 116
MissingValuesinLogicalExpressions......................................... 116
MissingValueFunctions................................................... 117
2SLS 118
Overview .................................................................. 118
EQUATIONSubcommand...................................................... 119
INSTRUMENTSSubcommand .................................................. 120
ENDOGENOUSSubcommand................................................... 120
CONSTANTandNOCONSTANTSubcommands...................................... 121
SAVESubcommand.......................................................... 121
PRINTSubcommand.......................................................... 121
APPLYSubcommand ......................................................... 121
ACF 123
Overview .................................................................. 123
Example................................................................... 124
VARIABLESSubcommand ..................................................... 125
DIFFSubcommand........................................................... 125
SDIFFSubcommand.......................................................... 125
PERIODSubcommand ........................................................ 126
LNandNOLOGSubcommands.................................................. 126
SEASONALSubcommand...................................................... 126
MXAUTOSubcommand ....................................................... 127
SERRORSubcommand........................................................ 127
iv
PACFSubcommand .......................................................... 128
APPLYSubcommand ......................................................... 128
References................................................................. 129
ADD DOCUMENT 130
Overview .................................................................. 130
ADD FILES 132
Overview .................................................................. 132
Examples.................................................................. 134
FILESubcommand........................................................... 134
RENAMESubcommand ....................................................... 134
BYSubcommand ............................................................ 135
DROPandKEEPSubcommands ................................................. 136
INSubcommand............................................................. 136
FIRSTandLASTSubcommands ................................................. 137
MAPSubcommand........................................................... 138
AddingCasesfromDifferentDataSources......................................... 138
ADD VALUE LABELS 139
Overview .................................................................. 139
Examples.................................................................. 140
ValueLabelsforStringVariables ................................................ 140
AGGREGATE 142
Overview .................................................................. 143
Example................................................................... 144
OUTFILESubcommand........................................................ 144
Creating a New Aggregated Data File versus Appending Aggregated Variables . . . . . . . . . . 145
BREAKSubcommand......................................................... 146
DOCUMENTSubcommand..................................................... 147
v
评论0