Skip to main content

Data & Intelligence

IBM SPSS Statistics Syntax Best Practice

I recently audited the IBM course IBM SPSS Statistics Syntax I – ILO 0L406. In that course, you are introduced to the scripting language that IBM SPSS Statistics offers. It’s well worth your time.

SPSS Syntax is a scripting language composed of a library of functions that can be used to modify, manage and analyze data. You may know that SPSS was first developed as a mainframe statistical program based completely on syntax. This meant you had to learn write scripts to perform specific functions, such as regression or analysis of variance, or even to produce counts and percent’s. Sometime in 1990 (as they point out in the class) a GUI was developed for SPSS to make it easier to use.

From an architectural perspective, the use of Syntax is highly recommended (over the GUI). The reasoning is simple:

spssme

Automation: Unless you are in an exploratory mode any analyses you perform will be repeated. If the idea of saving you mouse clicks isn’t enough, then consider the idea of automatically performing a series of statistical analyzes on a dataset that is refreshed every 24 hours. Syntax can be written and saved to a file (comprising all of the commands required to read data, create/modify variables, and produce statistical analysis) which can be executed in a batch mode by a production scheduler.  While the SPSS GUI is very convenient, it isn’t designed to run this kind of production jobs.

Optional Parameters: Most of the SPSS functions have additional optional parameters that are not available in the SPSS GUI. For example, using the dialog boxes in Chart Builder you might not get the graph that you would like to have, but using the Graphical Production Language (GPL) that lies underneath the Chart Builder you will be able to produce a more complex chart.

Data Intelligence - The Future of Big Data
The Future of Big Data

With some guidance, you can craft a data platform that is right for your organization’s needs and gets the most return from your data capital.

Get the Guide

Extended Function Library: SPSS Syntax offers additional scripting functions that cannot be found in the SPSS GUI. For example, powerful syntax is available to perform complex data modifications, but these options cannot be found in any dialog box. Additionally (of course) Syntax offers functions used to set up automated production jobs (for automation).

Documentation: A syntax script file is a record of the operations and commands performed by SPSS. Since it is a saved file, it can be versioned (using most source control software) or simply printed out to be a repository of steps used to analyze data.

Re-Use: Once a script has been created (and validated) other users can leverage it to analyze their data or use it as a “starting point” for more complex processing.

Portability: SPSS syntax will run on almost any installation of SPSS Statistics (including UNIX and Macintosh). For example, your syntax scripts developed on MS Windows will also run on other systems such as UNIX.

 

Conclusion: IBM SPSS Statistics is the definitive data analysis tool – as you become familiar with its many features, make sure you develop your syntax script library.

 

Cheers!

 

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Jim Miller

Mr. Miller is an IBM certified and accomplished Senior Project Leader and Application/System Architect-Developer with over 30 years of extensive applications and system design and development experience. His current role is National FPM Practice Leader. His experience includes BI, Web architecture & design, systems analysis, GUI design and testing, Database modeling and systems analysis, design, and development of Client/Server, Web and Mainframe applications and systems utilizing: Applix TM1 (including TM1 rules, TI, TM1Web and Planning Manager), dynaSight - ArcPlan, ASP, DHTML, XML, IIS, MS Visual Basic and VBA, Visual Studio, PERL, Websuite, MS SQL Server, ORACLE, SYBASE SQL Server, etc. His Responsibilities have included all aspects of Windows and SQL solution development and design including: analysis; GUI (and Web site) design; data modeling; table, screen/form and script development; SQL (and remote stored procedures and triggers) development and testing; test preparation and management and training of programming staff. Other experience includes development of ETL infrastructure such as data transfer automation between mainframe (DB2, Lawson, Great Plains, etc.) systems and client/server SQL server and Web based applications and integration of enterprise applications and data sources. In addition, Mr. Miller has acted as Internet Applications Development Manager responsible for the design, development, QA and delivery of multiple Web Sites including online trading applications, warehouse process control and scheduling systems and administrative and control applications. Mr. Miller also was responsible for the design, development and administration of a Web based financial reporting system for a 450 million dollar organization, reporting directly to the CFO and his executive team. Mr. Miller has also been responsible for managing and directing multiple resources in various management roles including project and team leader, lead developer and applications development director. Specialties Include: Cognos/TM1 Design and Development, Cognos Planning, IBM SPSS and Modeler, OLAP, Visual Basic, SQL Server, Forecasting and Planning; International Application Development, Business Intelligence, Project Development. IBM Certified Developer - Cognos TM1 (perfect score 100% on exam) IBM Certified Business Analyst - Cognos TM1

More from this Author

Follow Us
TwitterLinkedinFacebookYoutubeInstagram