HOW CAN I FIT NONLINEAR REGRESSION ON GIVEN DATA SET
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Dear all how can i fit nonlinear regression in MATLAB with following model and data y=[2.8 5.0 7.5 22 27 39 45 203 ]; x=[14 24 31 72 77 96 96 108 ]; model=(x*c1/c2+x);Here c1 and c2 i need to estimate.The initial values of c1=12 and c2=7.
Thanks
0 Kommentare
Antworten (1)
John D'Errico
am 1 Mai 2016
Bearbeitet: John D'Errico
am 2 Mai 2016
You can never estimate c1 and c2 there. NEVER. Why?
Suppose that you found the perfect values of c1 and c2? Lets say that 12 and 7 were what some routine converged to?
Would you get a better, worse, or identically the same result if the routine had given you 24 and 14? The ratio of those two numbers is IDENTICAL to the first ratio. So if 12 and 7 were good, then 24 and 4 will be just as good. In fact ANY choice of k*12 and k*7 would be equally good, so an infinite number of choices.
You CANNOT fit this model using any nonlinear tool, using ANY tool. All that you can ever do is assume arbitrarily that c2 == 1, and then fit the model
y = x*c2 + x
Of course, then you would realize that this model is equivalent to
y = x*(c2+1)
This is a purely linear model. Why would you bother to use a nonlinear regression tool to solve the problem? And then if I look at your data, the data is actually quite linear, except for ONE data point.
plot(x,y,'o')
So then I asked myself if your question is actually to fit the model
y = x*c2/(c1 + x)
and you just don't appreciate the need for the use of parentheses there, or you were just sloppy?
It really does not matter. That data will be virtually useless to fit that model. The fit would be worthless, and the coefficients would be nonsense.
0 Kommentare
Siehe auch
Kategorien
Mehr zu Linear and Nonlinear Regression finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!