rbi is anRinterface tolibbi, a library forBayesian inference.
It mainly contains:
bi_model class, to manipulate libbi modelslibbi wrapper class, to perform Bayesian using libbiinference from within R,The easiest way to install the latest stable version ofrbi is viaCRAN:
install.packages("rbi")Alternatively, the current development version can be installed usingtheremotes package
# install.packages("remotes")library("remotes")install_github("sbfnk/rbi")Therbi package has only been tested on GNU/Linuxand OS X, but it should mostly work everywhereR works.
If you want to userbi as a wrapper toLibBi then you need a working version ofLibBi. To installLibBi on a Mac, the easiest way is to installHomebrew, followed by (using a command shell,i.e. Terminal or similar):
brew install libbiOn linux, follow theinstructionsprovided with LibBi.
The path tolibbi script can be passed as an argument torbi, otherwise the package tries to find itautomatically using thewhich linux/unix command.
If you just want to process the output fromLibBi,then you do not need to haveLibBi installed.
A good starting point is to look at the included demos:
demo(PZ_generate_dataset)## generating a data set from a modeldemo(PZ_PMMH)## particle Markov-chain Metropolis-Hastingsdemo(PZ_SMC2)## SMC^2demo(PZ_filtering)## filteringFor further information, have a look at the introductory vignettefrom the link from therbi CRAN package.
LibBi contains theget_traces methodwhich provides an interface tocoda.
For higher-level methods to interact withLibBi, have a look atrbi.helpers.