[R] question about non-linear least squares in R

2007-09-05 Thread Yu (Warren) Wang
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 -

Re: [R] question about non-linear least squares in R

2007-09-05 Thread Moshe Olshansky
Below is one possibility: If you knew MA you would get a regular linear least-squares for parameters A,B and constant which can be easily solved. So now you can define a function f(MA) which returns that value. Now you must minimize that f - a function of one argument. It can have several local

Re: [R] question about non-linear least squares in R

2007-09-05 Thread apjaworski
09/05/2007 02:51 [R] question about non-linear least AMsquares in R