Revision of Matrix Operators and Functions from Wed, 02/29/2012 - 03:13

The revisions let you track differences between multiple versions of a post.

Wiki home: mxMatrix Help

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 OpenMx (R) name Mx name Conformability OpenMx Version
Square Bracket Operator (element) A[x,y] \part(A,B) -- 1.0
Square Bracket Operator
(row or col)
A[x,] or A[,y] -- -- 1.0
Square Bracket Operator (subrange) A[x:y, w:z] \part(A,B) -- 1.0
Inversion solve(A) A~ r=c 1.0
Transpose t(A) A' -- 1.0
Element powering A ^ B -- -- 1.0
Matrix multiplication A %*% B A * B cA=rb 1.0
Element multiplication (Hadamard product) A * B A . B rA=rB and cA=c B 1.0
Kronecker product A %x% B A @ B -- 1.0
Kronecker exponent A %^% B A ^ B -- 1.0
Quadratic product1 A %&% B A & B cA=rB=cB 1.0
Element division A / B A % B rA=rB and cA=c B 1.0
Addition A + B A + B rA=rB and cA=c B 1.0
Subtraction (binary) A - B A - B rA=rB and cA=c B 1.0
Subtraction (unary) - A - A -- 1.0
Horizontal adhesion cbind(A,B,C) A | B | C rA=rB 1.0
Vertical adhesion rbind(A,B,C) A _ B _ C cA=cB 1.0
Determinant det(A) \det(A) -- 1.0
Trace1 tr(A) \tr(A) -- 1.0
Sum sum(A,B,C) \sum(A,B,C) -- 1.0
Product prod(A,B,C) \prod(A,B,C) -- 1.0
Maximum max(A,B,C) \max(A,B,C) -- 1.0
Minimum min(A,B,C) \min(A,B,C) -- 1.0
Absolute value abs(A) \abs(A) -- 1.0
Cosine cos(A) \cos(A) -- 1.0
Hyperbolic cosine cosh(A) \cosh(A) -- 1.0
Sine sin(A) \sin(A) -- 1.0
Hyperbolic sine sinh(A) \sinh(A) -- 1.0
Tangent tan(A) \tan(A) -- 1.0
Hyperbolic tangent tanh(A) \tanh(A) -- 1.0
Element Exponent exp(A) \exp(A) -- 1.0
Element Natural Log log(A) \ln(A) -- 1.0
Element Square Root sqrt(A) \sqrt(A) -- 1.0
Half-vectorization vech(A) \vech(A) -- 1.0
Strict half-vectorization vechs(A) -- -- 1.0
Diagonal to vector diag2vec(A) \d2v(A) -- 1.0
Vector to diagonal vec2diag(A) \v2d(A) rA=1 or cA=1 1.0
Multivariate normal integration omxMnor(A) \mnor(A) -- 1.0
All cells multivariate number integration omxAllInt(A) \allint(A) -- 1.0
Vectorize by row rvectorize(A) \m2v(A) -- 1.0
Vectorize by column cvectorize(A) \vec(A) -- 1.0
Real Eigenvectors eigenvec(A) \evec(A) -- 1.0
Real Eigenvalues eigenval(A) \eval(A) -- 1.0
Imaginary Eigenvectors ieigenvec(A) \ivec(A) -- 1.0
Imaginary Eigenvalues ieigenval(A) \ival(A) -- 1.0
Mean mean(A) -- -- 1.1
Logical Negation omxNot(A) -- -- 1.1
Logical Greater Than omxGreaterThan(A,B) -- -- 1.1
Logical Less Than omxLessThan(A,B) -- -- 1.1
Logical And omxAnd(A,B) -- -- 1.1
Logical Or omxOr(A,B) -- -- 1.1
Approximate Equals omxApproxEquals(A,B,ε) -- -- 1.1
Select Rows omxSelectRows(A, selector) -- -- 1.1
Select Cols omxSelectCols(A, selector) -- -- 1.1
Select Rows & Cols omxSelectRowsAndCols(A, selector) -- -- 1.1

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.