mxSaturatedModel: what to return, and how

mhunter's picture
Category:feature request

It would be nice to have an mxSaturatedModel helper function. A draft of one is checked in, but it is untested and requires some revision.


tbates's picture


Title:mxSaturatedModel» mxSaturatedModel: what to return, and how

The function I use returns

    return(list(SaturatedLikelihood = m2, IndependenceLikelihood = m3))

On the reporting side, this is consumed thus:

    umxReportFit(m1, saturatedModels = m1_sat)

It's currently really messy passing this into the built-in summary (very-long-named-parameters-and-there-are-two-of-them-:-)

If I had my druthers, I'd add a computeSat =T option to mxRun()

The saturated/ind models can be cached, and would be computed only once, when the user changes the data.

Maybe run a checksum on model@data@observed, (and model@manifestVars), then mark the sat/ind models dirty when this is not equal to a cached value.

Also, need to decide whether to
1a. Calc both ind and sat models: if only the sat is done, it will not meet the needs of our actual users.
1b. Whether to calc ind model analytically
2. Whether to handle submodels
3. How to check the model is valid for the sat/ind solutions being proposed (definition variables etc.)
4. Support non-RAM models.
5. Function and parameter names that encompass saturated and independence models.

AdminHunter's picture


Status:active» closed

This is done with the mxRefModels/omxSaturatedModel function, and additions to mxSummary.