[R] question about non-linear least squares in R
Yu (Warren) Wang
yu.wang at pdf.com
Wed Sep 5 09:51:50 CEST 2007
Hi, everyone,
My question is: It's not every time that you can get a converged
result from the nls function. Is there any solution for me to get a
reasonable result? For example:
x <- c(-0.06,-0.04,-0.025,-0.015,-0.005,0.005,0.015,0.025,0.04,0.06)
y <-
c(1866760,1457870,1314960,1250560,1184850,1144920,1158850,1199910,1263850,1452520)
fitOup<- nls(y ~ constant + A*(x-MA)^4 + B*(x-MA)^2,
start=list(constant=10000000, A=100000000, B=-1000000, MA=0),
control=nls.control(maxiter=100, minFactor=1/4096), trace=TRUE)
For this one, I cannot get the converged result, how can I reach it? To
use another funtion or to modify some settings for nls?
Thank you very much!
Yours,
Warren
More information about the R-help
mailing list