필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

Constained regression 2 - regression model/solver

조회 수: 1 (최근 30일)
Simon Wang
Simon Wang 2015년 3월 15일
마감: MATLAB Answer Bot 2021년 8월 20일
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
dpb
dpb 2015년 3월 15일
How do A and P relate to each other?
John D'Errico
John D'Errico 2015년 3월 15일
편집: John D'Errico 2015년 3월 15일
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.

답변 (1개)

Torsten
Torsten 2015년 3월 16일
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.

이 질문은 마감되었습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by