Two more things on this; one, I wrote
But if you insist in doing so, the first principal component on the
covariances can be returned ok, as
<hansl>
matrix A = { 0, 0, 0, 0; \
0.0000 , 2.2790, -1.5619, -1.6955; \
0.0000 , -1.5619 , 1.2914 , 1.6958 ; \
0.0000 , -1.6955 , 1.6958 , 2.6103 }
matrix v = {}
matrix S = mcov(A)
eval eigensym(S, &v)
print v
eval A * v[,4]
</hansl>
which is wrong, because you should centre the data first, and use
cdemean(A) in place of A.
Two, I found that princomp actually uses standardised data when computing
its output even when the third argument is non-zero, which is IMO wrong.
-------------------------------------------------------
Riccardo (Jack) Lucchetti
Dipartimento di Scienze Economiche e Sociali (DiSES)
Università Politecnica delle Marche
(formerly known as Università di Ancona)
r.lucchetti(a)univpm.it
http://www2.econ.univpm.it/servizi/hpp/lucchetti
-------------------------------------------------------