[R] 4 parameter logistic model
array chip
arrayprofile at yahoo.com
Wed Aug 20 22:06:58 CEST 2003
Hi, I am trying to fit a 4-parameter logistic model to
my gradient data using nls. I tried to specify the
model directly in the nls formula and also tried to
use the self-start function SSfpl. For the following
data, the first method worked, but the second didn't.
I thought both ways were equivalent, can anyone tells
me why?
>
test=data.frame(cbind(conc=c(13294,3940,1170,346,102,30.20,8.94,2.65,13294,3940,1170,346,102,30.20,8.94,2.65),
signal=c(2609,487,110,35,17.5,16,11,12.5,2682,292.5,51.5,25.5,14,11,14,15)))
>
nls(log(signal)~A+(B-A)/(1+exp((xmid-log(conc))/scal)),data=test,start
= list(A=log(5), B=log(3000),
xmid=log(6000),scal=0.8))
Residual sum of squares : 0.6649545
parameters:
A B xmid scal
2.494311 10.92275 8.752043 1.308763
formula: log(signal) ~ A + (B - A)/(1 + exp((xmid -
log(conc))/scal))
16 observations
>
nls(log(signal)~SSfpl(log(conc),log(5),log(3000),log(6000),0.8),
data=test)
Error in nlsModel(formula, mf, start) : singular
gradient matrix at initial parameter estimates
Thanks!
More information about the R-help
mailing list