nag_nearest_correlation_target (g02apc) Example Program Results
Symmetrised Input Matrix G
1 2 3 4 5
1 1.0000 -0.0991 0.5665 -0.5653 -0.3441
2 -0.0991 1.0000 -0.4273 0.8474 0.4975
3 0.5665 -0.4273 1.0000 -0.1837 -0.0585
4 -0.5653 0.8474 -0.1837 1.0000 -0.2713
5 -0.3441 0.4975 -0.0585 -0.2713 1.0000
Nearest Correlation Matrix X
1 2 3 4 5
1 1.0000 -0.0991 0.3799 -0.3791 -0.2308
2 -0.0991 1.0000 -0.2865 0.5683 0.3336
3 0.3799 -0.2865 1.0000 -0.1232 -0.0392
4 -0.3791 0.5683 -0.1232 1.0000 -0.2266
5 -0.2308 0.3336 -0.0392 -0.2266 1.0000
Number of iterations taken: 27
alpha: 0.3294
norm value: 0.6526
theta: 0.1000
Smallest eigenvalue of A: 0.8643
Eigenvalues of x
1 2 3 4 5
1 0.0864 0.7431 1.0044 1.2018 1.9642