• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

R/H10-Aug-2017-5448

vol1/H03-May-2022-3,0922,794

vol2/H03-May-2022-6,5566,214

ReadMeH A D10-Aug-20172.6 KiB7250

ReadMe

1Classic BUGS examples
2---------------------
3
4Some of the BUGS examples have been modified to run with JAGS, and have
5been turned into a test suite.
6
7Each subdirectory contains a number of JAGS script files named test1.cmd,
8test2.cmd, ... etc. designed to run the examples as they were presented
9in the classic BUGS examples book.
10
11There are also R script files test1.R, test2.R ... to run the
12examples using the rjags interface from JAGS to R.
13
14Some of the examples have been modified. In such cases, there is a
15ReadMe file explaining the changes. Some examples cannot be run at all,
16and these are not included in the testing process.
17
18Make targets
19------------
20
21The test suite uses GNU make.  To run the tests, change directory into
22either "vol1" or "vol2" and invoke make with one of the following targets.
23
24make check  Will run all the examples and check the results against
25            the benchmark run.  The check ensures that the posterior
26            mean of the monitored nodes is not more than 0.15 standard
27            deviations away from the benchmark mean.
28
29make Rcheck Runs examples using the rjags interface.
30
31make clean  Cleans up any files that may have been created during
32            make check, or during debugging
33
34make bench  Creates new benchmark results
35
36make distclean Deletes the benchmark results
37
38In order to run make for a specific example, use the variable "EXAMPLES":
39make check EXAMPLES=line
40
41Debugging an example
42--------------------
43
44If "Make check" fails for example foo, then make will report an error in
45make taget "check_foo".  The log file "check.log" in subdirectory "foo"
46can be inspected to see what went wrong. This log file includes the
47output produced by JAGS when running the model and by R when checking
48the output. Similarly, "make Rcheck" exands to targets of the form
49"Rcheck_foo" and the log file is "Rcheck.log".
50
51Note that the tests in "make check" and "make Rcheck" are not deterministic and
52will occasionally fail just by chance.  You may run "make check" again
53when this happens to see if the error is consistently reproduced.
54
55Re-running the examples
56-----------------------
57
58Once all the tests have been successfully completed in a sub-directory,
59an empty marker file will be created (check.OK or Rcheck.OK) and the
60corresponding checks will be skipped.  To re-run the checks, first use
61"make clean" to remove the marker files.
62
63Parallel make
64-------------
65
66The examples in separate directories can be run in parallel for increased
67efficiency.  Use the "-j" argument to run examples in parallel, e.g
68
69make -j4 check
70
71Will run 4 parallel make jobs.
72