eigenvalues {LikertMakeR} | R Documentation |
calculate eigenvalues of a correlation matrix with optional scree plot
Description
eigenvalues()
calculate eigenvalues of a correlation
matrix and optionally produces a scree plot.
Usage
eigenvalues(cormatrix, scree = FALSE)
Arguments
cormatrix |
(real, matrix) a correlation matrix |
scree |
(logical) default = |
Value
a vector of eigenvalues
report on positive-definite status of cormatrix
Examples
## 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)
[Package LikertMakeR version 0.3.0 Index]