Principal Component Analysis (Eigenvector Extracting)
Posted: Wed Jun 29, 2016 1:57 pm
Hello,
I used this code: factor dmf1.ipf(n=mineigen) a b c d e f g
to generate a factor. What I am really interested in are principal components, which I can only get (to my knowledge) by clicking View->Eigenvalues-> and click Eigenvectors in additional output section. I want to save first one or two principal components of Eigenvector (loadings) table into my workfile. I tried using factor.eigen(eigvec)function, but it only gave me eigenvalues, not vectors (that I want). Could you let me know how I can do that using code? Thanks in advance.
I used this code: factor dmf1.ipf(n=mineigen) a b c d e f g
to generate a factor. What I am really interested in are principal components, which I can only get (to my knowledge) by clicking View->Eigenvalues-> and click Eigenvectors in additional output section. I want to save first one or two principal components of Eigenvector (loadings) table into my workfile. I tried using factor.eigen(eigvec)function, but it only gave me eigenvalues, not vectors (that I want). Could you let me know how I can do that using code? Thanks in advance.