run {rbi} | R Documentation |
Using the LibBi wrapper to launch LibBi
Description
The method run
launches LibBi
with a particular set of command
line arguments. Normally, this function would not be run by the user,
but instead one of the client functions sample
,
filter
, or optimise
, or rewrite
,
which pass any options on to run
. Note that any options specified
here are stored in the libbi
object and do not have to be
specified again if another command is run on the object.
Usage
## S3 method for class 'libbi'
run(
x,
client,
proposal = c("model", "prior"),
model,
fix,
config,
log_file_name = character(0),
init,
input,
obs,
time_dim = character(0),
coord_dims = list(),
thin,
output_every,
chain = TRUE,
seed = TRUE,
debug = FALSE,
...
)
Arguments
x |
a |
client |
client to pass to LibBi |
proposal |
proposal distribution to use; either "model" (default: proposal distribution in the model) or "prior" (propose from the prior distribution) |
model |
either a character vector giving the path to a model file
(typically ending in ".bi"), or a |
fix |
any variable to fix, as a named vector |
config |
path to a configuration file, containing multiple arguments |
log_file_name |
path to a file to text file to report the output of
|
init |
initialisation of the model, either supplied as a list of values
and/or data frames, or a (netcdf) file name, or a |
input |
input of the model, either supplied as a list of values and/or
data frames, or a (netcdf) file name, or a |
obs |
observations of the model, either supplied as a list of values
and/or data frames, or a (netcdf) file name, or a |
time_dim |
The time dimension in any R objects that have been passed
( |
coord_dims |
The coord dimension(s) in any |
thin |
any thinning of MCMC chains (1 means all will be kept, 2 skips
every other sample etc.); note that |
output_every |
real; if given, |
chain |
logical; if set to TRUE and |
seed |
Either a number (the seed to supply to |
debug |
logical; if TRUE, print more verbose messages and write all variables to the output file, irrespective of their setting of 'has_output' |
... |
list of additional arguments to pass to the call to |
Value
an updated libbi
object, except if client
is
'rewrite', in which case invisible NULL will be returned but the rewritten
model code printed