drcfit.Rd
Fit dose-response relationships to dose-response data and calculate biometric results for (eco)toxicity evaluation using the drc package
drcfit(data, chooseone = TRUE, probit = TRUE, logit = FALSE,
weibull = FALSE, linlogit = FALSE, level = 0.95,
showED50 = FALSE, EDx = NULL)
A data frame containing dose-response data. The data frame has to contain
at least a factor called “substance”, a numeric vector “dose”
with the dose values, a vector called “unit” containing the unit
used for the dose and a numeric vector “response” with the response
values of the test system normalized between 0 and 1. Such a data frame can
be easily obtained if a compliant RODBC data source is available for use in
conjunction with the function drdata
.
If there is a column called “ok” and it is set to “no fit” in a specific line, then the corresponding data point will be excluded from the fitting procedure, although it will be plotted.
A boolean defining if cumulative density curves of normal distributions
are fitted against the decadic logarithm of the dose. Default ist TRUE.
Note that the parameter definitions used in the model are different to the
ones used in drfit
. Parameter e from LN.2
is listed
as a here, and parameter b from there is listed as b.
A boolean defining if cumulative density curves of logistic distributions
plogis
are fitted to the decadic logarithm of the dose.
Default is FALSE.
Again the parameter definitions used in the model are different to the
ones used in drfit
. Parameter e from LL.2
is listed
as a here, and parameter b from LL.2 is listed as b.
A boolean defining if Weibull dose-response models
(W1.2
are fitted to the untransformed dose. Default is FALSE.
Note that the results differ from the ones obtained with
drfit
, due to a different model specification.
A boolean defining if the linear-logistic function
linlogitf
as defined by van Ewijk and Hoekstra 1993 is
fitted to the data. Default is FALSE. Obtaining the ED50 (and EDx values
in general) uses ED
internally and does not always give a
result.
The level for the confidence interval listed for the log ED50.
If TRUE (default), the models are tried in the order linlogit, probit, logit, weibull, and the first model that produces a valid fit is used. If FALSE, all models that are set to TRUE and that can be fitted will be reported.
A vector of inhibition values x in percent for which the corresponding doses EDx should be reported.
If set to TRUE, the ED50 and its confidence interval on the original dose scale (not log scale) is included in the output.
A dataframe with the attribute models
holding a list of the fitted
dose-response models of class nls
. The dataframe has at least
one line for each substance.
The following variables are in the dataframe:
The name of the substance
The number of dose levels in the raw data
The total number of data points in the raw data used for the fit
The decadic logarithm of the lowest dose
The total number of data points in the raw data used for the fit
If the data did not show a mean response < 0.5 at the highest dose level, the modeltype is set to “inactive”. If the mean response at the lowest dose is smaller than 0.5, the modeltype is set to “active”. In both cases, no fitting procedure is carried out. If the fitted ED50 is higher than the highest dose, “no fit” is given here.
The decadic logarithm of the ED50
The lower bound of the confidence interval of log ED50.
The name of the column depends on the requested confidence level
.
The higher bound of the confidence interval of log ED50.
The name of the column depends on the requested confidence level
.
The unit used for the dose levels in the dose-response data
The square root of the estimated variance of the random error as returned
by summary.drc
.
For the linlogit model, this is the parameter e from BC.4
.
For the probit and the logit model, this is the ED50. For the weibull
model, this is parameter e from W1.2
. Note that the Weibull
model is fitted to the untransformed data.
For the linlogit, probit, logit and weibull models, these are the
parameters b from BC.4
, LN.2
,
LL.2
and W1.2
, respectively.
Note that the parameter definitions (and in the case of Weibull, the model
used) are different to the ones used in drfit
.
Only the “linlogit” fit produces a third parameter c
, which is
the parameter f from the BC.4
function.
If the parameter showED50
was set to TRUE, the ED50 values and their
confidence intervals are also included on the original dose scale.
If one or more response leves were specified in the argument EDx
,
the corresponding dose levels are given in addition, together with their
confidence intervals as calculated by ED
from the drc package.
There is a demo for each dataset that can be accessed by
demo(dataset)
Further examples are given in help pages to the datasets
antifoul
, IM1xIPC81
and
IM1xVibrio
.
data(antifoul)
r <- drcfit(antifoul, showED50 = TRUE, EDx = c(5, 10, 20))
#>
#> TBT: Fitting data...
#>
#> Zn Pyrithion: Fitting data...
format(r, digits = 2)
#> Substance ndl n lld lhd mtype logED50 2.5% 97.5% unit sigma a
#> 1 TBT 38 135 -2.7 2.4 probit -0.16 -0.28 -0.072 microM 0.19 0.68
#> 2 Zn Pyrithion 27 81 -2.1 2.0 probit -0.40 -0.52 -0.303 microM 0.23 0.40
#> b ED50 ED50 2.5% ED50 97.5% EDx5 EDx5 2.5% EDx5 97.5% EDx10 EDx10 2.5%
#> 1 -0.64 0.68 0.52 0.85 0.053 0.015 0.091 0.093 0.040
#> 2 -1.04 0.40 0.30 0.50 0.082 0.023 0.142 0.117 0.048
#> EDx10 97.5% EDx20 EDx20 2.5% EDx20 97.5%
#> 1 0.15 0.18 0.11 0.26
#> 2 0.19 0.18 0.10 0.26