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? Thanks a lot Kay Lucek Aquatic Ecology & Macroevolution University of Bern Baltzerstr. 6 3012 Bern Switzerland
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
Apparently Analagous Threads
- negative p-values from fisher's test (PR#7801)
- Kolmogorov-Smirnov test help
- poly() with unnormalized values
- How to estimate variance components with lmer for models with random effects and compare them with lme results
- coxme: model simplification using LR-test?