O'Reilly logo

SPSS Statistics for Data Analysis and Visualization by Jason Verlen, Andrew Wheeler, Jon Peck, Jesus Salcedo, Keith McCormick

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 18 Statistical Extension Commands

SPSS Statistics has a large number of statistical procedures and other commands built in, but there is always a need for more. Starting with version 14 in 2006, SPSS Statistics, then just called SPSS, added the ability for users to use standard programming languages within the product to extend its capabilities. First Python, then R, and then Java were added in subsequent releases. This is referred to as programmability.

Programmers can write and run code in these languages directly, but programmability also provides a way to create new commands that look to the user like built-in commands. Called extension commands, they can have a dialog box interface, traditional syntax, and produce traditional pivot table and graphical output in the Viewer. They can greatly expand the built-in capabilities of SPSS Statistics.

This chapter explains what an extension command is and then illustrates the use of three extension commands available for statistical analysis and one for computation on pivot tables. The first three do not require any knowledge of Python or R to use them; the fourth one uses a snippet of Python with the extension command.

What Is an Extension Command?

Python, R, and Java programmers can run their programs directly within the regular syntax stream by enclosing the code in a BEGIN PROGRAM ... END PROGRAM block. The code can use any of the facilities of these languages and uses libraries of IBM application programming interfaces ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required