Linear regression with constraints on conditional y
Afficher commentaires plus anciens
Hi everyone,
I am struggling with a linear regression with constraints. I have y and x variables which are both vectors 89x1. I am trying to implement a regression in which the parameters alpha and beta are estimated under a constraint such that:
alpha + beta*x(tao) >=0 for tao = 1,...,t
I was trying to use the command lsqlin but I do not understand what should the matrixes be in my optimization problem.
Can someone guide me through the implementation of it? Thank you in advance!!
2 commentaires
Torsten
le 4 Mai 2016
So you want to find alpha, beta such that
y(x) = alpha + beta*x
is a good approximation for your data vectors (x_data,y_data) and alpha + beta*x_data >= 0 ?
Best wishes
Torsten.
John D'Errico
le 4 Mai 2016
I'll try to answer your question, but you've left out too much information for me to be confident. I think this is because you've tried to put in only what you think is pertinent, and you also tried to add some formalization to the process. So my answer below is only a guess. If you can clear up your question, that would help.
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Linear Least Squares dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!