drfit {drfit}R Documentation

Fit dose-response models

Description

Fit dose-response relationships to dose-response data and calculate biometric results for (eco)toxicity evaluation

Usage

  drfit(data, startlogED50 = NA, chooseone = TRUE, probit = TRUE, logit = FALSE,
  weibull = FALSE, linlogit = FALSE, level = 0.95, linlogitWrong = NA,
  allWrong = NA, ps0 = 1, ls0 = 0.5, ws0 = 0.5, b0 = 2, f0 = 0)

Arguments

data 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.
startlogED50 Especially for the linlogit model, a suitable log10 of the ED50 has to be given by the user, since it is not correctly estimated for data showing hormesis with the default estimation method.
probit A boolean defining if cumulative density curves of normal distributions pnorm are fitted against the decadic logarithm of the dose. Default ist TRUE.
logit A boolean defining if cumulative density curves of logistic distributions plogis are fitted to the decadic logarithm of the dose. Default is FALSE.
weibull A boolean defining if the cumulative density curves of weibull distributions (pweibull with additionall location parameter and scale=1) are fitted to the decadic logarithm of the dose. Default is FALSE.
linlogit 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.
level The level for the confidence interval listed for the log ED50.
linlogitWrong An optional vector containing the names of the substances for which the linlogit function produces a wrong fit.
allWrong An optional vector containing the names of the substances for which all functions produce a wrong fit.
chooseone 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.
ps0 If the probit model is fitted, ps0 gives the possibility to adjust the starting value for the scale parameter of pnorm.
ls0 If the logit model is fitted, ls0 gives the possibility to adjust the starting value for the scale parameter of plogis.
ws0 If the weibull model is fitted, ws0 gives the possibility to adjust the starting value for the shape parameter of pweibull.
b0,f0 If the linearlogistic model is fitted, b0 and f0 give the possibility to adjust the starting values for the parameters b and f.

Value

results A data frame containing at least one line for each substance. 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. Every successful fit is reported in one line. Parameters of the fitted curves are only reported if the fitted ED50 is not higher than the highest dose.
ndl is the number of dose levels in the raw data, n is the total number of data points in the raw data used for the fit lld is the decadic logarithm of the lowest dose and lhd is the decadic logarithm of the highest dose. For the “linlogit”, “logit” and “probit” models, the parameter a that is reported coincides with the logED50, i.e the logED50 is one of the model parameters that is being fitted. Therefore, a confidence interval for the confidence level level is calculated using the confint.nls function and listed. In the case of the “weibull” model, a is a location parameter. Parameter b in the case of the “linlogit” fit is the variable b from the linlogitf function. In the case of “probit” fit it is the standard deviation of the fitted normal distribution, in the case of the “logit” fit it is the scale parameter in the plogis function, and in the “weibull” fit it is the shape parameter of the fitted pweibull function. Only the “linlogit” fit produces a third parameter c which is the variable f from the linlogitf function.

Note

There is a demo for each dataset that can be accessed by demo(dataset)

Author(s)

Johannes Ranke jranke@uni-bremen.de http://www.uft.uni-bremen.de/chemie/ranke

Examples

data(antifoul)
r <- drfit(antifoul)
format(r,digits=2)

[Package drfit version 0.05-92 Index]