Don't satisfy yourself with the Graphic User Interface (GUI) while working with SPSS! The GUI is fine (I use it every day). However, using syntax in addition of the GUI can easily increase productivity by a factor of 5 to 10 times for simple jobs. The increase can easily be 50 times or more for larger, complex jobs. Furthermore some of SPSS's features are only available through syntax. As a "bonus", syntax files work on all versions of SPSS, not just on Windows.

SPSS Syntax is SPSS command language. Any built-in statistical procedure or transformation function can be called via sytax. In fact, many years ago when there were no SPSS GUI, writing syntax was the only way to communicate with SPSS processor. Nowadays, you have options. Say, if you need to get frequency distribution for variable town, you could go to menu Analyze…Descriptive Statistics…Frequencies, select variable town and click OK. But as well, you could open Syntax Editor window instead, type command FREQUENCIES town. and run it. The result would be the same.

In general, the second option would be preferrable if:

  • You want to make your analysis repetitive, i.e. easily reproducible on different of changed data set
  • You want to have an option to correct some points in your analysis path while keep the rest unchanged
  • Certain data operations are best automated in programming constructs, such as IFs or LOOPs
  • You want clear log of all your analysis steps, including comments
  • You need an access to some procedures or options, available only with syntax
  • You would like to save your custom data transformations in sort of function to use it later in other parts of your job
  • You want to integrate your analysis in some external app which uses power of SPSS for data processing

As you progress with syntax, you could easily continue this list with your own examples. For introductory information on syntax see page Learning Syntax. Should you be interested in more comprehensive approach to study syntax, consider Universals section of Command Syntax Reference (available via SPSS Help menu) or freely available book SPSS Programming and Data Management, several first editions where written by Raynald Levesque.

This site is largely built around SPSS syntax. Sample Syntax Library is the key and biggest part. There is something for everybody in the sample syntax's included:

  • Some do simple things, are easy to understand and have a lot of comments.
  • Some do complex things and have either no comments or a lot of comments.
  • Others fall between these two extremes

Check the menu Syntax for the full list of syntax-related materials on Raynald's SPSS Tools.

Suggestions and code contributions are welcomed. Share what you know! Learn what you don't!