Automating the creation of randomly split-out text files with an SPSS macro

SPSS macro

I frequently need to randomize my lists and save them into separate text files. This SPSS macro makes it a breeze!

If you haven’t already played with macros you’ll want to get yourself familiar with them by reviewing this post on Intro to Macros. ┬áThe macro will need a few parameters from you like: the path to save the files, Stem (beginning) name of the files to create, # of groups to create and whether or not to keep the variable used to create the groups.

Automating the creation of randomly split-out text files

Below is the SPSS Macro which will automate the process.

Remember to define the SPSS macro before calling it!.

Leave a Reply