Package: BayesFR 1.0.1

Benjamin Rosenbaum

BayesFR: Fitting Functional Responses in 1- and 2-Prey Systems

Easy application of Bayesian inference for functional responses via 'brms'. This package allows to fit various FR models for single- and multi-prey experiments by providing nonlinear prediction functions for 'brms'. It uses dynamical prediction models to correct for prey depletion. The 'brms' framework facilitates statistical modeling and enables users to conveniently incorporate covariates such as temperature gradients, experimental treatment variables, or random effects that account for grouping in experimental units. Default 'brms' functions make it easy to perform model checking, model comparison and hypothesis testing. Potential statistical issues with data from feeding trials, such as overdispersion, can be resolved by effortlessly switching between likelihood functions. This package, together with its tutorials, should provide students and researchers with a comprehensive and integrated statistical framework for easily testing their hypotheses on trophic interactions. References: Rosenbaum and Rall (2018) <doi:10.1111/2041-210X.13039>; Rosenbaum et al. (2024) <doi:10.1111/2041-210X.14372>.

Authors:Benjamin Rosenbaum [aut, cre]

BayesFR_1.0.1.tar.gz
BayesFR_1.0.1.zip(r-4.7)BayesFR_1.0.1.zip(r-4.6)BayesFR_1.0.1.zip(r-4.5)
BayesFR_1.0.1.tgz(r-4.6-any)BayesFR_1.0.1.tgz(r-4.5-any)
BayesFR_1.0.1.tar.gz(r-4.7-any)BayesFR_1.0.1.tar.gz(r-4.6-any)
BayesFR_1.0.1.tgz(r-4.6-emscripten)
manual.pdf |manual.html
DESCRIPTION
card.svg |card.png
BayesFR/json (API)

# Install 'BayesFR' in R:
install.packages('BayesFR', repos = c('https://benjamin-rosenbaum.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/benjamin-rosenbaum/bayesfr/issues

Datasets:

On CRAN:

Conda:

4.90 score 1 stars 3 scripts 20 exports 75 dependencies

Last updated from:7de6b4d047. Checks:9 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-x86_64OK231
source / vignettesOK255
linux-release-x86_64OK199
macos-release-arm64OK145
macos-oldrel-arm64OK213
windows-develOK144
windows-releaseOK129
windows-oldrelOK137
wasm-releaseOK194

Exports:convert_2sp_to_longMS_Type2H_dyn_codeMS_Type3H_dyn_codeMS_TypeY_dyn_codeMS_TypeZ_dyn_codeType1_dyn_codeType1_fix_codeType2BD_dyn_codeType2CM_dyn_codeType2H_dyn_codeType2H_fix_codeType2HV_dyn_codeType3GenH_dyn_codeType3GenH_fix_codeType3GenH_mort_dyn_codeType3H_dyn_codeType3H_fix_codeTypeGenBD_dyn_codeTypeGenCM_dyn_codeTypeGenHV_dyn_code

Dependencies:abindbackportsbayesplotBHbridgesamplingbrmsBrobdingnagcallrcheckmateclicodacodetoolscpp11descdigestdistributionaldplyrfarverfuturefuture.applygenericsggplot2ggridgesglobalsgluegridExtragtableinlineisobandlabelinglatticelifecyclelistenvloomagrittrMatrixmatrixStatsmgcvmvtnormnleqslvnlmenumDerivotelparallellypillarpkgbuildpkgconfigplyrposteriorprocessxpspurrrQuickJSRR6RColorBrewerRcppRcppEigenRcppParallelreshape2rlangrstanrstantoolsS7scalesStanHeadersstringistringrtensorAtibbletidyrtidyselectutf8vctrsviridisLitewithr

Getting started with BayesFR

Rendered frombayesfr-intro.Rmdusingknitr::rmarkdownon Jun 24 2026.

Last update: 2026-06-17
Started: 2026-06-15

Readme and manuals

Help Manual

Help pageTopics
Convert 2-prey data to long formatconvert_2sp_to_long
Example dataset for prey mortalitydf_Archer_et_al_2019_JAE
Example dataset for multi-species FR with 2 preydf_Colton_1987_1_ECOLOGY
Example dataset for categorical predictorsdf_Cuthbert_et_al_2020_ECOL_EVOL
Example dataset for continuous predictorsdf_Davidson_et_al_2021_FUN_ECOL
Feeding experiments without prey replacementdf_Hossie_and_Murray_2010_OECOLOGIA
Feeding experiments with prey replacementdf_Michalko_and_Pekar_2017_AM_NAT
Example dataset for testing predator interference modelsdf_Papanikolaou_et_al_2021_ECOL_EVOL
Example dataset for random effects (predator individual)df_Schroeder_et_al_2016_OEC
Example dataset for testing type 2 vs. type 3df_Sentis_et_al_2017_GLOBAL_CHANGE_BIOLOGY
Type 2 multi-species FR without replacementMS_Type2H_dyn_code
Type 3 multi-species FR without replacementMS_Type3H_dyn_code
Yodzis FR without replacementMS_TypeY_dyn_code
Generalized switching FR without replacementMS_TypeZ_dyn_code
Type 1 FR with prey depletionType1_dyn_code
Type 1 FR with prey replacementType1_fix_code
Functional response models with predator interferenceType2BD_dyn_code
Functional response models with predator interferenceType2CM_dyn_code
Type 2 FR (Holling) with prey depletionType2H_dyn_code
Type 2 FR (Holling) with prey replacementType2H_fix_code
Functional response models with predator interferenceType2HV_dyn_code
Generalized type 3 FR (Holling) with prey depletionType3GenH_dyn_code
Generalized type 3 FR (Holling) with prey replacementType3GenH_fix_code
Functional response models with prey mortalityType3GenH_mort_dyn_code
Type 3 FR (Holling) with prey depletionType3H_dyn_code
Type 3 FR (Holling) with prey replacementType3H_fix_code
Functional response models with predator interferenceTypeGenBD_dyn_code
Functional response models with predator interferenceTypeGenCM_dyn_code
Functional response models with predator interferenceTypeGenHV_dyn_code