Multiple linear regression with constraint

8 次查看(过去 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 !

采纳的回答

Amit
Amit 2014-2-8
  6 个评论
John D'Errico
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.
abdoulaye thiam
abdoulaye thiam 2014-2-8
编辑:abdoulaye thiam 2014-2-8
Yes you are right John, the only the only negative number that i have is -2.641592169276901e-17...Sure, why would I care!! Thank you both!!

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Linear Least Squares 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by