Linear regression with constraints on conditional y
이전 댓글 표시
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
Torsten
2016년 5월 4일
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
2016년 5월 4일
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.
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Linear Least Squares에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!