Filter löschen
Filter löschen

Info

Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.

Constained regression 2 - regression model/solver

2 Ansichten (letzte 30 Tage)
Simon Wang
Simon Wang am 15 Mär. 2015
Geschlossen: MATLAB Answer Bot am 20 Aug. 2021
I have a regression model log (r(i)) = a + b * log(A(i)) where A(i) is a vector and each element is known. Log is the nature log.
I need to find out a, b, and each element of r(i) such that the sum of r(i) equals to a constant k and the sum of error, sum(square[log (r(i)) – log(P(i)])is minimized, here each element in vector P(i) is known. a and b are scalars.
What regression model/solver should I choose? How to accomplish this gooal?
Thanks!
  2 Kommentare
dpb
dpb am 15 Mär. 2015
How do A and P relate to each other?
John D'Errico
John D'Errico am 15 Mär. 2015
Bearbeitet: John D'Errico am 15 Mär. 2015
A virtually identical re-ask of your last question, except that in this version, the main difference is you added the Thanks! at the end.

Antworten (1)

Torsten
Torsten am 16 Mär. 2015
min: sum_{i=1}^{N} (log((a+b*log(A(i))/P(i)))^2
under the constraint
exp(a)*sum_{i=1}^{N} A(i)^b - k = 0
Use fmincon to solve for a and b.
Best wishes
Torsten.

Diese Frage ist geschlossen.

Community Treasure Hunt

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

Start Hunting!

Translated by