i have a problem with calculation the Spectral decomposition, i guess, with the sorting of eigen.
According to this website http://www.deltaquants.com/cleaning-correlation-matrices.html i would like to do the same calculation in R
Input <- data.frame(read.csv2(file="testmatrix.csv", header=FALSE, sep=";"))
# same matrix as the example on the website
Eigen <- eigen(Input, only.values=FALSE, symmetric = TRUE)
#Get the eigenvalues/eigenvectors
Eigen$values
Eigen$vectors
The result on the website (excel):
The result from eigen (R)
As the result the new correlation matrix C is not correct.
Thanks for the help. I could provide further information e.c. Code or more details - if it helps.