HOW CAN I FIT NONLINEAR REGRESSION ON GIVEN DATA SET

1 visualización (últimos 30 días)
zahid
zahid el 1 de Mayo de 2016
Editada: John D'Errico el 2 de Mayo de 2016
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

Respuestas (1)

John D'Errico
John D'Errico el 1 de Mayo de 2016
Editada: John D'Errico el 2 de Mayo de 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.

Categorías

Más información sobre Linear and Nonlinear Regression en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by