|
This is the third message on new extension commands in SPSS Statistics 17. In the first two messages, I discussed commands to modify the formatting of output tables (SPSSINC MODIFY TABLES) and to estimate Rasch models using R (SPSSINC RASCH). If I had a blog, I could post all this information there, but I don’t, so here’s another message. If I’m boring you, there’s always the delete button.
First, a brief mention of an existing extension command that is upgraded for 17. We created the COMPDS extension command in SPSS 16 to compare the variable dictionaries and/or case data in two SPSS datasets. This was implemented using the new Dataset class introduced into Python programmability in that release. Now we have SPSSINC COMPARE DATASETS. This is the same command except with a clearer name, and the 17 version has a dialog box interface that can be added to the Data menu for ease of use. If you compare everything, you get two pivot tables summarizing the differences between the cases and the variable dictionaries plus new variables in the first dataset showing the differences in the case values. One of the major improvements in programmability and scripting in version 17 is the ability to use both sets of apis together. Until 17, you programs could only use backend apis (spss module) and scripts that could only use scripting apis (SpssClient module). Now programs can also use the scripting apis as long as you are not in distributed mode. SPSSINC MODIFY TABLES makes heavy use of that, and so does SPSSINC MODIFY OUTPUT. (There are still restrictions on scripts using the backend apis.) This makes the use of the SCRIPT command unnecessary in programs. SPSSINC MODIFY OUTPUT lets you modify the outline and item titles of objects in the Viewer. Until 17, you had to write a script in Basic or Python to navigate through the Viewer objects to find the ones you wanted and then call appropriate apis to modify the text. Now you can handle this with regular (extension) syntax. You can also write small script snippets that can be plugged in while the command does the navigating for you, but for general use, you need know nothing about scripting. The command lets you select the items to modify according to the object type and table subtype and the existing outline or item title text anywhere in the Viewer or in the most recent command. Then you can replace that text with a modified version that can be built out of part or all of the old title or be entirely new. If you like regular expressions, they can be used in this process, or you can use the simpler matching facilities of exact match, starts with, or ends with. You can also use this command to sequentially number or letter selected objects, incorporating the sequence identifier anywhere in the title. You can even have it generate the sequence numbers in roman numerals. If you want fancier formatting, you can write html or rtf expressions for the replacement title text. For example, <html>This is <i>italic</i> text would italicize the word italic. The formatting applies to the item text, not the outline. Some kinds of items, including charts, cannot have their titles modified this way. You can also control the visibility of the selected items. For example, if you work with only one dataset at a time, you might use the command to hide all the “active dataset” text blocks. This new command has a dialog box interface that appears on the Utilities menu. You can download both of these packages from SPSS Developer Central (www.spss.com/devcentral). They require the Python plug-in and at least SPSS Statistics 17. Next week, I will write about several new commands that deliver interesting extensions of regression via R packages and the return of an old favorite facility not available in SPSS 16. Regards, Jon K. Peck SPSS Inc. [hidden email] <mailto:[hidden email]> (ip) phone 312-651-3435 |
| Free forum by Nabble | Edit this page |
