eigenvec {OpenMx} | R Documentation |
Eigenvector/Eigenvalue Decomposition
Description
eigenval
computes the real parts of the eigenvalues of a square matrix.
eigenvec
computes the real parts of the eigenvectors of a square matrix.
ieigenval
computes the imaginary parts of the eigenvalues of a square matrix.
ieigenvec
computes the imaginary parts of the eigenvectors of a square matrix.
eigenval
and ieigenval
return nx1 matrices containing the real or imaginary parts of the eigenvalues, sorted in decreasing order of the modulus of the complex eigenvalue. For eigenvalues without an imaginary part, this is equivalent to sorting in decreasing order of the absolute value of the eigenvalue. (See Mod
for more info.)
eigenvec
and ieigenvec
return nxn matrices, where each column corresponds to an eigenvector. These are sorted in decreasing order of the modulus of their associated complex eigenvalue.
Usage
eigenval(x)
eigenvec(x)
ieigenval(x)
ieigenvec(x)
Arguments
x |
the square matrix whose eigenvalues/vectors are to be calculated. |
Details
Eigenvectors returned by eigenvec
and ieigenvec
are normalized to unit length.
See Also
Examples
A <- mxMatrix(values = runif(25), nrow = 5, ncol = 5, name = 'A')
G <- mxMatrix(values = c(0, -1, 1, -1), nrow=2, ncol=2, name='G')
model <- mxModel(A, G, name = 'model')
mxEval(eigenvec(A), model)
mxEval(eigenvec(G), model)
mxEval(eigenval(A), model)
mxEval(eigenval(G), model)
mxEval(ieigenvec(A), model)
mxEval(ieigenvec(G), model)
mxEval(ieigenval(A), model)
mxEval(ieigenval(G), model)