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!