Hi, I am trying to fit a 4p logistic to this data, using nls function. The function didn't freely converge; however, it converged if I put a lower and an upper bound (in algorithm port). Also, the b1.A parameter always takes value of the upper bound, which is very strange. Has anyone experienced about non-convergent of nls and how to deal with this kind of problem?
Thank you very much. ########################################################################3 y x 1 0.8924619 -0.31875876 2 1.1814749 -0.21467016 3 1.6148266 0.06069784 4 2.2091363 0.54032947 5 2.7019079 1.04921802 6 3.0679585 1.60745502 9 0.9436973 -0.31875876 10 1.2201133 -0.21467016 11 1.6470043 0.06069784 12 2.2090048 0.54032947 13 2.6864857 1.04921802 14 3.0673523 1.60745502 new.cont=nls.control(maxiter = 10000, tol = 1e-05, minFactor = 1e-08, printEval = FALSE, warnOnly = FALSE) b0.A=.9*min(DAT$y) b1.A=1.1*max(DAT$y)-b0.A b2.A=-1*mean(DAT$x) b3.A=1 b0.A b1.A b2.A b3.A nls.mdl.A=nls(y~b0 + b1/(1+exp(-b2-b3*x)),data=DAT,start = list(b0=b0.A, b1=b1.A, b2=b2.A, b3=b3.A), lower=-10, upper=10, algorithm="port",trace=T,control=new.cont) ################################## [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.