Skip to content
Prev 245195 / 398503 Next

understanding the 4 parameter logisitc regression

1Rnwb wrote:
The easiest way is to plot the function for several parameters with the
original data superimposed. It shows you, that either you copied


test=data.frame(cbind(conc=c(25000, 12500, 6250, 3125, 1513, 781, 391,
195, 97.7, 48.4, 24, 12, 6, 3, 1.5, 0.001),
 il10=c(330269, 216875, 104613, 51372, 26842, 13256, 7255, 3049, 1849, 743,
480, 255, 241, 128, 103, 50)))

fn = function(conc, A,B,xmid,scal) {
  A+(B-A)/(1+(conc/xmid )^scal)
}

plot(test$conc,fn(test$conc,15,3.5,600,1/2.5),type="l") # looks good
#plot(test$conc,fn(test$conc,3.5,15,600,1/2.5),type="l") # bad
points(test$conc,log(test$il10))

Which tells you that the example you cited has a typo, or the author had
mixed up parameters A and B.

Dieter