- Page 1 and 2: SPSS Programmingand Data Management
- Page 3 and 4: PrefaceExperienced data analysts kn
- Page 5 and 6: Contents1 Overview 1UsingThisBook..
- Page 7 and 8: 4 File Operations 62WorkingwithMult
- Page 9 and 10: CreatingVariableswithVECTOR .......
- Page 11 and 12: MixingCommandSyntaxandProgramBlocks
- Page 13 and 14: 17 Creating Procedures 327GettingSt
- Page 15 and 16: TransformingDataValues.............
- Page 17: spss.StartSPSSFunction ............
- Page 21 and 22: Part I:Data Management
- Page 23 and 24: 5Best Practices and Efficiency Tips
- Page 25 and 26: 7Best Practices and Efficiency Tips
- Page 27 and 28: 9Best Practices and Efficiency Tips
- Page 29 and 30: 11Best Practices and Efficiency Tip
- Page 31 and 32: 13Best Practices and Efficiency Tip
- Page 33 and 34: 15Best Practices and Efficiency Tip
- Page 35 and 36: 17Best Practices and Efficiency Tip
- Page 37 and 38: 19Best Practices and Efficiency Tip
- Page 39 and 40: 21Best Practices and Efficiency Tip
- Page 41 and 42: 23GettingDataintoSPSS• Btrieve•
- Page 43 and 44: 25GettingDataintoSPSS• TYPE=ODBC
- Page 45 and 46: 27GettingDataintoSPSS• Left outer
- Page 47 and 48: 29GettingDataintoSPSSFigure 3-3Acti
- Page 49 and 50: 31GettingDataintoSPSS/TYPE=XLS/FILE
- Page 51 and 52: 33GettingDataintoSPSSFigure 3-6Mult
- Page 53 and 54: 35GettingDataintoSPSSFigure 3-7Merg
- Page 55 and 56: 37GettingDataintoSPSSMany examples
- Page 57 and 58: 39GettingDataintoSPSSThe DATA LIST
- Page 59 and 60: 41GettingDataintoSPSSFixed-Width Te
- Page 61 and 62: 43GettingDataintoSPSS• There is n
- Page 63 and 64: 45GettingDataintoSPSS• /2 indicat
- Page 65 and 66: 47GettingDataintoSPSSType Example F
- Page 67 and 68: 49GettingDataintoSPSS- RECORD TYPE
- Page 69 and 70:
51GettingDataintoSPSSFigure 3-12Gro
- Page 71 and 72:
53GettingDataintoSPSSgrouped by sal
- Page 73 and 74:
55GettingDataintoSPSSY 2002R Chicag
- Page 75 and 76:
57GettingDataintoSPSSCOMPUTE #count
- Page 77 and 78:
59GettingDataintoSPSSthe first colu
- Page 79 and 80:
61GettingDataintoSPSSFigure 3-16SAS
- Page 81 and 82:
63File OperationsThe DATASET comman
- Page 83 and 84:
65File OperationsDATASET NAME origi
- Page 85 and 86:
67File OperationsMATCH FILES /FILE=
- Page 87 and 88:
69File Operations• The BY subcomm
- Page 89 and 90:
71File OperationsFigure 4-3Cases fr
- Page 91 and 92:
73File OperationsFigure 4-4Probably
- Page 93 and 94:
75File Operations• The IN subcomm
- Page 95 and 96:
77File OperationsFigure 4-7Original
- Page 97 and 98:
79File OperationsWeighting DataThe
- Page 99 and 100:
81File Operations• The values for
- Page 101 and 102:
83File Operations• The FLIP comma
- Page 103 and 104:
85File OperationsIncome_2 "Wife/Mot
- Page 105 and 106:
87File OperationsFigure 4-14Data fi
- Page 107 and 108:
89File OperationsFigure 4-16Related
- Page 109 and 110:
Variable and File PropertiesChapter
- Page 111 and 112:
93Variable and File Properties• F
- Page 113 and 114:
95Variable and File Properties/Inco
- Page 115 and 116:
97Variable and File PropertiesDeriv
- Page 117 and 118:
99Variable and File Propertiesthe n
- Page 119 and 120:
Data TransformationsChapter6In an i
- Page 121 and 122:
103Data TransformationsFigure 6-1Vi
- Page 123 and 124:
105Data Transformations0 'missing'.
- Page 125 and 126:
107Data Transformations• NVALID(v
- Page 127 and 128:
109Data TransformationsChanging the
- Page 129 and 130:
111Data Transformations*replace_sub
- Page 131 and 132:
113Data TransformationsLOOP #i = 1
- Page 133 and 134:
115Data TransformationsDate Input a
- Page 135 and 136:
117Data TransformationsOriginal dis
- Page 137 and 138:
119Data TransformationsCalculating
- Page 139 and 140:
121Data Transformations- COMPUTE ex
- Page 141 and 142:
Cleaning and Validating DataChapter
- Page 143 and 144:
125Cleaning and Validating DataExam
- Page 145 and 146:
127Cleaning and Validating DataFind
- Page 147 and 148:
129Cleaning and Validating DataExam
- Page 149 and 150:
131Cleaning and Validating DataExam
- Page 151 and 152:
Chapter8Conditional Processing, Loo
- Page 153 and 154:
135Conditional Processing, Looping,
- Page 155 and 156:
137Conditional Processing, Looping,
- Page 157 and 158:
139Conditional Processing, Looping,
- Page 159 and 160:
141Conditional Processing, Looping,
- Page 161 and 162:
143Conditional Processing, Looping,
- Page 163 and 164:
145Conditional Processing, Looping,
- Page 165 and 166:
147Conditional Processing, Looping,
- Page 167 and 168:
149Conditional Processing, Looping,
- Page 169 and 170:
151Conditional Processing, Looping,
- Page 171 and 172:
153Conditional Processing, Looping,
- Page 173 and 174:
Exporting Data and ResultsChapter9Y
- Page 175 and 176:
157Exporting Data and ResultsFREQUE
- Page 177 and 178:
159Exporting Data and ResultsFigure
- Page 179 and 180:
161Exporting Data and ResultsOMS Co
- Page 181 and 182:
163Exporting Data and ResultsDO IF
- Page 183 and 184:
165Exporting Data and ResultsFigure
- Page 185 and 186:
167Exporting Data and ResultsFigure
- Page 187 and 188:
169Exporting Data and Results• Th
- Page 189 and 190:
171Exporting Data and ResultsFigure
- Page 191 and 192:
173Exporting Data and Results• xm
- Page 193 and 194:
175Exporting Data and ResultsFigure
- Page 195 and 196:
177Exporting Data and ResultsThis t
- Page 197 and 198:
179Exporting Data and Results: •
- Page 199 and 200:
181Exporting Data and Resultsorder
- Page 201 and 202:
183Exporting Data and ResultsFor mo
- Page 203 and 204:
185Exporting Data and ResultsThe co
- Page 205 and 206:
187Exporting Data and Results• Th
- Page 207 and 208:
189Exporting Data and ResultsContro
- Page 209 and 210:
Scoring Data with PredictiveModelsC
- Page 211 and 212:
193Scoring Data with Predictive Mod
- Page 213 and 214:
195Scoring Data with Predictive Mod
- Page 215 and 216:
197Scoring Data with Predictive Mod
- Page 217 and 218:
199Scoring Data with Predictive Mod
- Page 219 and 220:
201Scoring Data with Predictive Mod
- Page 221 and 222:
203Scoring Data with Predictive Mod
- Page 223 and 224:
205Scoring Data with Predictive Mod
- Page 225 and 226:
207Scoring Data with Predictive Mod
- Page 227 and 228:
Part II:Programming with SPSS andPy
- Page 229 and 230:
211Introductionvirtually any other
- Page 231 and 232:
Getting Started with PythonProgramm
- Page 233 and 234:
215Getting Started with Python Prog
- Page 235 and 236:
217Getting Started with Python Prog
- Page 237 and 238:
219Getting Started with Python Prog
- Page 239 and 240:
221Getting Started with Python Prog
- Page 241 and 242:
Mixing Command Syntax and Program B
- Page 243 and 244:
225Getting Started with Python Prog
- Page 245 and 246:
227Getting Started with Python Prog
- Page 247 and 248:
Working with Multiple SPSS Versions
- Page 249 and 250:
231Getting Started with Python Prog
- Page 251 and 252:
233Getting Started with Python Prog
- Page 253 and 254:
235Getting Started with Python Prog
- Page 255 and 256:
Best PracticesChapter13This section
- Page 257 and 258:
239Best PracticesNote: Python will
- Page 259 and 260:
241Best PracticesString substitutio
- Page 261 and 262:
243Best PracticesCreating User-Defi
- Page 263 and 264:
245Best PracticesYou include the fu
- Page 265 and 266:
247Best PracticesConsider using Pyt
- Page 267 and 268:
249Best Practicesan SPSS format fil
- Page 269 and 270:
251Best PracticesUsingaPythonIDEWhe
- Page 271 and 272:
253Best PracticesThe problem is sol
- Page 273 and 274:
255Working with Variable Dictionary
- Page 275 and 276:
257Working with Variable Dictionary
- Page 277 and 278:
259Working with Variable Dictionary
- Page 279 and 280:
261Working with Variable Dictionary
- Page 281 and 282:
263Working with Variable Dictionary
- Page 283 and 284:
265Working with Variable Dictionary
- Page 285 and 286:
267Working with Variable Dictionary
- Page 287 and 288:
269Working with Variable Dictionary
- Page 289 and 290:
271Working with Variable Dictionary
- Page 291 and 292:
273Working with Variable Dictionary
- Page 293 and 294:
WorkingwithCaseDataintheActive Data
- Page 295 and 296:
277Working with Case Data in the Ac
- Page 297 and 298:
279Working with Case Data in the Ac
- Page 299 and 300:
281Working with Case Data in the Ac
- Page 301 and 302:
283Working with Case Data in the Ac
- Page 303 and 304:
285Working with Case Data in the Ac
- Page 305 and 306:
287Working with Case Data in the Ac
- Page 307 and 308:
289Working with Case Data in the Ac
- Page 309 and 310:
291Working with Case Data in the Ac
- Page 311 and 312:
293Working with Case Data in the Ac
- Page 313 and 314:
295Working with Case Data in the Ac
- Page 315 and 316:
297Working with Case Data in the Ac
- Page 317 and 318:
299Working with Case Data in the Ac
- Page 319 and 320:
301Working with Case Data in the Ac
- Page 321 and 322:
303Working with Case Data in the Ac
- Page 323 and 324:
305Working with Case Data in the Ac
- Page 325 and 326:
307Working with Case Data in the Ac
- Page 327 and 328:
309Working with Case Data in the Ac
- Page 329 and 330:
311Working with Case Data in the Ac
- Page 331 and 332:
313Working with Case Data in the Ac
- Page 333 and 334:
315Retrieving Output from SPSS Comm
- Page 335 and 336:
317Retrieving Output from SPSS Comm
- Page 337 and 338:
319Retrieving Output from SPSS Comm
- Page 339 and 340:
321Retrieving Output from SPSS Comm
- Page 341 and 342:
323Retrieving Output from SPSS Comm
- Page 343 and 344:
325Retrieving Output from SPSS Comm
- Page 345 and 346:
Creating ProceduresChapter17The SPS
- Page 347 and 348:
329Creating Procedures• To create
- Page 349 and 350:
331Creating ProceduresResultFigure
- Page 351 and 352:
333Creating Procedures• GroupMean
- Page 353 and 354:
335Creating ProceduresResultsFigure
- Page 355 and 356:
337Creating ProceduresExampleimport
- Page 357 and 358:
339Creating Procedures• coldim. A
- Page 359 and 360:
341Creating ProceduresResultsFigure
- Page 361 and 362:
343Creating ProceduresResultFigure
- Page 363 and 364:
345Data Transformations*python_tran
- Page 365 and 366:
347Data Transformations• By defau
- Page 367 and 368:
349Data TransformationsFigure 18-2R
- Page 369 and 370:
351Data Transformations*python_exte
- Page 371 and 372:
353Data Transformations*python_exte
- Page 373 and 374:
355Data Transformations*python_exte
- Page 375 and 376:
357Data TransformationsThe levensht
- Page 377 and 378:
359Data TransformationsThe strtodat
- Page 379 and 380:
361Data Transformations%I:%M %p". D
- Page 381 and 382:
Chapter19Modifying and Exporting Vi
- Page 383 and 384:
365Modifying and Exporting Viewer C
- Page 385 and 386:
367Modifying and Exporting Viewer C
- Page 387 and 388:
369Modifying and Exporting Viewer C
- Page 389 and 390:
Chapter20Tips on Migrating CommandS
- Page 391 and 392:
373Tips on Migrating Command Syntax
- Page 393 and 394:
Migrating Macros to Python375Tips o
- Page 395 and 396:
377Tips on Migrating Command Syntax
- Page 397 and 398:
379Tips on Migrating Command Syntax
- Page 399 and 400:
381Tips on Migrating Command Syntax
- Page 401 and 402:
383Tips on Migrating Command Syntax
- Page 403 and 404:
385Tips on Migrating Command Syntax
- Page 405 and 406:
387Special TopicsFigure 21-1Dataset
- Page 407 and 408:
389Special Topics• The code spssd
- Page 409 and 410:
391Special TopicsIn general, if ite
- Page 411 and 412:
393SPSS for SAS Programmersproc sql
- Page 413 and 414:
395SPSS for SAS ProgrammersReading
- Page 415 and 416:
397SPSS for SAS ProgrammersReading
- Page 417 and 418:
399SPSS for SAS Programmers• Both
- Page 419 and 420:
401SPSS for SAS Programmers104 1 10
- Page 421 and 422:
403SPSS for SAS Programmers/opinion
- Page 423 and 424:
405SPSS for SAS ProgrammersFREQUENC
- Page 425 and 426:
407SPSS for SAS Programmers• SPSS
- Page 427 and 428:
409SPSS for SAS Programmerscan auto
- Page 429 and 430:
411SPSS for SAS Programmers• In S
- Page 431 and 432:
413SPSS for SAS Programmers• SPSS
- Page 433 and 434:
415SPSS for SAS Programmers;days=En
- Page 435 and 436:
417SPSS for SAS Programmersdateonly
- Page 437 and 438:
419SPSS for SAS Programmers• In S
- Page 439 and 440:
421SPSS for SAS ProgrammersSPSS-Pyt
- Page 441 and 442:
423SPSS for SAS ProgrammersBEGIN PR
- Page 443 and 444:
425Python Functions and ClassesGet
- Page 445 and 446:
427Python Functions and ClassesFigu
- Page 447 and 448:
429Python Functions and ClassesGene
- Page 449 and 450:
431Python Functions and ClassesFigu
- Page 451 and 452:
433Python Functions and Classesrow_
- Page 453 and 454:
435Python Functions and Classes•
- Page 455 and 456:
437Python Functions and Classesspss
- Page 457 and 458:
439Python Functions and Classesrowd
- Page 459 and 460:
441Python Functions and ClassesExam
- Page 461 and 462:
443Python Functions and ClassesCell
- Page 463 and 464:
445Python Functions and Classesargu
- Page 465 and 466:
447Python Functions and ClassesExam
- Page 467 and 468:
449Python Functions and ClassesResu
- Page 469 and 470:
451Python Functions and Classesfoll
- Page 471 and 472:
453Python Functions and ClassesStri
- Page 473 and 474:
455Python Functions and Classestabl
- Page 475 and 476:
457Python Functions and Classesclas
- Page 477 and 478:
459Python Functions and Classes•
- Page 479 and 480:
461Python Functions and ClassesThe
- Page 481 and 482:
463Python Functions and Classesmust
- Page 483 and 484:
465Python Functions and Classes*pyt
- Page 485 and 486:
467Python Functions and Classesspss
- Page 487 and 488:
469Python Functions and Classes•
- Page 489 and 490:
471Python Functions and ClassesExam
- Page 491 and 492:
473Python Functions and ClassesBEGI
- Page 493 and 494:
475Python Functions and Classesinde
- Page 495 and 496:
477Python Functions and ClassesExam
- Page 497 and 498:
479Python Functions and ClassesExam
- Page 499 and 500:
481Python Functions and Classes•
- Page 501 and 502:
483Python Functions and ClassesSetV
- Page 503 and 504:
485Python Functions and ClassesType
- Page 505 and 506:
487Python Functions and Classesa di
- Page 507 and 508:
489Python Functions and Classesspss
- Page 509 and 510:
491Python Functions and Classesspss
- Page 511 and 512:
493Python Functions and Classesspss
- Page 513 and 514:
495Python Functions and Classes•
- Page 515 and 516:
497Python Functions and Classesspss
- Page 517 and 518:
499Python Functions and Classesspss
- Page 519 and 520:
501Python Functions and Classesspss
- Page 521 and 522:
503Python Functions and ClassesExam
- Page 523 and 524:
505Python Functions and Classesimpo
- Page 525 and 526:
507Python Functions and Classeszero
- Page 527 and 528:
509Python Functions and Classes•
- Page 529 and 530:
511Python Functions and Classesimpo
- Page 531 and 532:
513Python Functions and ClassesTo a
- Page 533 and 534:
Indexactive datasetappending cases,
- Page 535 and 536:
517Indexdayscalculating number of,
- Page 537 and 538:
519Indexordinal variables, 95outer
- Page 539 and 540:
521IndexSetVarCValueLabel method, 4