Create a .Data (or _DATA if in DOS) sub-directory of the directory where the line1.out,... file etc. are located. Invoke S-Plus and attach the CODA functions as described in §2.2. To run CODA , type
CODA()
at the S-Plus prompt. You will receive a welcome message on the screen and a menu of options:
_______________________________________________________________ | | | Welcome to CODA! | | Convergence Diagnostics and Output Analysis for BUGS output | |_______________________________________________________________| | | | Authors : Nicky Best, Kate Cowles & Karen Vines. | | | | CODA : Copyright (c) 1995 MRC Biostatistics Unit. | | All rights reserved | | Version 0.30 | | | |_______________________________________________________________| Do you wish to: 1: Begin a new CODA session using BUGS output files 2: Begin a new CODA session using data saved from a previous CODA session 3: Quit Selection:
Select option 1 by typing 1 after the word Selection:. You will be prompted to enter the names of the BUGS .ind and .out files that you wish to analyse. To specify the files created by the 2 chain line analysis, respond as follows (user-responses are shown in bold):
Enter BUGS output filenames, separated by return key (Leave blank to exit):1: line1
2: line2
3:
Note that the filename extensions are not required.
Next you will be prompted to enter a title for the analysis. This is optional and may be left blank:
Enter problem title, followed by return key:1: Line problem from the BUGS manual
The program then reports on its progress in reading the specified files.
Reading Data file... Abstracting beta ... 200 valid values Abstracting alpha ... 200 valid values Abstracting sigma ... 200 valid values Reading Data file... Abstracting beta ... 200 valid values Abstracting alpha ... 200 valid values Abstracting sigma ... 200 valid values
Next, you will be prompted to specify which (if any) variables take values restricted to either the range (0, 1) or to the positive real line. CODA requires this information in order to correctly compute gelman:rubin:92's convergence diagnostic for non-normal variables (see §4.2), and to produce kernel density estimates within the appropriate range (see §3.1).
Are any variables restricted to values between 0 and 1 (y/n) ? 1:
For the line example, you should respond n to this question. The next prompt to appear is as follows:
Are any variables restricted to all positive values (y/n) ? 1:
For the line example, you should respond y to this question, which causes the following display to appear:
Available variables: +---------------+-------------+ |VARIABLE NUMBER|VARIABLE NAME| +---------------+-------------+ |1 |alpha | +---------------+-------------+ |2 |beta | +---------------+-------------+ |3 |sigma | +---------------+-------------+ Enter relevant variable number(s), separated by commas (Ranges such as 3:7 may be specified) (Enter 0 for none): 1:
The sigma parameter represents the standard deviation of the residual error in the line model, and so is restricted to positive values. Therefore, you should enter the number 3 at the above prompt.
After a slight pause whilst CODA creates a `working' copy of the data, the main menu is then displayed.
CODA Main Menu ************** 1: Output Analysis 2: Diagnostics 3: List/Change Defaults 4: Quit Selection:
The following sections of this manual describe the various menu options in detail, and give examples of the output obtained when each option is applied to the line example.