[R] Estimating LC50 from a Weibull distribution

Christian Ritz ritz at life.ku.dk
Sun Mar 22 12:56:29 CET 2009


Hi Greg,

you can use the extension package 'drc' from CRAN:


conc <- c(10.3, 10.8, 11.6, 13.2, 15.8, 20.1) # Exposure concentrations
orign <- c(76, 79, 77, 76, 78, 77) # Original number of subjects

ndead <- c(16, 22, 40, 69, 78, 77) # Number dead after 96 h
d <- data.frame(conc=conc, orign=orign, ndead=ndead)

## Loading 'drc'
library(drc)

## Fitting model assuming 100% mortality for high concentrations
## and 0% for concentration 0
d.m1<-drm(ndead/orign~conc, weight=orign, data=d, fct=W1.2(), type="binomial")
plot(d.m1)

## Fitting model where mortality at conc=0 is estimated
## (ad hoc adjustments should be avoided)
d.m2<-update(d.m1, fct=W1.3u())
plot(d.m2, add=TRUE, type="none", lty=2)

## Calculating LC50
ED(d.m2, 50)


Note that you don't really have time-to-event data as you only have observations
reflecting the effect of exposure at one particular time point (96h). Time-to-event data
occur if exposure is monitored repeatedly over time, in several intervals or at several
time points, e.g. at 24h, 48h, and 96h, possibly subject to censoring. Therefore the above
analysis is based on binomial distributions that are often appropriate for quantal data.

Note also, that in ecotoxicology "Weibull model" may refer to one several related models
depending on which guidelines, papers, or software you refer to.


Christian




More information about the R-help mailing list