Multiple linear regression with constraint
8 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
abdoulaye thiam
le 7 Fév 2014
Modifié(e) : abdoulaye thiam
le 8 Fév 2014
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 commentaires
Réponse acceptée
Amit
le 8 Fév 2014
6 commentaires
John D'Errico
le 8 Fév 2014
Modifié(e) : John D'Errico
le 8 Fév 2014
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.
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Linear Least Squares dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!