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!