Lucek, Kay wrote:
Hi,
I try to calculate the angle between two first eigenvectors of different
covariance matrices of biological phenotypic traits for different populations.
My issue here is, that all possibilities to do so seem to normalize the
eigenvectors to length 1. Although the helpfile of eigen() states, that using
eigen(, symmetric = FALSE, EISPACK =TRUE) skips normalization this is (I guess)
not applicable for me as my matrices are symmetric.
x<-eigen(cov(population1))$vectors[,1]
y<-eigen(cov(population2))$vectors[,1]
angle (in degree):
((acos((x%*%y)/(sqrt(x%*%y)*sqrt(y%*%y))))*180)/pi
Thus by using normalized vectors, the divisor becomes meaningless being 1.
Does anybody have an idea to get raw eigenvectors?
I don't know what you mean by "raw eigenvectors". Any non-zero multiple
of an eigenvector is an eigenvector.
For the angle, just skip the denominator, because it's guaranteed to be 1.
Duncan Murdoch
______________________________________________
[email protected] 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.