Published on *OpenMx* (http://openmx.psyc.virginia.edu)

By *mspiegel*

Created *05/12/2011 - 09:04*

Thu, 05/12/2011 - 09:04 — mspiegel [1]

In the OpenMx 1.0.x series, when a RAM model with raw data is fitted, the resulting model that is returned by `mxRun()`

has a FIML objective function instead of a RAM objective function. This transformation was performed for convenience, it allowed us to support RAM models with raw data by using our existing implementation for FIML optimization. However it has been a source of confusion (rightly so) as new paths cannot be added or eliminated from the resulting fitted model. The OpenMx platform encourages a workflow where model A can be fitted to produce model B, and then model B is modified and then fitted to produce model C, ad infinitum.

Starting in OpenMx 1.1, a RAM model with raw data will no longer produce a fitted model with a FIML objective function. This is strictly an issue of user interface, the optimization strategy will not change. What does this mean for the user? You will no longer be able to inspect the "expCov" and "expMean" algebras of the fitted model that have been auto-generated in OpenMx 1.0.x. In order to inspect the final values of the expected covariance and expected means in a fitted RAM model, use the following syntax `model$objective@expCov`

or `model$objective@expMean`

. Note this works for covariance data or raw data, something that was not possible in the 1.0 series.

If your workflow demands access to the intermediate values of the expCov and expMean algebras during the optimization process, then you will need to use the function `newModel <- omxRAMtoML(model)`

. This function accepts a model as input, and returns a model as output where all the RAM objective functions have been transformed to either ML or FIML objective functions, where the necessary algebras have been auto-generated in order to calculate the expected covariance and means matrices.

**Links:**

[1] http://openmx.psyc.virginia.edu/users/mspiegel