nsec {bayesnec}R Documentation

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

Description

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

Usage

nsec(
  object,
  sig_val = 0.01,
  resolution = 1000,
  x_range = NA,
  hormesis_def = "control",
  xform = identity,
  prob_vals = c(0.5, 0.025, 0.975),
  ...
)

Arguments

object

An object of class bayesnecfit or bayesmanecfit returned by bnec.

sig_val

Probability value to use as the lower quantile to test significance of the predicted posterior values.

resolution

The number of unique x values over which to find NSEC - large values will make the NSEC estimate more precise.

x_range

A range of x values over which to consider extracting NSEC.

hormesis_def

A character vector, taking values of "max" or "control". See Details.

xform

A function to apply to the returned estimated concentration values.

prob_vals

A vector indicating the probability values over which to return the estimated NSEC value. Defaults to 0.5 (median) and 0.025 and 0.975 (95 percent credible intervals).

...

Further arguments to pass to class specific methods.

Details

NSEC is no-effect toxicity metric that estimates the concentration at which the modeled mean response is statistically indistinguishable from the mean control response. See the detailed derivation in Fisher and Fox (2023).

For hormesis_def, if "max", then NSEC values are calculated as a decline from the maximum estimates (i.e. the peak at NEC); if "control", then NSEC values are calculated relative to the control, which is assumed to be the lowest observed concentration.

Calls to functions ecx and nsec and compare_fitted do not require the same level of flexibility in the context of allowing argument newdata (from a posterior_predict perspective) to be supplied manually, as this is and should be handled within the function itself. The argument resolution controls how precisely the ecx or nsec value is estimated, with argument x_range allowing estimation beyond the existing range of the observed data (otherwise the default range) which can be useful in a small number of cases. There is also no reasonable case where estimating these from the raw data would be of value, because both functions would simply return one of the treatment concentrations, making NOEC a better metric in that case.

Value

A vector containing the estimated NSEC value, including upper and lower 95% credible interval bounds.

References

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.

See Also

bnec

Examples


library(bayesnec)

data(manec_example)
nsec(manec_example)



[Package bayesnec version 2.1.2.0 Index]