Displaying 1 result from an estimated 1 matches for "smallc".
Did you mean:
small
2012 Jul 11
2
nls problem: singular gradient
Why fails nls with "singular gradient" here?
I post a minimal example on the bottom and would be very
happy if someone could help me.
Kind regards,
###########
# define some constants
smallc <- 0.0001
t <- seq(0,1,0.001)
t0 <- 0.5
tau1 <- 0.02
# generate yy(t)
yy <- 1/2 * ( 1- tanh((t - t0)/smallc) * exp(-t / tau1) ) + rnorm(length(t))*0.01
# show the curve
plot(x=t, y=yy, pch=18)
# prepare data
dd <- data.frame(y=yy, x=t)
nlsfit <- nls(data=dd, y ~ 1/2 *...