Package: rbi

Sebastian Funk

rbi: Interface to 'LibBi'

Provides a complete interface to 'LibBi', a library for Bayesian inference (see <> and Murray, 2015 <doi:10.18637/jss.v067.i10> for more information). This includes functions for manipulating 'LibBi' models, for reading and writing 'LibBi' input/output files, for converting 'LibBi' output to provide traces for use with the coda package, and for running 'LibBi' to conduct inference.

Authors:Pierre E. Jacob [aut], Anthony Lee [ctb], Lawrence M. Murray [ctb], Sebastian Funk [aut, cre], Sam Abbott [ctb]

rbi.pdf |rbi.html
rbi/json (API)

# Install rbi in R:
install.packages('rbi', repos = c('', ''))

Peer review:

Bug tracker:


40 exports 24 stars 2.86 score 16 dependencies 3 dependents 433 downloads

Last updated 19 days agofrom:2de0f5e6c00f11bded8bbd2c6e8f5f08b1d4e88b



Collection of SIR models for LibBi

Rendered fromidd_models.Rmdusingknitr::rmarkdownon Jun 01 2024.

Last update: 2023-07-12
Started: 2023-07-11

Introduction to rbi

Rendered fromrbi.Rmdusingknitr::rmarkdownon Jun 01 2024.

Last update: 2023-07-26
Started: 2023-07-26

Readme and manuals

Help Manual

Help pageTopics
Add a block to a LibBi modeladd_block add_block.bi_model
Attach a new file or data set to a 'libbi' objectattach_data attach_data.libbi
Bi contentsbi_contents
NetCDF File Summarybi_file_summary
Bi Generate Datasetbi_generate_dataset
Bi Modelbi_model
Bi Readbi_read
Create (e.g., init or observation) files for LibBibi_write
Enable outputting variables in a 'bi_model'enable_outputs
Check if two models are equal==.bi_model Equals.bi_model `==.bi_model`
Subset and replace model linesExtract_assign.bi_model [<-.bi_model `[<-.bi_model`
Extract a sample from a 'LibBi' run.extract_sample
Subset model linesExtract.bi_model [.bi_model `[.bi_model`
Using the LibBi wrapper to filterfilter filter.bi_model filter.libbi
Fix noise term, state or parameter of a libbi modelfix fix.bi_model
Flatten list of data frames This function takes a list of data frames (such as, for example, returned by 'bi_read') and converts it to a flat data frameflatten
Generate Datasetgenerate_dataset
Get the contents of a block in a LibBi modelget_block get_block.bi_model
Get constants in a LibBi modelget_const
Get dimensions in a LibBi modelget_dims
Get the name of a bi modelget_name get_name.bi_model
Get the parameter tracesget_traces
Insert lines in a LibBi modelinsert_lines insert_lines.bi_model
Join multiple 'libbi' objectsjoin join.libbi
LibBi Wrapperlibbi
Using the LibBi wrapper to logLiklogLik logLik.libbi
Using the LibBi wrapper to optimiseoptimise optimise.bi_model optimise.libbi
Using the LibBi wrapper to predictpredict predict.libbi
Print the log file a 'libbi' objectprint_log
Read results of a 'LibBi' run from an RDS file or from a folder. This completely reconstructs the saved 'LibBi' objectread_libbi
Remove line(s) and/or block(s) in a libbi modelremove_lines remove_lines.bi_model
Remove variablesremove_vars
Replace all instances of a string with another in a modelreplace_all replace_all.bi_model
Using the LibBi wrapper to rewriterewrite rewrite.bi_model rewrite.libbi
Using the LibBi wrapper to launch LibBirun run.libbi
Using the LibBi wrapper to samplesample sample.bi_model sample.libbi
Sample observations from a LibBi model that has been runsample_obs
Write results of a 'LibBi' run to an RDS filesave_libbi save_libbi.libbi
Set the name of a bi modelset_name set_name.bi_model
Using the LibBi wrapper to simulatesimulate simulate.bi_model simulate.libbi
Print summary information about a 'libbi' objectsummary summary.libbi
Check if two models are unequal!=.bi_model Unequals.bi_model `!=.bi_model`
Update a libbi objectupdate update.libbi
Get variable names in a LibBi modelvar_names
Writes a bi model to a file.write_model write_model.bi_model write_model.libbi