aboutsummaryrefslogtreecommitdiff
path: root/man/drcfit.Rd
blob: 2da0418459c242fbcd872960e5aaf271de6931b2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
\name{drcfit}
\alias{drcfit}
\title{Fit dose-response models using the drc package}
\description{
  Fit dose-response relationships to dose-response data and calculate
  biometric results for (eco)toxicity evaluation using the drc package
}
\usage{
  drcfit(data, chooseone = TRUE, probit = TRUE, logit = FALSE,
  weibull = FALSE, linlogit = FALSE, level = 0.95, 
  showED50 = FALSE, EDx = NULL)
}
\arguments{
  \item{data}{
    A data frame containing dose-response data. The data frame has to contain
    at least a factor called \dQuote{substance}, a numeric vector \dQuote{dose}
    with the dose values, a vector called \dQuote{unit} containing the unit
    used for the dose and a numeric vector \dQuote{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 \code{\link{drdata}}.

    If there is a column called \dQuote{ok} and it is set to \dQuote{no fit} in
    a specific line, then the corresponding data point will be excluded from
    the fitting procedure, although it will be plotted.}
  \item{probit}{
    A boolean defining if cumulative density curves of normal distributions
    \code{\link{pnorm}} 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 \code{\link{drfit}}. Parameter e from \code{\link{LN.2}} is listed
    as a here, and parameter b from LN.2 is listed as b.}
  \item{logit}{
    A boolean defining if cumulative density curves of logistic distributions
    \code{\link{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 \code{\link{drfit}}. Parameter e from \code{\link{LL.2}} is listed
    as a here, and parameter b from LL.2 is listed as b.}
  \item{weibull}{
    A boolean defining if Weibull dose-response models
    (\code{\link{W1.2}} are fitted to the untransformed dose. Default is FALSE.
    Note that the results differ from the ones obtained with
    \code{\link{drfit}}, due to a different model specification.}
  \item{linlogit}{
    A boolean defining if the linear-logistic function
    \code{\link{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 \code{\link{ED}} internally and does not always give a
    result.
  }
  \item{level}{
    The level for the confidence interval listed for the log ED50.}
  \item{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.}
  \item{EDx}{
    A vector of inhibition values x in percent for which the corresponding doses
    EDx should be reported.
  }
  \item{showED50}{
    If set to TRUE, the ED50 and its confidence interval on the original dose
    scale (not log scale) is included in the output.
  }
}
\value{
  \item{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 \dQuote{inactive}. If the mean response at the lowest
    dose is smaller than 0.5, the modeltype is set to \dQuote{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. 

    \code{ndl} is the number of dose levels in the raw data, \code{n} is the
    total number of data points in the raw data used for the fit
    \code{lld} is the decadic logarithm of the lowest dose and
    \code{lhd} is the decadic logarithm of the highest dose.
 
    If the parameter \code{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 \code{EDx},
    the corresponding dose levels are given, together with their confidence
    intervals.
  }
}
\examples{
data(antifoul)
r <- drcfit(antifoul, showED50 = TRUE, EDx = c(5, 10, 20))
format(r, digits = 2)
}
\note{There is a demo for each dataset that can be accessed by
  \code{demo(dataset)}} 
\seealso{
  Further examples are given in help pages to the datasets
  \code{\link{antifoul}}, \code{\link{IM1xIPC81}} and
  \code{\link{IM1xVibrio}}.
}
\author{
  Johannes Ranke 
  \email{jranke@uni-bremen.de} 
  \url{http://www.uft.uni-bremen.de/chemie/ranke}
}
\keyword{models}
\keyword{regression}
\keyword{nonlinear}

Contact - Imprint