compare_endpoints {bayesnec} | R Documentation |
Extracts posterior predicted values from a list of class
bayesnecfit
or bayesmanecfit
model fits and
compares these via bootstrap re sampling.
compare_endpoints(
x,
comparison = "nec",
ecx_val = 10,
type = "absolute",
hormesis_def = "control",
sig_val = 0.01,
precision,
x_range = NA
)
x |
A named |
comparison |
The posterior predictions to compare, takes values of "nec", "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 |
hormesis_def |
A |
sig_val |
Probability value to use as the lower quantile to test significance of the predicted posterior values. against the lowest observed concentration (assumed to be the control), to estimate NEC as an interpolated NOEC value from smooth ECx curves. |
precision |
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. |
A named list
containing bootstrapped differences
in posterior predictions of the bayesnecfit
or
bayesmanecfit
model fits contained in x
. See Details.
## Not run:
library(bayesnec)
data(manec_example)
nec4param <- pull_out(manec_example, model = "nec4param")
ecx4param <- pull_out(manec_example, model = "ecx4param")
compare_endpoints(list("nec" = ecx4param, "ecx" = nec4param), ecx_val = 50)
## End(Not run)