Python IDEs for IBM SPSS Statistics
Posted By Jon Peck on Mar 14, 2010 at 12:03 PM
Filed Under IBM SPSS Statistics, Programmability, Python, SPSS Statistics v17 | Leave a Comment
The IDLE IDE (Integrated Development Environment) is installed with the Python language and can be used with SPSS, but I am often asked to recommend a better one. I’ll tell you what I do and offer some tips on using it with IBM SPSS Statistics. This is not an in-depth review of any of these editors.
|
Data Management in IBM SPSS Statistics: Three-and-a-Half Ways to Skin a Cat
Posted By Jon Peck on Mar 10, 2010 at 05:03 PM
Filed Under IBM SPSS Statistics, Programmability, Python, SPSS Statistics v17 | Leave a Comment
IBM SPSS Statistics contains many tools for data management. This post discusses several different ways to solve an example data management problem using technology from different areas of the product. The purpose of this post is to help you decide where to look when creating a problem solution considering the available functionality and other characteristics.
The problem to be solved here is to convert a text file of comma-separated id values such as postal codes into an SPSS dataset with one item per line. This might then be used as a lookup table.
|
New IBM SPSS Statistics Extension Commands: SPSSINC SPLIT DATASET and SPSSINC PROCESS FILES
Posted By Jon Peck on Feb 15, 2010 at 12:02 PM
Filed Under IBM SPSS Statistics, Programmability, Python, SPSS Statistics v17 | 1 Comment
IBM SPSS Statistics provides several mechanisms for looping in transformations or over groups within a procedure. The new extension commands expand the looping capabilities.
|
Python Programs for Non-Python People
Posted By Jon Peck on Feb 04, 2010 at 01:02 PM
Filed Under Developer Central News, IBM SPSS Statistics, Programmability, Python | Leave a Comment
Python programs written to run in BEGIN PROGRAM blocks are easy to write and add lots of functionality to IBM SPSS Statistics. Many users have learned to create these. More users, though, do not know the Python language.
The extension command mechanism provides a way for users of traditional SPSS syntax to run Python programs written by someone else without needing any knowledge of Python. But the program must have been written as an extension command. While creating extension commands isn’t hard, it does require some extra knowledge and work. (An article on how to do this is available on Developer Central.)
I have posted a new extension command, SPSSINC PROGRAM, that allows ordinary Python programs to be run with traditional syntax without the author having created an extension command: easy on the author and easy on the user.
|
A New Extension Command: SPSSINC SUMMARY TTEST
Posted By Jon Peck on Feb 01, 2010 at 10:02 AM
Filed Under Developer Central News, IBM SPSS Statistics, Programmability, Python, SPSS Statistics v17 | Leave a Comment
I have posted to SPSS Developer Central a new Python-based extension command, SPSSINC SUMMARY TTEST, that does t tests when you have only the summary statistics from the samples rather than the full data. Besides being useful in its own right, it illustrates some useful techniques in doing programmability computations where you need both scalar computations and some SPSS transformation functions.
|
Translating IBM SPSS Statistics Python Extension Commands
Posted By Jon Peck on Jan 26, 2010 at 10:01 AM
Filed Under IBM SPSS Statistics, Python | Leave a Comment
The Python language includes a general mechanism facilitating translation of text in Python code. The newest version of extension.py, the module that facilitates creating extension commands, exploits this to make output translation really simple.
|
Developer Central Update: The CDB
Posted By Jon Peck on Jan 16, 2010 at 11:01 AM
Filed Under Developer Central News, IBM SPSS Statistics, Programmability | Leave a Comment
I have posted new versions of the SPSSINC MODIFY TABLES and SPSSINC MODIFY OUTPUT extension command dialog boxes to Developer Central. Functionality is unchanged, but the dialogs have been redesigned.
|
Automating the Installation of Custom Dialogs in IBM SPSS Statistics
Posted By Jon Peck on Jan 11, 2010 at 10:01 AM
Filed Under IBM SPSS Statistics, Programmability | Leave a Comment
Custom dialog boxes (created with the Custom Dialog Builder) can be installed interactively from the IBM SPSS Statistics Utilities menu (Install Custom Dialog in Version 17 or Custom Dialogs>Install Custom Dialog in Version 18). This works fine, but if you have a lot of dialogs to install or need to do this on many computers, it gets rather tedious. Fortunately you can automate this process with a simple bat file. Here’s how.
|
SPSS Developer Central News
Posted By Jon Peck on Oct 07, 2009 at 09:10 AM
Filed Under Developer Central News, IBM SPSS Statistics, Programmability, Python, R, SPSS Statistics v17 | Leave a Comment
Well, now that SPSS is part of IBM, I suppose we will need a new name for Developer Central and this blog. In the meantime, though, here is news about recent items on Developer Central.
- With the release of Version 18 of IBM SPSS Statistics and the Developer product, easy-to-install versions of the Python and R materials are posted. In particular, look for the R Essentials link on the main page or from the Plugins page. It installs the R Plugin, the correct version of R, and a bunch of example R integrations as bundles. It’s much easier to get going with this now.
- The spssaux2 module has a new function, setMacrosFromData that reads columns in the active dataset and creates macro definitions from them.
- The SPSSINC TRANS extension command is available. It makes it easy to run a standard or user-written Python function to transform the case data just about the way you would if the function were built in to the regular SPSS transformation system. (I’ve written about that in an earlier posting here.)
- In connection with this, the extendedTransforms.py module has several new functions and some tweaks to make it work well with SPSSINC TRANS. The new functions are mode and multmode for calculating the mode across variables within a case, packDummies and extractDummies for packing values of dummy variables into bits of a single variable and extracting them out later, and translatechar for mapping a set of characters in a string into another set of characters.
- Albert-Jan Roskam has contributed a module named state.py that will prune unused variables out of a dataset.
- The SPSSINC MERGE TABLES and SPSSINC CENSOR TABLES extension commands now run much faster. (I profiled them and found a few scripting apis that were unexpectedly slow and changed the code to minimize their use). If you have V18 the speedup is even greater, taking advantage of some improvements in that version. MERGE TABLES also has some convenience tweaks that make it easier to merge significance tests from Custom Tables into the main table. V18 has another way to do this built into the CTABLES command, but some people prefer the older style of the tables.
- The SPSSINC TRANSLATE OUTPUT command is available. It provides a framework for translating the outline and pivot table text for languages where we don’t already provide a translation.
- The customstylefunctions module included with the SPSSINC MODIFY TABLES extension command has some new custom functions. You can now move around rows, columns, and layers by using moveRowDimension, transpose, moveLayersToColumns, moveLayersToRows, moveColumnsToLayers, moveRowsToLayers, moveColumnsToRows, and moveRowsToColumns.
- The Programming and Data Management book and the article on writing extension commands have been updated for version 18.
All of this material is free once you have the SPSS base product.
|
More on SPSSINC TRANS
Posted By Jon Peck on Sep 20, 2009 at 09:09 PM
Filed Under Clementine, Developer Central News, Grammar of Graphics, Programmability, Python, SPSS Statistics v17, Uncategorized, Visualization | Leave a Comment
In my last post I wrote about my new extension command, SPSSINC TRANS. That command makes it very easy to apply Python functions to the case data by handling all the data passing, variable creation, etc, so you just have to write one line of Python code to call the function.
I have now posted a substantial rework of the initial beta version. As the saying goes, plan to throw one away: you will anyway. The difficult part of designing and implementing this command was getting the Python function expression through the SPSS Universal Parser, which doesn’t speak Python, and then taking it apart and setting up the requisite connections with the data.
|

