Dear Arlindo,

When, as here, the eigenvalues are distinct, corresponding eigenvectors are 
defined only up to multiplication by a nonzero constant. As you can verify, the 
first set of eigevectors is normalized to length 1 while the second set is 
normalized to have length equal to the corresponding eigenvalues.

I hope this helps,
 John

------------------------------------------------
John Fox
Sen. William McMaster Prof. of Social Statistics
Department of Sociology
McMaster University
Hamilton, Ontario, Canada
http://socserv.mcmaster.ca/jfox/

On Thu, 14 Mar 2013 01:01:56 -0700 (PDT)
 Arlindo Meque <mequit...@yahoo.com.br> wrote:
> 
>  
> Dear all,
> 
> I've used the 'prcomp' command to
> calculate the eigenvalues and eigenvectors of a  matrix(gg).
> 
> Using the command 'principal' from the
> 'psych' packageĀ   I've performed the same exercise. I  got the same
> eigenvalues but different eigenvectors. Is there any reason for that
> difference?
> 
> Below are the steps I've followed:
> 
>       1. PRCOMP
> 
> #defining the matrix
> gg=matrix(byrow = TRUE, nrow = 3,data =
> c(1, 0, 1, 1, 4, 2))
> 
> > gg 
> [,1] [,2] 
> [1,]    1    0 
> [2,]    1    1 
> [3,]    4    2 
> 
> pc=prcomp(gg,center=TRUE,scale=TRUE)
> 
> 
> # The eigenvectors
> pc$rotation 
> PC1        PC2 
> [1,] 0.7071068  0.7071068 
> [2,] 0.7071068 -0.7071068 
> 
> 
> # The eigenvalues:
> 
> > pc$sdev^2 
> [1] 1.8660254 0.1339746 
> 
> 
> 2. PSYCH Package:
> 
> > pp=principal(gg,nfactors=2)
> 
> # The eigenvectors 
> 
> 
> > pp$loadings 
> Loadings: 
> PC1    PC2 
> [1,]  0.966 -0.259 
> [2,]  0.966  0.259
> 
> # The eigenvalues
> 
> pp$values 
> 
> 
>  
> 1] 1.8660254 0.1339746 
> 
> 
> 
> Sincerely,
> 
> Arlindo 
>       [[alternative HTML version deleted]]
>

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to