Learn R Programming

drc (version 0.8-2)

logit: The logit function

Description

'logit' provides a very general way of specifying logit dose-response functions for binomial data.

Usage

logit(lowerc = c(-Inf, -Inf, -Inf, -Inf), upperc = c(Inf, Inf, Inf, Inf), 
fixed = c(NA, NA, 0, 1), names = c("a", "b", "c", "d"), 
useDer = FALSE, logTrans = TRUE)

Arguments

lowerc
numeric vector. The lower bound on parameters. Default is minus infinity.
upperc
numeric vector. The upper bound on parameters. Default is plus infinity.
fixed
numeric vector. Specifies which parameters are fixed and at what value they are fixed. NAs for parameter that are not fixed.
names
a vector of character strings giving the names of the parameters (should not contain ":"). The default is reasonable (see under 'Usage'). The order of the parameters is: b, c, d, e, f (see under 'Details').
useDer
logical. If TRUE derivatives are supplied, otherwise they are not supplied. Not yet implemented!
logTrans
logical. If TRUE (default) the logarithm of the dose is used in the linear predictor.

Value

  • The value returned by the 'logistic' is a list with the following components
  • fctThe dose response function.
  • ssfctThe self starter function.
  • deriv1The first derivative.
  • deriv2The second derivative.
  • lowercThe lower bounds on the parameters.
  • uppercThe upper bounds on the parameters.
  • edfctThe ED function.
  • sifctThe SI function (not yet available).

Details

The default arguments yields the five-parameter logistic function given by the expression $$f(x) = c + (d - c) inverse logit (a + b \log(x))$$

References

Finney, D. J. (1971) Probit Analysis, Cambridge: Cambridge University Press.

See Also

Special cases of the function 'logistic' are l3, l4 and l5.

Examples

Run this code
## Example dataset from Finney (1971) - example 19
logdose <- c(2.17, 2,1.68,1.08,-Inf,1.79,1.66,1.49,1.17,0.57)
n <- c(142,127,128,126,129,125,117,127,51,132)
r <- c(142,126,115,58,21,125,115,114,40,37)
treatment <- factor(c("w213","w213","w213","w213","control","w214","w214","w214","w214","w214"))
finney_ex19 <-data.frame(logdose, n, r, treatment)

## Fitting logistic regression model
model1 <- multdrc(r/n~logdose, treatment, logDose=10, weights=n, fct=logit(), data=finney_ex19[-5,])
anova(model1)
summary(model1)

## Fitting extended logistic regression model (lower limit above 0 is estimated)
model2 <- multdrc(r/n~logdose, treatment, logDose=10, weights=n, 
fct=logit(fixed=c(NA,NA,NA,1)), cm="control", 
collapse=data.frame(treatment,treatment,1), data=finney_ex19)
anova(model2)
summary(model2)

rm(logdose, n, r, treatment, finney_ex19, model1, model2)

Run the code above in your browser using DataLab