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.
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 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.
Further examples are given in help pages to the datasets
antifoul
, IM1xIPC81
and
IM1xVibrio
.
# NOT RUN {
data(antifoul)
r <- drcfit(antifoul, showED50 = TRUE, EDx = c(5, 10, 20))
format(r, digits = 2)
# }
Run the code above in your browser using DataLab