Multiple linear regression with constraint
조회 수: 3 (최근 30일)
이전 댓글 표시
I need to run a multiple linear regression such that all of the coefficients are positive, and their sum = 1 . I have 7 variables, so i need 7 seven coefficients.
Thanks !
댓글 수: 0
채택된 답변
Amit
2014년 2월 8일
댓글 수: 6
John D'Errico
2014년 2월 8일
편집: John D'Errico
2014년 2월 8일
Note that most likely, some of the coefficients MIGHT go negative by an amount on the order of eps. Look at the numbers. If they are -1.e-13, why do you care? Just set them to ZERO afterwards.
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Linear Regression에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!