ED estimates effective concentration or doses for one or more specified absolute or relative response levels.

# S3 method for drc
ED(object, respLev, interval = c("none", "delta", "fls", "tfls", "inv"),
  clevel = NULL, level = ifelse(!(interval == "none"), 0.95, NULL),
  reference = c("control", "upper"), type = c("relative", "absolute"), lref, uref,
  bound = TRUE, od = FALSE, vcov. = vcov, display = TRUE, pool = TRUE, logBase = NULL,
  multcomp = FALSE, intType = "confidence", ...)

Arguments

object

an object of class 'drc'.

respLev

a numeric vector containing the response levels.

interval

character string specifying the type of confidence intervals to be supplied. The default is "none". See Details below for more explanation.

clevel

character string specifying the curve id in case on estimates for a specific curve or compound is requested. By default estimates are shown for all curves.

level

numeric. The level for the confidence intervals. The default is 0.95.

reference

character string. Is the upper limit or the control level the reference?

type

character string. Whether the specified response levels are absolute or relative (default).

lref

numeric value specifying the lower limit to serve as reference.

uref

numeric value specifying the upper limit to serve as reference (e.g., 100%).

bound

logical. If TRUE only ED values between 0 and 100% are allowed. FALSE is useful for hormesis models.

od

logical. If TRUE adjustment for over-dispersion is used.

vcov.

function providing the variance-covariance matrix. vcov is the default, but sandwich is also an option (for obtaining robust standard errors).

display

logical. If TRUE results are displayed. Otherwise they are not (useful in simulations).

pool

logical. If TRUE curves are pooled. Otherwise they are not. This argument only works for models with independently fitted curves as specified in drm.

logBase

numeric. The base of the logarithm in case logarithm transformed dose values are used.

multcomp

logical to switch on output for use with the package multcomp (which needs to be activated first). Default is FALSE (corresponding to the original output).

intType

string specifying the type of interval to use with the predict method in case the type of confidence interval chosen with the argument "type" is "inverse regression."

...

see the details section below.

Details

There are several options for calculating confidence intervals through the argument interval. The option "delta" results in asymptotical Wald-type confidence intervals (using the delta method and the normal or t-distribution depending on the type of response). The option "fls" produces (possibly skewed) confidence intervals through back-transformation from the logarithm scale (only meaningful in case the parameter in the model is log(ED50) as for the llogistic2) models. The option "tfls" is for transforming back and forth from log scale (experimental). The option "inv" results in confidence intervals obtained through inverse regression.

For hormesis models (braincousens and cedergreen), the additional arguments lower and upper may be supplied. These arguments specify the lower and upper limits of the bisection method used to find the ED values. The lower and upper limits need to be smaller/larger than the EDx level to be calculated. The default limits are 0.001 and 1000 for braincousens and 0.0001 and 10000 for cedergreen and ucedergreen, but this may need to be modified (for cedergreen the upper limit may need to be increased and for ucedergreen the lower limit may need to be increased). Note that the lower limit should not be set to 0 (use instead something like 1e-3, 1e-6, ...).

Value

An invisible matrix containing the shown matrix with two or more columns, containing the estimates and the corresponding estimated standard errors and possibly lower and upper confidence limits. Or, alternatively, a list with elements that may be plugged directly into parm in the package multcomp (in case the argument multcomp is TRUE).

See also

backfit, isobole, and maED use ED for specific calculations involving estimated ED values.

The related function EDcomp may be used for estimating differences and ratios of ED values, whereas compParm may be used to compare other model parameters.

Examples

## Fitting 4-parameter log-logistic model ryegrass.m1 <- drm(ryegrass, fct = LL.4()) ## Calculating EC/ED values ED(ryegrass.m1, c(10, 50, 90))
#> #> Estimated effective doses #> #> Estimate Std. Error #> e:1:10 1.46371 0.18677 #> e:1:50 3.05795 0.18573 #> e:1:90 6.38864 0.84510
## first column: the estimates of ED10, ED50 and ED90 ## second column: the corresponding estimated standard errors ### How to use the argument 'ci' ## Also displaying 95% confidence intervals ED(ryegrass.m1, c(10, 50, 90), interval = "delta")
#> #> Estimated effective doses #> #> Estimate Std. Error Lower Upper #> e:1:10 1.46371 0.18677 1.07411 1.85330 #> e:1:50 3.05795 0.18573 2.67053 3.44538 #> e:1:90 6.38864 0.84510 4.62580 8.15148
## Comparing delta method and back-transformed ## confidence intervals for ED values ## Fitting 4-parameter log-logistic ## in different parameterisation (using LL2.4) ryegrass.m2 <- drm(ryegrass, fct = LL2.4()) ED(ryegrass.m1, c(10, 50, 90), interval = "fls")
#> #> Estimated effective doses #> #> Estimate Lower Upper #> e:1:10 4.3219 2.9274 6.3809 #> e:1:50 21.2840 14.4476 31.3553 #> e:1:90 595.0468 102.0842 3468.5164
ED(ryegrass.m2, c(10, 50, 90), interval = "delta")
#> #> Estimated effective doses #> #> Estimate Std. Error Lower Upper #> e:1:10 0.380975 0.127602 0.114802 0.647147 #> e:1:50 1.117746 0.060737 0.991051 1.244442 #> e:1:90 1.854518 0.132282 1.578584 2.130453
### How to use the argument 'bound' ## Fitting the Brain-Cousens model lettuce.m1 <- drm(weight ~ conc, data = lettuce, fct = BC.4()) ### Calculating ED[-10] # This does not work #ED(lettuce.m1, -10) ## Now it does work ED(lettuce.m1, -10, bound = FALSE) # works
#> #> Estimated effective doses #> #> Estimate Std. Error #> e:1:-10 1.8646 1.0163
ED(lettuce.m1, -20, bound = FALSE) # works
#> #> Estimated effective doses #> #> Estimate Std. Error #> e:1:-20 0.96333 1.23014
## The following does not work for another reason: ED[-30] does not exist #ED(lettuce.m1, -30, bound = FALSE)