libbi: LibBi Wrapper

View source: R/libbi.R

libbiR Documentation

LibBi Wrapper

Description

libbi allows to call LibBi. Upon creating a new libbi object, the following arguments can be given. Once the instance is created, LibBi can be run through the sample, filter, or optimise, or rewrite methods. Note that libbi objects can be plotted using plot if the rbi.helpers package is loaded.

Usage

libbi(model, path_to_libbi, dims, use_cache = TRUE, ...)

Arguments

model

either a character vector giving the path to a model file (typically ending in ".bi"), or a bi_model object

path_to_libbi

path to LibBi binary; by default it tries to locate the libbi binary using the which Unix command, after having loaded "~/.bashrc" if present; if unsuccessful it tries "~/PathToBiBin/libbi"; if unsuccessful again it fails.

dims

any named dimensions, as list of character vectors

use_cache

logical; whether to use the cache (default: true)

...

options passed to run.libbi

Value

a new libbi object

See Also

sample, filter, optimise, rewrite

Examples

bi_object <- libbi(model = system.file(package = "rbi", "PZ.bi"))

rbi documentation built on Aug. 15, 2023, 5:07 p.m.