OpenMx version 2.0 has officially been released!! Click here to read the full announcement and download the new version.

Important note: If you are running R 3.1 and mxVersion() returns a build number less than 3475, please reinstall OpenMx!

What is OpenMx?


OpenMx is free and open source software for use with R that allows estimation of a wide variety of advanced multivariate statistical models. OpenMx consists of a library of functions and optimizers that allow you to quickly and flexibly define an SEM model and estimate parameters given observed data.

OpenMx runs on Mac OS X, Windows (XP, Vista, 7, 8), and several varieties of Linux. This means the same scripts you write in Windows will run in Mac OS X or Linux.

OpenMx can be used by those who think in terms of path models or by those who prefer to specify models in terms of matrix algebra. OpenMx is extremely powerful, taking full advantage of the R programming environment. This means that complicated models and data sets can be specified and modified using the R language. In order to give a very brief idea of what OpenMx looks like, here are two small demo examples: one from a path modeler's perspective and one from a matrix algebra perspective.

Path Model Specification

Here is a path diagram for a one factor path model with five indicators. Beside it is an R script using OpenMx path modeling commands to read the data from disk, create the one factor model, fit the model to the observed covariances, and print a summary of the results.
require(OpenMx)
data(demoOneFactor)
manifests <- names(demoOneFactor)
latents <- c("G")
factorModel <- mxModel("One Factor",
      type="RAM",
      manifestVars = manifests,
      latentVars = latents,
      mxPath(from=latents, to=manifests),
      mxPath(from=manifests, arrows=2),
      mxPath(from=latents, arrows=2,
            free=FALSE, values=1.0),
      mxData(cov(demoOneFactor), type="cov",
            numObs=500))
summary(mxRun(factorModel))

Matrix Model Specification

OpenMx can also specify models in terms of matrix algebra.  On the left is an equation for the same one factor path model with five indicators. Beside it is an R script using  OpenMx matrix modeling commands to read the data from disk, create the one factor model, fit the model to the observed covariances, and print a summary of the results.
require(OpenMx)
data(demoOneFactor)
factorModel <- mxModel("One Factor",
      mxMatrix("Full", 5, 1, values=0.2,
           free=TRUE, name="A"),
      mxMatrix("Symm", 1, 1, values=1,
           free=FALSE, name="L"),
      mxMatrix("Diag", 5, 5, values=1,
           free=TRUE, name="U"),
      mxAlgebra(A %*% L %*% t(A) + U, name="R"),
      mxMLObjective("R", dimnames = names(demoOneFactor)),
      mxData(cov(demoOneFactor), type="cov", numObs=500))
summary(mxRun(factorModel))

Learn more about OpenMx and the OpenSEM community.

This site is a community project to develop OpenMx software and the models and scripts that allow researchers to perform their analyses as quickly and easily as possible. OpenMx is funded by a grant from the National Institutes of Health Roadmap and located in the Human Dynamics Lab in the Department of Psychology at the University of Virginia. The OpenMx team provides a binary download of OpenMx software, source code for OpenMx, documentation for OpenMx, the OpenSEM Community Wiki, and the OpenSEM Discussion Forums for users of all types of software to discuss issues in multivariate statistical modeling and to work together to create open source scripts that we can all use to advance inquiry in a wide variety of biological, medical, epidemiological, genetic, and behavioral sciences.