Intro to SPSS Macro call; The lifesavers of redundant code

SPSS macro
Using SPSS Macros can save an incredible amount of time.  They have a somewhat-steep learning curve but are definitely worth it!  This is a short overview of the strength of using a macro to run the descriptives command.

Word of warning, make sure you re-define your macro before calling it.  This is an easy step to forget and you can waste a lot of time.

SPSS Macro Code

DEFINE !Describer (Buy2 !TOKENS (1)   / Title !Tokens (1)  / ord !Tokens (1) /Varys !CMDEND)
Desc  !Varys     /sort (!ORD)  /stats Mean.
script "B:\SPSS\Scripts\S1\Swap Mean.SBS".
Script "B:\SPSS\Scripts\Change N to Count.SBS".
Script "B:\SPSS\Scripts\Parse\Move"("Other"). 
Script "B:\SPSS\Scripts\Parse\Move"("None of the above").
script 'B:\SPSS\Scripts\Parse\Change' (!Title).
Script "B:\SPSS\Scripts\S1\Size labels to avoid".
/*!Describer Buy2=XXX Ord=a  Title="Title"	Varys= Var1 Var2.

Video tutorials demonstrating the usage of the SPSS Macro

Additional SPSS macro links

A great resource to use and learn macros is Raynald Levesque’s site.  This page is his intro to macros page and this one walks through writing one.  He also has a great library of them located here.

Learning Macros | Raynald’s SPSS Tools

This page is a simple introduction to SPSS macros. There are several fully (line- by-line) commented examples of macro. Overview of several macro-related …

Quick Intro to SPSS progams | Glenn Thompson’s Homepage

Feb 13, 2010 Free Power Calculation Resources · automation program for  · Quick Intro to SPSS Working with SPSS …

Replacing missing data A lot of online vendor tools provide a data value on a multi-select question however they leave the value missing if the respondent didn’t select it. Most of the analysis I want to do needs to have a zero (or some other value) present in order to calculate the …

Leave a Reply

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