Displaying 1 result from an estimated 1 matches for "ratelog".
Did you mean:
ratelor
2012 Apr 17
3
error using nls with logistic derivative
...(b-x)/c)) (this is the parametrization for the SSlogis function with nls)
The derivative calculated with D function is:
> logis<- expression(a/(1+exp((b-x)/c)))
> D(logis, "x")
a * (exp((b - x)/c) * (1/c))/(1 + exp((b - x)/c))^2
So I enter this expression in the nls function:
ratelogis <- nls(Y ~ a*(exp((b-X)/c)*(1/c))/(1 + exp((b-X)/c))^2,
start=list(a = 21.16322, b = 8.83669, c = 2.957765),
)
The data is:
> Y
[1] 5.5199668 1.5234525 3.3557000 6.7211704 7.4237955 1.9703127
[7] 4.3939336 -1.4380091 3.2650180 3.5760906 0.2947972 1.0569417
> X
[1] 1 0...