SPSS macro makes for easy splitting of data into separate files of equal numbers

SPSS Macro

SPSS macro

If you frequently need to have your data split into equal groups, this SPSS macro is the way to go!  You can just tell it how many groups you want and the variable you want to create to store group belonging and WHAM!  it randomizes the list and adds a new field showing the groups.

In the code below I show two examples of the SPSS macro.  One that will randomize the group and split it out, the second allows you to use another variable before breaking them into groups (In case you want a certain order to them.)  Both macros greatly reduce the amount of work needed to do in SPSS.


SPSS Macro for creating equal groups

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 …

Leave a Reply