[R] drc results for binomial data
PatGauthier
pgauthi1 at lakeheadu.ca
Wed Sep 14 00:45:02 CEST 2011
I've been having trouble making sense of the drc results for my binomial
response toxicity data. Firstly, the standard errors are far too large for
how well the data fit the log-logistic model, particularly compared to other
methods of LC50 estimation (e.g. probit and trimmed spearman-karber).
Secondly, the LC50 estimates produced do not even fit with the DRC curve
(see example below). I've tried all sort of log-logistic functions with
varying fixed parameters (i.e. upper and lower limits for mortality data)
and still fail to produce reliable estimates. Furthermore, my data response
curves exhibit asymmetry so I feel the need to use the 5 parm function.
There seems to be some inconsistency here which is causing me a serious
headache.
#---------------data 1------------------#
n<-c(20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20)
x<-c(256,256,256,847,847,847,2208,2208,2208,3565,3565,3565,5756,5756,5756,7313,7313,7313,15000,15000,15000)
r<-c(0,0,0,0,2,0,1,3,4,7,6,9,17,13,18,18,17,20,20,20,20)
p<-r/n
d<-data.frame(x=x,n=n,r=r,p=p)
fct <- LL2.5(fixed = c(NA,0,1,NA,NA),names = c("Hillslope", "Lower Limit",
"Upper Limit", "LC50", "Asymmetry"))
drc <- drm(p~log(x), weight=n, data=d, fct=fct, type="binomial",
logDose=exp(1))
summary(drc)
plot(drc)
est1<-8.67
se1<-0.14
points(est1,0.5)
arrows(est1,0.5,est1-se1,angle=90,code=2,length=0.025)
arrows(est1,0.5,est1+se1,angle=90,code=2,length=0.025)
#---------------data 2------------------#
n<-c(20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20)
x<-c(798,798,798,6770,6770,6770,12130,12130,12130,21736,21736,21736,38948,38948,38948,69791,69791,69791)
r<-c(0,0,0,4,3,3,5,8,7,12,12,7,17,15,17,20,20,19)
p<-r/n
d2<-data.frame(x=x,n=n,r=r)
d2
fct <- LL2.5(fixed = c(NA,0,1,NA,NA),names = c("Hillslope", "Lower Limit",
"Upper Limit", "LC50", "Asymmetry"))
drc2 <- drm(p~log(x), weight=n, data=d2, fct=fct, type="binomial",
logDose=exp(1))
summary(drc2)
plot(drc2)
est2<-10.56
se2<-0.271
points(est2,0.5)
arrows(est2,0.5,est2-se2,angle=90,code=2,length=0.025)
arrows(est2,0.5,est2+se2,angle=90,code=2,length=0.025)
The idea is to use the drc package for these types of data to produce
isoboles. Has anyone else encountered this issue before and can help me? OR
I noticed Dr. Ritz has responded to this thread, do you have an suggestions?
As far as I know, I have the latest version of every package for R.
Sincerely,
Patrick
--
View this message in context: http://r.789695.n4.nabble.com/drc-results-differ-for-different-versions-tp891497p3811412.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list