Hi, I am currently trying to do dose-response curves using weighted 4-parameter model (4PL). The weighting was based on 1/(expected variance) derived from historical data. I tried both drm() from drc package, and nls(), found very different results derived from drm() vs. nls() using "weights=" argument.
d1<-read.table("d1.txt",sep='\t',header=T,row.names=1) drm(y~x,weights=1/exp((-1.8286)+0.05481*y-0.000405225*(y-48.34177)^2),data = d1,fct = LL.4(),control=drmc(relTol=1e-12)) b:(Intercept) c:(Intercept) d:(Intercept) e:(Intercept) -1.5859 0.7823 47.3591 38.7717 nls(y~c+(d-c)/(1+(x/e)^b),weights=1/exp((-1.8286)+0.05481*y-0.000405225*(y-48.34177)^2),data=d1, start=list(b=-1, c =0, d=100, e=150)) b c d e -1.0076 -0.1143 104.9470 152.5558 But if I run unweighted dose-response curve, both drm() and nls() gave the same results: drm(y~x,data = d1,fct = LL.4(),control=drmc(relTol=1e-12)) b:(Intercept) c:(Intercept) d:(Intercept) e:(Intercept) -1.1416 0.6986 102.8613 135.9371 nls(y~c+(d-c)/(1+(x/e)^b),data=d1, start=list(b=-1, c =0, d=100, e=150)) Nonlinear regression model b c d e -1.1416 0.6987 102.8613 135.9373 Any suggestions would be appreciated! John
y x 17 2.34401224931698 4.88 18 33.2408581210951 78.13 19 90.2562925955097 1250 20 106.021704365726 20000 21 100.222797235699 5000 22 78.5794363031895 312.5 23 12.7579568230370 19.53 24 1.04435840221690 1.22
______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.