Index

  1. Self Adjusing Code
  2. Utilities
  3. Working with Many Files
  4. Macro variables
  5. Macro Gems
  6. Labels, Variable Names and Format
  7. OMS (Output Management System)
  8. Unclassified
  9. Tutorials
Never underestimate the power of SPSS!

Library

Self Adjusing Code

  1. INCLUDE Stops Because SELECT IF Results In No Data
  2. Macro Exits Loop When Data Meeting Convergence Criteria
  3. Include Output Into Syntax
  4. Include Several File-wise or Group-wise Statistics Into Syntax

Utilities

  1. Execute Macro for Each Distinct Value of a Variable
  2. Macro to Run Syntax with Empty Dataset with thanks to Fernando Cartwright
  3. Print Message in Output Window
  4. Macro to Run Code on Subsets of File
  5. Run Macro with Different Sets of Parameters, Stored as Data
  6. Run Macro with Different Sets of Parameters (example 2)
  7. Quote String on the Fly
  8. Define Paths to Files by Macro (very useful)

Working with Many Files

  1. Run a macro on several files
  2. Save file1 file2file3 etc by macro
  3. Process All .xls Files in a Given Folder

Macro variables

  1. Odd Feature of Macro Parser
  2. Doing Arithmetic With Macro Variables
  3. Calculations With Macro Variables
  4. Add Casewise Regression Estimatest to the Data
  5. Call Macro With Arguments Equal to Each Value of Var
  6. Define Macro Variable Equal to Each Value of Variable in Data
  7. Multiply Two Macro Variables
  8. Pair Variables from the Macro Call
  9. Macros Are Just String Parsers! (interesting comments by D. Marso)

Macro Gems

  1. Expand vector names
  2. Define list of variables between two variables (a macro Gem)
  3. Get all string or all numeric variables (the 2 macros produced by this macro allow you to process all string or all numeric variables in the data file)
  4. Reorder Variable Vector Names in Data Files (commented)

Labels, Variable Names and Format

  1. Define variable label by Macro
  2. Delete all variable labels of a given sav file
  3. Group data and define corresponding value labels

OMS (Output Management System)

  1. OMS and macros

Unclassified

  1. Canonical correlation (this comes with SPSS)
  2. Group Results of Several Procedures by Schools
  3. Generate Variable Number of Syntax Commands
  4. Call Macro from Another Macro
  5. List Variable Number of Variables
  6. Listing in a Loop (even though procedures are not 'allowed' in a LOOP)
  7. Passing Conditional Expression to the Macro

Tutorials

  1. Change Some Characters Inside Many String Variables
  2. Doing Arithmetic With Macro Variables