Mike Smith’s SAS macro for remote execution of WinBUGS
This is a SAS macro which does the data handling and input / output from WinBUGS via SAS. It produces a column format data file and also writes a list format data file for constants. It then writes a script file to the WinBUGS directory referencing appropriate datafile, model file, init file and log file names. The script then runs WinBUGS in batch mode and reads in the node statistics block from the log file. The user needs to specify the input and output file names and directory path as well as the statistics to be monitored in WinBUGS. The code works best for a model that has already been set up and checked for convergence diagnostics within WinBUGS. The obvious use of this macro is for running simulations where the inputs and output files all have the same name but all that differs between simulation iterations is the input dataset.
To get the code click here.