I am detecting Multicollinearity using eigen values and vector for longley data. When I compute eigen values from SPSS I found different eigen values than R language. I don't why. I computed for both Standardized X matrix and actual X matrix but results mismatch.
data(longley)
x<-as.matrix(longley[,-7])
e<-eigen(t(x)%*%x)
The following is the result from R Language
$values
[1] 6.665299e+07 2.090730e+05 1.053550e+05 1.803976e+04 2.455730e+01
[6] 2.015117e+00
Following is the result from SPSS
6.861392768154346
0.08210250361264278
0.04568078445788493
0.01068846567618869
1.29228130384155E-4
6.2463047077443345E-6
3.663846498908749E-9
What is the possible command error? Also guide me how to compute proportional explained variation.
For collinearity diagnostic by eigenvalues one should rescale the X matrix including intercept as "obtained by dividing each original value by the square root of the sum of squared original values for that column in the original matrix, including those for the intercept" After that have to compute the eigenvalues.
Its R code is
data (longley)
X<-as.matrix(cbind(1,longley[,-7]))
X <- apply(X, 2 , function(x) x/sqrt(sum(x^2)))
eigen(t(X)%*%X)
The obtained values are now not only matches the literature but also other software.