The Bayesian Output Analysis FAQ

How should the CODA files be saved from within WinBUGS?

BOA can import sampler output from the WinBUGS program when the output is saved using the CODA file format. The CODA format consists of two ASCII text files terminated with the ".ind" and ".out" extensions. The ".ind" file contains the parameter names and indices, while the ".out" contains the sampler output. To ensure that the WindBUGS CODA output is saved to ASCII text files, follow the steps outlined below.

  1. Generate the CODA output from the "Sample Monitor Tool" in WinBUGS. Two windows will appear with the CODA output. The window containing the parameter names should be saved to a text file with a ".ind" extension; the sample output in the second window should be saved to a text file with a ".out" extension.
  2. Select "File->Save As..." from the WinBUGS menu.
  3. For the "Save as type:" specify "Plain Text (*.txt)".
  4. Give the file name in quotations.
  5. Press the "Save" button to save the data.

Why can't BOA find the output (CODA) files I created in WinBUGS?

BOA assumes that the CODA files have extensions ".ind" and ".out". Unfortunately, Microsoft Windows will often automatically append a ".txt" extension when saving these files. For example, suppose that we specified, in WinBUGS, that our CODA files be saved as "line.ind" and "line.out". We subsequently go to import the files in BOA, but are greeted with the following error message:

Enter filename prefix without the .ind or .out extension [Working Directory: ""]
1: line
Warning: could not find 'line.ind' or 'line.out' to import

In actuality, Microsoft Windows saved the files as "line.ind.txt" and "line.out.txt", even though that is not what it was asked to do. You may not even see the ".txt" extension in the Windows Explorer (file manager). The default setting for the file manager hides the file extensions. Here are two ways to fix the problem:

  1. In the Windows file manager, select "Tools->Folder Options" from the menu bar. This will bring up a dialog box with the settings for the file manager. Go to the "View" tab and uncheck the option to "Hide file extensions for known file types." Then locate the saved files using the file manager and rename them to "line.ind" and "line.out", respectively.
  2. When saving the files in WinBUGS, type the file names in quotation marks.

How can I increase the memory allocated in S-PLUS?

Importing files into BOA is one of the most expensive operations in terms of memory usage. Consequently, importing large sampler output files may result in a memory allocation error and subsequent termination of BOA. The following is an example of a common memory allocation error that may occur in S-PLUS:

Error in scan(filenames[2], list(iter = 0, parms = 0)): Cannot allocate
8388608 bytes: options("object.size") is 5000000: see options help file

If you are convinced that your computer has a sufficient amount of physical RAM to import the file, then the problem might be solved by increasing the maximum object size allowed by S-PLUS. The object size can be set at the S-PLUS command line by typing:

> options(object.size = <size>)

where <size> is the maximum size (in bytes) for any single S-PLUS object. For example, my office computer has 512MB of physical RAM, and the object.size in S-PLUS defaults to 2147483647. You might start by adjusting this value proportional to the amount of RAM installed on your computer. If the problem persists, consider using the R statistical program which generally uses memory more efficiently than S-PLUS.

 What is the reference for BOA?

The reference for BOA is given in bibtex format below.

@MISC{smith:2005:BOA,
  author =       {Smith, Brian J},
  title =        {{B}ayesian {O}utput {A}nalysis Program ({BOA}), Version
                  1.1.5},
  source =       {The University of Iowa},
  howpublished = {http://cph.uiowa.edu/boa},
  year =         {2005},
  month =        {March 23}
}

 

Since the “MISC” bibtex entry is not specifically designed for the citation of websites, the resulting output may not conform to that required by a given publication.  Specific formatting for common reference styles are as follows:

 

Chicago Manual of Style

 

Smith, Brian J. 2005. Bayesian Output Analysis Program (BOA), Version 1.1.5. The University of Iowa. http://cph.uiowa.edu/boa (accessed March 23, 2005).

 

Harvard Style

 

Smith, B.J., 2005. Bayesian Output Analysis Program (BOA), Version 1.1.5 [online]. The University of Iowa. Available from http://cph.uiowa.edu/boa [accessed March 23, 2005].