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.
Comments
covariance not precomputed unless re-run
I kinda wanted the predicted covariance matrix without too much fuss, but....
Maybe this will
Maybe this will work:
The flag compute=TRUE will evaluate any algebras in the frontend. Otherwise (compute=FALSE) returns the current value of the MxAlgebra.