MxMatrix-class {OpenMx}R Documentation

MxMatrix Class


MxMatrix is a virtual S4 class that comprises the nine types of matrix objects used by OpenMx (see mxMatrix() for details). An MxMatrix object is a named entity. New instances of this class can be created using the function mxMatrix(). MxMatrix objects may be used as arguments in other functions from the OpenMx package, including mxAlgebra(), mxConstraint(), and mxModel().

Objects from the Class

All nine types of object that the class comprises can be created via mxMatrix().



Character string; the name of the MxMatrix object. Note that this is the object's "Mx name" (so to speak), which identifies it in OpenMx's internal namespace, rather than the symbol identifying it in R's worskpace. Use of MxMatrix objects in an mxAlgebra or mxConstraint function requires reference by name.


Numeric matrix of values. If an element is specified as a fixed parameter in the 'free' matrix, then the element in the 'values' matrix is treated as a constant value and cannot be altered or updated by an objective function when included in an mxRun() function. If an element is specified as a free parameter in the 'free' matrix, the element in the 'value' matrix is considered a starting value and can be changed by an objective function when included in an mxRun() function.


Matrix of character strings which provides the labels of free and fixed parameters. Fixed parameters with identical labels must have identical values. Free parameters with identical labels impose an equality constraint. The same label cannot be applied to a free parameter and a fixed parameter. A free parameter with the label 'NA' implies a unique free parameter, that cannot be constrained to equal any other free parameter.


Logical matrix specifying whether each element is free versus fixed. An element is a free parameter if-and-only-if the corresponding value in the 'free' matrix is 'TRUE'. Free parameters are elements of an MxMatrix object whose values may be changed by a fitfunction when that MxMatrix object is included in an MxModel object and evaluated using the mxRun() function.


Numeric matrix of lower bounds on free parameters.


Numeric matrix of upper bounds on free parameters.


Logical matrix; used internally by OpenMx. Identifies which elements have labels with square brackets in them.


Logical; used internally by OpenMx. Governs how mxRun() handles the MxMatrix object when it is inside the MxModel being run.


Logical; used internally by OpenMx. If FALSE, then the matrices in the 'values', 'labels', 'free', 'lbound', and 'ubound' slots are all of equal dimensions. If TRUE, then the last four of those slots will "condense" a matrix consisting entirely of FALSE or NA down to 1x1.


Character string; used internally by OpenMx when parsing MxAlgebras.


Integer; used internally by OpenMx when parsing MxAlgebras.



signature(x = "MxMatrix"): ...


signature(x = "MxMatrix"): ...


signature(x = "MxMatrix"): ...


signature(x = "MxMatrix"): ...


signature(x = "MxMatrix"): ...


signature(x = "MxMatrix"): ...


signature(x = "MxMatrix"): ...


signature(x = "MxMatrix"): ...


signature(x = "MxMatrix"): ...


signature(x = "MxMatrix"): ...


signature(x = "MxMatrix"): ...


signature(x = "MxMatrix"): ...


signature(object = "MxMatrix"): ...

Note that some methods are documented separately (see below, under "See Also").


The OpenMx User's guide can be found at

See Also

mxMatrix() for creating MxMatrix objects. Note that functions imxCreateMatrix(), imxDeparse(), imxSquareMatrix(), imxSymmetricMatrix(), and imxVerifyMatrix() are separately documented methods for this class. More information about the OpenMx package may be found here.



[Package OpenMx version 2.3.1 Index]