Main page. The collection of syntaxes, macros, scripts and hints for better solutions of data management and data analysis problems in IBM SPSS Statistics

  1. SPSS Syntax
  2. Macros
  3. Python Scripts
  4. R Scripts
  5. Basic Scripts
  6. Matrix
  7. SPSS Resources

About this project. Welcomes, purposes, acknowledgements and caveats

  1. Welcome to my SPSS pages!
  2. Purposes of this site
  3. Share what you know, learn what you don't!
  4. Caveats

What's New?

This page eases tracking web-site updates.


SPSS Syntax Home

Why to use syntax and what's on syntax at this site?

Syntax Library

  1. Bootstrap and random numbers
  2. Block Designs
  3. Batch files
  4. Area under the curve (AUC)
  5. Charts and Tables
  6. Labels, Variable Names and Format
  7. Cluster Analysis
  8. Combinations, Permutations, Interactions
  9. Compute
  10. Unclassified
  11. Factor Analysis
  12. IGRAPH
  13. Concatenate/modify string variables
  14. Parse or Flag data
  15. Data Editor
  16. Data validation
  17. Dates and time
  18. Distributions
  19. Export & Import
  20. Flag or Select Cases
  21. Item Analysis
  22. Matching data files
  23. Matrix
  24. Multiple responses
  25. OMS (Output Management System)
  26. Outliers
  27. Random Sampling
  28. Read, Write or Create Data
  29. Regression, Repeated Measures
  30. Test if file or variable exists
  31. Self Adjusing Code
  32. Ranking, largest values, sorting, grouping
  33. Tests of Inequality
  34. Working with Many Files
  35. Meta Analysis
  36. Transform variable
  37. RFM Analysis
  38. Remove Characters, Duplicates or Variables
  39. Strings
  40. Working with missing values
  41. ROC curves
  42. Restructure File
  43. Sample Size and Power
  44. Survival Analysis
  45. Time Series
  46. Conjoint Analysis
  47. T-Test or Means or ANOVA
  48. Standard Data Files
  49. Tutorials

Learning Syntax

Debugging Syntax.It has been said that Salesmanship starts after the prospect has said "no!" Similarly, programming could be said to start once there is a bug!

  1. This line of code does not work!
  2. About INCLUDing Files
  3. My DO IF … ELSE … END IF does not give the correct results!
  4. My vectors keep "disappearing"
  5. My SELECT IF does not select the correct cases!
  6. File is already in use
  7. Waiting for more inline data

Standard Data Files.Please share your syntax files with the SPSS community!

  1. Bureau of Labor Statistics (USA)
  2. Federal Information Processing Standard (FIPS)


Macros Home

SPSS Macro facility overview and summary of macro resources at the site.

Macros Library

  1. Self Adjusing Code
  2. Utilities
  3. Working with Many Files
  4. Macro variables
  5. Macro Gems
  6. Labels, Variable Names and Format
  7. OMS (Output Management System)
  8. Unclassified
  9. Tutorials

Learning Macros

  1. The Basics
  2. Macros and The Command Terminator
  3. Just (!) a string parser
  4. Fully commented example of a macro (obtain n independent samples of size m)
  5. Replacing a character in many string variables
  6. Changing storage type for multiple variables (several examples, from simple to more complex)
    • Version 1: to change the format (the name remains the same) of a variable from string to string, numeric to string or string to numeric
    • Version 2: same as above but doing 5–10 variables in the same macro call
    • Version 3: same as above but doing it for ALL numeric or string variables between 2 given variables in the data file.
  7. Doing arithmetic with macro variables (for advanced users)
  8. Another fully commented macro (print bar charts excluding categories with less than n cases)

Debugging Macros

Sax (Win Wrap) Basic Scripts

Basic Scripts Home

Scripts Library

  1. Printing
  2. Working with Many Files
  3. Output Document
  4. Transform variable
  5. Autoscripts
  6. Long variable names
  8. Data Editor
  9. Utilities
  10. Dialogs
  11. Distributions
  12. Export & Import
  13. Labels, Variable Names and Format
  14. Matrix
  15. Syntax Editor
  16. Output format
  17. Manipulating Pivot Tables

Learning Scripts

  1. Введение
  2. Что почитать?

The Asynchronous Problem.Options to coordinate Sax Basic (SPSS "VBA") script and syntax execution

  1. Описание использованных файлов
  2. Демонстрация проблемы
  3. Возможные решения

Python Scripts

Python Home

About scripting with Python in SPSS

Python Sample Scripts

  1. Self Adjusing Code
  2. Working with Many Files
  3. Output Document
  4. XML files
  5. Age Adjusted Prevalence
  6. Data Import and Export

R Scripts

R Scripts Home

SPSS and R integration

R Scripts Library

  1. Unclassified

SPSS Resources

SPSS Tips and FAQ

  1. How to Get Help from SPSS Community
  2. Best Practices
  3. General SPSS FAQ
  4. Syntax-specific FAQ
  5. Python Stuff
  6. Syntax Stuff
  7. Sax (WinWrap) Basic Scripting Notes

SPSS Programming and Data Management Book.SPSS® Programming and Data Management: A Guide for SPSS® and SAS® Users

  1. What is this book?
  2. Download Book & Files

SPSS Tutorials

SPSS Links

Users communitites, official SPSS pages, general SPSS Resources, personal sites, universities, …

Feedback page

How could you participate in SPSS Tools project if you like it, and what to do if you don't?