How to code this quadratic minimization problem subject to a linear constraint?

조회 수: 2 (최근 30일)
After having performed Factor Analysis (FA), I am now trying to implement the following rotation strategy (Swanson 2017 - details of rotation strategy in appenix A) to interpret the three factors structurally and economically. The strategy is in 3 steps but I will report just the first one as the other steps will follow suit:
1) Quadratic minimization problem subject to a linear constraint:
s.t.
where
is the 80x3 matrix of unrotated factors, (3x1) is the first column of λ which is the 7x3 matrix of factor loadings and is the third column of U which is a 3x3 orthogonal matrix. and are known (find data attached: fa_pre = (80x3) and lambda_1 = (1x3)). Obviously, I would like to solve it for to fully have .
Can you help me code the first minimization problem?
  댓글 수: 1
Bianca Piccirillo
Bianca Piccirillo 2022년 6월 30일
Hi!! I need to do the exact same computation for a project, did you solve it by any chance?
Thank you very much!

댓글을 달려면 로그인하십시오.

답변 (1개)

David Goodmanson
David Goodmanson 2022년 7월 1일
Hi Armando/Bianca
Suppose lambda is a 1x3 row vector. The code below is based on the fact that the solution abc (which is the column vector [a b c]' ) must meet two conditions:
lambda*abc = 0
[0 0 1]*abc = 1 % forces c=1
There is a vector n that is perpendicular to both lambda and [0 0 1] and you can have an aribitrary amount x*n of that without affecting the two conditions. So x can be optimized to minimize the quadratic quantity.
F = Fpre;
lam = lambda_1'; % row vector
z = [0 0 1];
n = null([lam;z])';
G = [n; lam; z];
invG = inv(G);
c = [1 0 0]*invG'*F'*F*invG;
x0 = -c(3)/c(1);
abc0 = invG*[x0 0 1]' % the result
S0 = abc0'*F'*F*abc0 % the quantity that is minimized
lam*abc0 % check, should be zero
abc0 =
0.0140
-0.6621
1.0000
S0 = 35.5975
ans = -4.6838e-17
To check for a minimum you can change both a and b such that the two conditions are still satisfied. Note that for da = +-005, S-S0 has the same positive value in both cases, the right result for the bottom of a quatratic well.
da = .005;
db = -lam(1)*da/lam(2); % db s.t. lam*abc is still 0
abc = abc0 + [da db 0]';
S = abc'*F'*F*abc;
S-S0 % should be positive
lam*abc % check, should be 0
ans = 0.0667
ans = -6.0715e-17
da = -.005;
db = -lam(1)*da/lam(2); % db s.t. lam*abc is still 0
abc = abc0 + [da db 0]';
S = abc'*F'*F*abc;
S-S0 % should be positive
lam*abc % check, should be 0
ans = 0.0667
ans = -3.2960e-17

카테고리

Help CenterFile Exchange에서 Quadratic Programming and Cone Programming에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by