Extracts posterior predicted values from a list of class bayesnecfit or bayesmanecfit model fits and compares these via bootstrap re sampling.

compare_estimates(
  x,
  comparison = "n(s)ec",
  ecx_val = 10,
  type = "absolute",
  hormesis_def = "control",
  sig_val = 0.01,
  resolution = 100,
  x_range = NA
)

Arguments

x

A named list of objects of class bayesnecfit or bayesmanecfit returned by bnec.

comparison

The posterior predictions to compare, takes values of "nec", "n(s)ec", "nsec", "ecx" or "fitted".

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, taking values of "relative", "absolute" (the default) or "direct". See Details.

hormesis_def

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

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 ECx – large values will make the ECx estimate more precise.

x_range

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

Value

A named list containing bootstrapped differences in posterior predictions of the bayesnecfit or bayesmanecfit model fits contained in x. See Details.

See also

Examples

if (FALSE) { # \dontrun{
library(bayesnec)
data(manec_example)
nec4param <- pull_out(manec_example, model = "nec4param")
ecx4param <- pull_out(manec_example, model = "ecx4param")
compare_estimates(list("nec" = ecx4param, "ecx" = nec4param), ecx_val = 50,
comparison="ecx")
} # }