# [R] weighted regression using drm() in drc package

array chip arrayprofile at yahoo.com
Fri May 21 21:40:53 CEST 2010

```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.

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

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: d1.txt
URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20100521/d444a593/attachment.txt>
```