help needed in least square curve fit equation

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

help needed in least square curve fit equation

utpalmtbi
This post has NOT been accepted by the mailing list yet.
Hi all,

I am trying to solve a least square non linear regression with the following data points:

X 1 2 3 4 5 6 7 8 9 10
Y 2950 2452 2333 2274 2244 2222 2207 2195 2184 2176

The equation which I want to fit is:

Y=a*exp[-X/b]+c

a, b and c are constants defined to fit the curve..

Also, as you notice, the Y value decreases with each X, but it will gradually converge and not decrease after a certain value of X.
So, I want to extrapolate the curve such that, at very high value of X (X = infinity), function Y converges to its asymptotic value..
In other words, with a certain high number of 'X', the "a*exp[-X/b]" term will tend toward 0, where "c" represents the convergence, and that value of "c" is being taken as final result..

Any type of help is appreciated.. Thanks for your consideration
Reply | Threaded
Open this post in threaded view
|

Re: help needed in least square curve fit equation

Wu Gong
As I understand, it is an optimization problem.

LeastSquare=sum[y-f(x)]^2

Minimize least square by solving equations about a, b, and c. An iterative method could be developed to get the result or some R functions might be found useful. Please refer http://r.789695.n4.nabble.com/Is-there-any-Gauss-newton-library-function-in-R-td897353.html

Hope it helps.