Models fitted with the bayesnec package are represented as a bayesnecfit object, which contain the original brmsfit fitted object, list of initialisation values used, the validated bayesnecformula, name of non-linear model that was fitted, posterior predictions, posterior parameter estimates and a series of other statistics.

Details

See methods(class = "bayesnecfit") for an overview of available methods.

Slots

fit

The fitted Bayesian model of class brmsfit.

model

A character string indicating the name of the fitted model.

init

A list containing the initialisation values to fit the model.

bayesnecformula

An object of class bayesnecformula and formula.

retained_data

A data.frame containing columns of the data supplied to bnec that brm() omitted from its stored model frame. Rows are in fitted-data order. The element is absent when every supplied column was used by the fit.

pred_vals

A list with data, a data.frame of summary posterior predicted values over a grid set by resolution and x_range. Where a group term spans concentrations, the summaries describe the population curve, and the flags observed_levels and band = "population" record that the no-effect summaries read the observed levels and the band does not. It does not hold the matrix of draws those summaries came from, which is recomputed from fit where it is needed. To obtain it, use posterior_epred(x, newdata = bnec_newdata(x, resolution = 1000), re_formula = NA). A fit saved by an earlier version without both flags retains its earlier values and gives a warning when they are displayed.

top

The estimate for parameter "top" in the fitted model.

beta

The estimate for parameter "beta" in the fitted model.

ne

The no-effect estimate, a NEC for a monotone threshold equation and an NSEC for a smooth or hormesis threshold equation.

f

The estimate for parameter "f" in the fitted model, NA if absent for the fitted model type.

bot

The estimate for parameter "bot" in the fitted model, NA if absent for the fitted model type.

d

The estimate for parameter "d" in the fitted model, NA if absent for the fitted model type.

slope

The estimate for parameter "slope" in the fitted model, NA if absent for the fitted model type.

ec50

The estimate for parameter "ec50" in the fitted model, NA if absent for the fitted model type.

dispersion

An estimate of dispersion.

predicted_y

The predicted values for the observed data.

residuals

Residual values of the observed data from the fitted model.

ne_posterior

The posterior of that no-effect estimate, one value per draw. Attribute "censored" records the draws that lie beyond either end of the prediction range; a summary keeps their rank and gives them no value. A draw read off the curve there is stored as Inf above the range and -Inf below it, the form in which nec and nsec return a censored draw with posterior = TRUE.

ne_type

A character vector indicating the type of no-effect toxicity estimate. A monotone threshold equation contributes its sampled no-effect-concentration (NEC, see Fox 2010). A smooth or hormesis threshold equation contributes a curve-read no-significant-effect-concentration (NSEC, see Fisher and Fox 2023). A hormesis threshold equation still samples a nec parameter, the concentration at which its decline term starts; curve_params returns it.

References

Fisher R, Barneche DR, Ricardo GF, Fox, DR (2024) An R Package for Concentration-Response Modeling and Estimation of Toxicity Metrics doi:10.18637/jss.v110.i05.

Fisher R, Fox DR (2023). Introducing the no significant effect concentration (NSEC).Environmental Toxicology and Chemistry, 42(9), 2019–2028. doi: 10.1002/etc.5610.

Fisher R, Fox DR, Negri AP, van Dam J, Flores F, Koppel D (2023). Methods for estimating no-effect toxicity concentrations in ecotoxicology. Integrated Environmental Assessment and Management. doi:10.1002/ieam.4809.

Fox DR (2010). A Bayesian Approach for Determining the No Effect Concentration and Hazardous Concentration in Ecotoxicology. Ecotoxicology and Environmental Safety, 73(2), 123–131. doi: 10.1016/j.ecoenv.2009.09.012.