Learn R Programming

bayesnec

Overview

bayesnec is a toxicity estimate and No-Effect-Concentration estimation package that uses brms to fit concentration(dose)-response data using Bayesian methods for the purpose of estimating both ECX values, but more particularly NEC. Please see ?bnec for a more detailed help file.

Installation

To install the latest release version from CRAN use

install.packages("bayesnec")

The current development version can be downloaded from GitHub via

if (!requireNamespace("remotes")) {
  install.packages("remotes")
}
remotes::install_github("open-aims/bayesnec", ref = "dev")

Because bayesnec is based on brms and Stan, a C++ compiler is required. The program Rtools comes with a C++ compiler for Windows. On Mac, you should install Xcode. See the prerequisites section on this link for further instructions on how to get the compilers running.

Usage

Usage and further information about bayesnec can be seen on the project page and the vignettes. Help files for the individual functions can be found on the reference page.

Further Information

bayesnec is provided by the Australian Institute of Marine Science under the GPL-2 License (GPL-2).

Copy Link

Version

Install

install.packages('bayesnec')

Monthly Downloads

439

Version

2.1.3.1

License

GPL-2

Maintainer

Rebecca Fisher

Last Published

August 19th, 2025

Functions in bayesnec (2.1.3.1)

c.bnecfit

Concatenate multiple bnecfit objects into one single bayesmanecfit object containing Bayesian model averaging statistics.
compare_posterior

compare_posterior
compare_fitted

compare_fitted
check_formula

Check if input model formula is appropriate to use with bayesnec
check_chains

Checking chain convergence
expand_manec

Extracts a range of statistics from a list of prebayesnecfit objects.
check_priors

Plots the prior and posterior parameter probability densities from an object of class bayesnecfit or bayesmanecfit.
dispersion

Posterior dispersion
ecx

Extracts the predicted ECx value
compare_estimates

compare_estimates
is_necsummary

Checks if argument is a necsummary object
make_brmsformula

Expose the final brmsformula
manec_example

Example bayesmanecfit object
manecsummary-class

Class manecsummary of models fitted with the brms package
expand_nec

Extracts a range of statistics from a prebayesnecfit object.
ggbnec_data

Creates the data.frame for plotting with autoplot.
formula

Retrieve formulas from models fitted by bnec
herbicide

Herbicide phytotoxicity data
fitted

Generates mean posterior linear predictions for objects fitted by bnec
is_manecsummary

Checks if argument is a manecsummary object
models

models
nec

Extracts the predicted NEC value as desired from an object of class bayesnecfit or bayesmanecfit.
posterior_predict

Generates posterior predictions for objects fitted by bnec
nsec

Extracts the predicted NSEC value as desired from an object of class bayesnecfit or bayesmanecfit.
model.frame

Model.frame methods in bayesnec.
+.bnecfit

"Add" multiple bnecfit objects into one single bayesmanecfit object containing Bayesian model averaging statistics.
necsummary-class

Class necsummary of models fitted with the brms package
posterior_epred

Generates posterior linear predictions for objects fitted by bnec
plot

Generates a plot for objects fitted by bnec
nec_data

Example data of non-linear decay
sample_priors

sample_priors
prebayesnecfit-class

Class prebayesnecfit of models fitted with the brms package
print

Prints a summary for objects fitted by bnec
pull_brmsfit.bayesnecfit

Extract and object of class brmsfit from bayesnecfit or bayesmanecfit.
show_params

show_params
predict

Generates mean posterior predictions for objects fitted by bnec
"beta_binomial"

Custom beta-binomial family
pull_prior

pull_prior
rhat

Extract Diagnostic Quantities of 'brms' Models
pull_out

pull_out
summary

Generates a summary for objects fitted by bnec
update.bnecfit

Update an object of class bnecfit as fitted by function bnec.
step

step
bnecfit-class

Class bnecfit of models fitted with function bnec
autoplot

bayesnec standard ggplot2 plotting method
bayesnec-package

The 'bayesnec' package.
bnec_newdata

bnec_newdata
bnec

bnec
amend

Amends an existing bayesmanecfit object
average_estimates

average_estimates
bayesnecformula

Set up a model formula for use in bayesnec
bayesnecfit-class

Class bayesnecfit of models fitted with the brms package
bayesmanecfit-class

Class bayesmanecfit of models fitted with the brms package