Hi, I am programming a constrained least squares minimization using proc NLP. I am minimizing the least squares of the differences of a dependent variable and the weighted sum of some independent variables.
Currently, my constraints amount to lower bounds on the weights - i.e. all must be greater than zero. I would like to add a nonlinear constraint that requires the correlation of the dot product of my weights and their independent variables, and my weights and lagged values of the independent variables, to be at least some constant value.
then I would like to add a nonlinear constraint that requires that:
correlation( s1, sL1 ) > a
s1 = w1 * iVar1 + w2 * iVar2
sL1 = w1 * iVar1(lag1) + w2 * iVar2(lag1)
a is a constant
I know that I can make lagged values of my independent variables accessible by setting them up in the data set that I am using for the optimization, my main question is whether nlincon allows the use of correlations and if so how?