Stats
Stats >> WebLog >>
Extending SPSS capabilities using Python (January 19, 2006)
Version 14 of SPSS allows you to incorporate external programming languages into SPSS
syntax. According materials on the SPSS web page,
Combining the new backend processor APIs with an external programming or scripting
language opens up a limitless set of new possibilities from within SPSS syntax jobs. Use
the new SPSS Programmability Extension to control the flow of your SPSS command syntax
jobs through conditional execution control statements (such as 'If/Then/Else') and
looping control statements (such as 'For' and 'While'). These types of statements are
available in almost all external programming languages. Use scripts written in external
programming languages to conditionally execute or make decisions about which syntax is
executed based on a particular condition, such as: The value of the variable attributes
in the data dictionary; A value in the output; A value in the active dataset;
Error-level return codes from SPSS procedures. In short, you can create reusable code
that speeds the process of turning data into decisions.
www.spss.com/PDFs/pe.pdf
This sort of thing is not for the faint of heart. SPSS has built an interface between
their command syntax, and a program called Python, and with a bit of effort, you could build
a similar interface to other programs. Apparently, you can use Python to create bootstrap
estimates from any SPSS procedure. I will look for details of this when I get a chance. I
would also be interested in seeing if you could use Python to run randomization tests.
I have to wonder if the time spent getting SPSS to work with Python might not be better
invested in learning more about a program like R or Stata that can do things like bootstrap
estimates without having to resort to an external program.
Additional resources:
Stats >> WebLog >>
Extending SPSS capabilities using Python (January 19, 2006)
This page was last modified on
06/14/07. dot edu or click on
the email link at the top of the page.
You are welcome to link to this page or other pages on this web site. Individual educational
uses are also okay. Please contact me for permission to use these pages in any other way. For more
details, please consult my copyright notice.