I have a seemingly complicated problem (at least to this SPSS user
). I am running a simulation through a macro to create Boolean predictions. The setup is as follows: I have a base file with information for each record. I run the simulation once (without running the macro) to get the first predictions. This will give me an individual prediction for each record (there are four total predictions; in other words, I am creating four new variables). At the moment, I aggregate these predictions and send them to a temporary file. Then, I append what is in the temporary file to my actual output file which will eventually contain all my predictions.
After I first run through the simulation I end up with my base file, a temp file with one row of aggregated predictions, and another file which contains the first row of predictions. I then define the macro with the same language I used to create the above files. I run it and it and have it set up in such a way that it will automatically run 100 times. This will return a file with 100 rows of aggregated predictions.
This is where the problem lies: I do not want a file of 100 aggregate predictions; I want a file with individual level data for every prediction. However, I am unsure as to how the mechanics of this would work. Either I would need to have the simulation repeat for every record and append new predictions for every record into one file with some sort of flag indicating which simulation iteration it was, but this would create an incredibly tall table (I could be working with either 100k to millions of records here). Or, I could could somehow create dynamically updating variables that will be tagged with a suffix for the simulation iteration. This would create a wide table where the new predictions would be merged into the file. I think the second option makes the most sense. I've thought of integrating a Python program in the syntax to somehow dynamically update the prediction variable names, but I'm an amateur Python programmer at best. I've got more of a background in statistics.
If anyone has any ideas or knows of any SPSS commands that my help, it would be very much appreciated.