Question: Nonlinear Least Square Curve Fitting
0
gravatar for User 6777
6.0 years ago by
User 677710
United States
User 677710 wrote:

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

• 1.3k views
ADD COMMENTlink modified 6.0 years ago by swbarnes25.2k • written 6.0 years ago by User 677710

if this is related to bioinformatics, you should add how, otherwise, it is not an appropriate question for this forum.

ADD REPLYlink written 6.0 years ago by brentp23k

yes it is.. I want to build and validate a regressional model of an exponentially decaying dependent variable in my experiment

ADD REPLYlink written 6.0 years ago by User 677710
0
gravatar for swbarnes2
6.0 years ago by
swbarnes25.2k
United States
swbarnes25.2k wrote:

Perform some function on the X or Y values to make the relationship between X and Y linear. Then do the usual curve-fitting.

For starters, "c" is going to be 2176. So I subtract that from all the Y values

1 774

2 276

3 157

4 98

5 68

6 46

7 31

8 19

9 8

Now I take the natural log of the Y values

1 6.651571874

2 5.620400866

3 5.056245805

4 4.584967479

5 4.219507705

6 3.828641396

7 3.433987204

8 2.944438979

9 2.079441542

And now your data is linear. The slope of that line is "b". I think you can figure out how to get "a" yourself.

ADD COMMENTlink written 6.0 years ago by swbarnes25.2k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 693 users visited in the last hour