OpenMx
Encyclopedia
OpenMx is an open source
Open source
The term open source describes practices in production and development that promote access to the end product's source materials. Some consider open source a philosophy, others consider it a pragmatic methodology...

 program for extended structural equation modeling
Structural equation modeling
Structural equation modeling is a statistical technique for testing and estimating causal relations using a combination of statistical data and qualitative causal assumptions...

. It runs as a package under R
R (programming language)
R is a programming language and software environment for statistical computing and graphics. The R language is widely used among statisticians for developing statistical software, and R is widely used for statistical software development and data analysis....

. Cross platform, it runs under Linux, Mac OS and Windows.

OpenMx consists of an R library of functions and optimizers supporting the rapid and flexible implementation and estimation of SEM
Structural equation modeling
Structural equation modeling is a statistical technique for testing and estimating causal relations using a combination of statistical data and qualitative causal assumptions...

models. Models can be estimated based on covariance matrices and raw data. Multigroup models are implemented readily, and models can handle both continuous and ordinal data.

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 program has parallel processing built-in via links to parallel environments in R, and in general takes advantage of the R programming environment.

"Hello world" Path Model Specification

Below is the code to implement, run, and print a summary for estimating a one-factor path model with five indicators.
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))

"Hello world" Matrix Specification

Below is the code to implement, run, and print a summary for estimating a one-factor path model with five indicators.

data(demoOneFactor)
factorModel <- mxModel("One Factor",
mxMatrix("Full", nrow=5, ncol=1, values=0.2, free=TRUE, name="A"),
mxMatrix("Symm", nrow=1, ncol=1, values=1, free=FALSE, name="L"),
mxMatrix("Diag", nrow=5, ncol=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))
The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK