Description Usage Arguments Details Author(s) Examples
testBUGSmodel
builds a BUGS model in the NIMBLE
system and simulates from the model, comparing the values
of the nodes and their log probabilities in the uncompiled
and compiled versions of the model
1 2 |
example |
(optional) example character vector
indicating name of BUGS example to test; can be null if
|
dir |
(optional) character vector indicating directory in which files are contained, by default the classic-bugs directory if the installed package is used; to use the current working directory, set this to "" |
model |
(optional) one of (1) a character string
giving the file name containing the BUGS model code, (2)
an R function whose body is the BUGS model code, or (3)
the output of |
data |
(optional) one of (1) character string giving
the file name for an R file providing the input constants
and data as R code [assigning individual objects or as a
named list] or (2) a named list providing the input
constants and data. If neither is provided, the function
will look for a file named |
inits |
(optional) (1) character string giving the
file name for an R file providing the initial values for
parameters as R code [assigning individual objects or as
a named list] or (2) a named list providing the values.
If neither is provided, the function will look for a file
named |
withInits |
boolean indicating whether to test model
with initial values provided via |
Note that testing without initial values may cause warnings when parameters are sampled from improper or fat-tailed distributions
Christopher Paciorek
1 | testBUGSmodel('pump')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.