Copyright © 2007-2024 The OpenMx Project
Wiki home [1]: mxMatrix Help [2]
The following table list matrix operators and functions that are supported by OpenMx. A blank value for the columns 'Implemented' or 'Passing Tests' indicates that the entry has been implemented or is passing the sample tests, respectively.
Operator name | R name | Mx name | Conformability | Implemented/Passing Tests |
Square Bracket Operator (element) | A[x,y] | -- | -- | Yes |
Square Bracket Operator (row) | A[x,] | -- | -- | Yes |
Square Bracket Operator (column) | A[,y] | -- | -- | Yes |
Inversion [3] | solve(A) | A~ | r=c | Yes |
Transpose [4] | t(A) | A' | -- | Yes |
Element powering | A ^ B | -- | -- | Yes |
Matrix multiplication [5] | A %*% B | A * B | cA=rb | Yes |
Dot product [6] | A * B | A . B | rA=rB and cA=c B | Yes |
Kronecker product [7] | A %x% B | A @ B | -- | Yes |
Kronecker exponent | A %^% B | A ^ B | -- | Yes |
Quadratic product1 [8] | A %&% B | A & B | cA=rB=cB | Yes |
Element division | A / B | A % B | rA=rB and cA=c B | Yes |
Addition | A + B | A + B | rA=rB and cA=c B | Yes |
Subtraction (binary) | A - B | A - B | rA=rB and cA=c B | Yes |
Subtraction (unary) | - A | - A | -- | Yes |
Horizontal adhesion | cbind(A,B,C) | A | B | C | rA=rB | Yes |
Vertical adhesion | rbind(A,B,C) | A _ B _ C | cA=cB | Yes |
Determinant [9] | det(A) | \det(A) | -- | Yes |
Trace [10]1 | tr(A) | \tr(A) | -- | Yes |
Sum | sum(A,B,C) | \sum(A,B,C) | -- | Yes |
Product | prod(A,B,C) | \prod(A,B,C) | -- | Yes |
Maximum | max(A,B,C) | \max(A,B,C) | -- | Yes |
Minimum | min(A,B,C) | \min(A,B,C) | -- | Yes |
Absolute value | abs(A) | \abs(A) | -- | Yes |
Cosine | cos(A) | \cos(A) | -- | Yes |
Hyperbolic cosine | cosh(A) | \cosh(A) | -- | Yes |
Sine | sin(A) | \sin(A) | -- | Yes |
Hyperbolic sine | sinh(A) | \sinh(A) | -- | Yes |
Tangent | tan(A) | \tan(A) | -- | Yes |
Hyperbolic tangent | tanh(A) | \tanh(A) | -- | Yes |
Element Exponent | exp(A) | \exp(A) | -- | Yes |
Element Natural Log | log(A) | \ln(A) | -- | Yes |
Element Square Root | sqrt(A) | \sqrt(A) | -- | Yes |
Half-vectorization | vech(A) | \vech(A) | -- | Yes |
Strict half-vectorization | vechs(A) | -- | -- | Yes |
1 Support for this operation in the R frontend is provided by the OpenMx library. This operation is not defined by the R core library, so you will be unable to use it without loading the OpenMx library.
Links
[1] http://openmx.psyc.virginia.edu/wiki/main-page
[2] http://openmx.psyc.virginia.edu/wiki/mxmatrix-help
[3] http://en.wikipedia.org/wiki/Invertible_matrix
[4] http://en.wikipedia.org/wiki/Transpose
[5] http://en.wikipedia.org/wiki/Matrix_multiplication
[6] http://en.wikipedia.org/wiki/Dot_product
[7] http://en.wikipedia.org/wiki/Kronecker_product
[8] https://openmx.ssri.psu.edu/wiki/quadratic-matrix-multiplication
[9] http://en.wikipedia.org/wiki/Determinant
[10] http://en.wikipedia.org/wiki/Trace_%28linear_algebra%29