eigenvalues {LikertMakeR} | R Documentation |
eigenvalues()
calculate eigenvalues of a correlation
matrix and optionally produces a scree plot.
eigenvalues(cormatrix, scree = FALSE)
cormatrix |
(real, matrix) a correlation matrix |
scree |
(logical) default = |
a vector of eigenvalues
report on positive-definite status of cormatrix
## define parameters
correlationMatrix <- matrix(
c(
1.00, 0.25, 0.35, 0.40,
0.25, 1.00, 0.70, 0.75,
0.35, 0.70, 1.00, 0.80,
0.40, 0.75, 0.80, 1.00
),
nrow = 4, ncol = 4
)
## apply function
evals <- eigenvalues(cormatrix = correlationMatrix)
evals <- eigenvalues(correlationMatrix, 1)