I'm doing eigen analysis of given matrix P in R
. My MWE is
Minimum working example
P <-
matrix(
data=
c(
1, 0, 0, 0
, 0.4, 0, 0.6, 0
, 0.2, 0, 0.1, 0.7
, 0, 0, 0, 1
)
, nrow=4
, ncol=4
, byrow=TRUE
)
SPD <- eigen(P)
round(SPD$values, 3)
round(SPD$vectors, 3)
SVD <- svd(P)
round(SVD$d, 3)
round(SVD$u, 3)
round(SVD$v, 3)
Output
[1] 1.0 1.0 0.1 0.0
[,1] [,2] [,3] [,4]
[1,] 0.866 0.000 0.000 0
[2,] 0.462 0.346 0.986 1
[3,] 0.192 0.576 0.164 0
[4,] 0.000 0.741 0.000 0
[1] 1.253 1.093 0.543 0.000
[,1] [,2] [,3] [,4]
[1,] -0.349 0.784 -0.502 0.108
[2,] -0.210 0.440 0.863 0.134
[3,] -0.577 -0.117 0.045 -0.807
[4,] -0.708 -0.422 -0.045 0.565
[,1] [,2] [,3] [,4]
[1,] -0.438 0.857 -0.272 0
[2,] 0.000 0.000 0.000 1
[3,] -0.147 0.231 0.962 0
[4,] -0.887 -0.461 -0.024 0
For some reasons I'm not able to reproduce the results given the fig attached. Am I missing something here?