compare_posterior: compare_posterior

Description Usage Arguments Value

View source: R/compare_posterior.R

Description

Compares two posterior samples through differencing. Can be used to compare two NEC values from jagsNEC or jagsMANEC model fits, two ECx values from jagsNEC or jagsMANEC model fits, or simply any two posteriors passed as numeric vectors.

Usage

1
2
3
4
5
6
7
compare_posterior(
  x,
  y,
  comparison = "NEC",
  ECx.val = 10,
  ECx.type = "absolute"
)

Arguments

x

a jagsNEC or jagsMANEC model fit as returned by fit.jagsNEC or fit.jagsMANEC, or a numeric vector.

y

a jagsNEC or jagsMANEC model fit as returned by fit.jagsNEC or fit.jagsMANEC, or a numeric vector.

comparison

a character vector indicating the type of comparison to make. Takes values of NEC, ECx or custom.

ECx.val

the desired percentage effect value. This must be a value between 1 and 99 (for type = "relative" and "absolute"), defaults to 10.

type

a character vector indicating the type of ECx.val to calculate, taking values of "relative", "absolute" (the default) or "direct". Type "relative" is calculated as the percentage decrease from the maximum predicted value of the response (top) to the minimum predicted value of the response. Type "absolute" (the default) is calculated as the percentage decrease from the maximum value of the response (top) to 0 (or bot for a 4 parameter model fit when the y data are not bounded by zero). Type "direct" provides a direct estimate of the x value for a given y. Note that for the current version, ECx for an NECHormesis model is estimated at a percent decline from the control

Value

a list containing:

Probability (


AIMS/NEC-estimation documentation built on Dec. 7, 2020, 10:44 a.m.