OpenMx consists of an R library of functions and optimizers supporting the rapid and flexible implementation and estimation of SEM models. Models can be estimated based on either raw data or on correlation or covariance matrices. Models can handle mixtures of continuous and ordinal data. The current version is OpenMx 2, and is available on CRAN. Path analysis, Confirmatory factor analysis, Latent growth modeling, Mediation analysis are all implemented. Multiple group models are implemented readily. When a model is run, it returns a model, and models can be updated. An innovation is that labels can consist of address of other parameters, allowing easy implementation of constraints on parameters by address. RAM models return standardized and raw estimates, as well as a range of fit indices. Confidence intervals are estimated robustly. The program has parallel processing built-in via links to parallel environments in R, and in general takes advantage of the R programming environment. Users can expand the package with functions. These have been used, for instance, to implement Modification indices. Models can be written in either a "pathic" or "matrix" form. For those who think in terms of path models, paths are specified using mxPath to describe paths. For models that are better suited to description in terms of matrix algebra, this is done using similar functional extensions in the R environment, for instance mxMatrix and mxAlgebra. The code below shows how to implement a simple Confirmatory factor analysis in OpenMx, using either path or matrix formats. The model is diagrammed here:
Below is the code to implement, run, and print a summary for estimating a one-factor path model with five indicators. require data manifests <- names latents <- c m1 <- mxModel, mxPath, mxPath, mxData ) summary
Example matrix specification
Below is the code to implement, run, and print a summary for estimating a one-factor path model with five indicators. library data df = cov m1 <- mxModel, mxMatrix, mxMatrix, mxAlgebra, mxExpectationNormal, mxFitFunctionML, mxData ) summary