bmdbounds {tcplfit2}R Documentation

BMD Bounds

Description

Uses maximum likelihood method to tune the upper and lower bounds on the BMD (BMDU, BMDL)

Usage

bmdbounds(
  fit_method,
  bmr,
  pars,
  conc,
  resp,
  onesidedp = 0.05,
  bmd = NULL,
  which.bound = "lower"
)

Arguments

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".

Details

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.

Value

Returns either the BMDU or BMDL.

Examples

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")

[Package tcplfit2 version 0.1.6 Index]