Description Usage Arguments Details Value See Also
This function runs one of the standard BUGS examples stored
in the bugs-examples
package using its canonical name
1 | runExample(example, engine=c("OpenBUGS", "WinBUGS", "JAGS", "BRugs"), exDir)
|
example |
A list containing sufficient information to run the example. See Details below |
engine |
Name of the engine to use for running the example |
exDir |
Name of the directory where the model files will be found. By default the ‘examples’ directory of the installed bugs-examples package is used |
The example list must have the following components
The name of the example
A character vector of the names of parameters to save
Number of samples to keep after burnin.
Number of burnin iterations to discard.
Thinning interval to use for the chain. Setting
nThin
to n
instead of 1 increases the total run
time by n
but does not affect the number of stored samples
Number of parallel chains to run
The runExamples
function will search for model files in the
exDir
directory. These files must have the same base name as
the example with extensions “model.txt”, “data.txt”, and
“inits.txt”.
An list with the following components
An mcmc.list
object containing output for the
monitored variables
The run time as returned by system.time
The name of the MCMC engine
The name of the example
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.