bmdbounds | R Documentation |
Uses maximum likelihood method to tune the upper and lower bounds on the BMD (BMDU, BMDL)
bmdbounds(
fit_method,
bmr,
pars,
conc,
resp,
onesidedp = 0.05,
bmd = NULL,
which.bound = "lower",
poly2.biphasic = TRUE,
x_v
)
fit_method |
Fit method: "exp2", "exp3", "exp4", "exp5", "hill", "gnls", "poly1", "poly2", or "pow". |
bmr |
Benchmark response. |
pars |
Named vector of model parameters: a,b,tp,ga,p,la,q,er output by httrfit, and in that order. |
conc |
Vector of concentrations (NOT in log units). |
resp |
Vector of responses corresponding to given concentrations. |
onesidedp |
The one-sided p-value. Default of .05 corresponds to 5 percentile BMDL, 95 percentile BMDU, and 90 percent CI. |
bmd |
Can optionally input the bmd when already known to avoid unnecessary calculation. |
which.bound |
Returns BMDU if which.bound = "upper"; returns BMDL if which.bound = "lower". |
poly2.biphasic |
If poly2.biphasic = TRUE, constraints are set to allow for the polynomial 2 model fit to be bi-phasic (i.e. non-monotonic). |
x_v |
The vertex of the quadratic/parabolic fit. Only in use when estimating the BMDL and BMDU values for the "poly2" model when poly2.biphasic = TRUE. No default is set. |
Takes in concentration response fit details and outputs a bmdu or bmdl, as desired. If bmd is not finite, returns NA. If the objective function doesn't change sign or the root finding otherwise fails, it returns NA. These failures are not uncommon since some curves just don't reach the desired confidence level.
Returns either the BMDU or BMDL.
conc = c(.03, .1, .3, 1, 3, 10, 30, 100)
resp = c(.1,-.1,0,1.1,1.9,2,2.1,1.9)
pars = c(tp = 1.973356, ga = 0.9401224, p = 3.589397, er = -2.698579)
bmdbounds(fit_method = "hill", bmr = .5, pars, conc, resp)
bmdbounds(fit_method = "hill", bmr = .5, pars, conc, resp, which.bound = "upper")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.