I\'m fitting some exponential data using nls.
nls
The code I\'m using is:
fit <- nls(y ~ expFit(times, A, tau, C), start = c(A=100, tau=-
I usually use this trick:
params<-... # setup default params. while(TRUE){ fit<-NULL try(fit<-nls(...)); # does not stop in the case of error if(!is.null(fit))break; # if nls works, then quit from the loop params<-... # change the params for nls }