mxFitFunctionMultigroup {OpenMx}R Documentation

Aggregate fit statistics from submodels

Description

mxFitFunctionMultigroup creates a fit function consisting of the sum of the fit statistics from a list of submodels provided.

This is conceptually similar to creating an mxAlgebra consisting of the sum of the subModel objectives and an creating an algebra fit function to optimize the model based on this value.

A call to mxFitFunctionMultigroup like this:

mxFitFunctionMultigroup(c("model1", "model2"))

then, is almost equivalent to the following pair of statements:

mxAlgebra(model1.objective + model2.objective, name="myAlgebra")

mxFitFunctionAlgebra("myAlgebra")

However, in addition to being more compact and readable, using mxFitFunctionMultigroup has additional side effects which are valuable for multi-group modeling.

Firstly, it aggregates analytic derivative calculations. Secondly, it allows mxSaturatedModel compute saturated models for raw data, as this function can know what the constituent submodels were.

Note: You can refer to the algebra generated by mxFitFunctionMultigroup when used in a group "modelName" as:

modelName.fitfunction

Usage

mxFitFunctionMultigroup(groups, ..., verbose = 0L)

Arguments

groups

vector of fit function names (strings)

...

Not used. Forces subsequent arguments to be specified by name.

verbose

the level of debugging output

Examples

require("OpenMx")
mxFitFunctionMultigroup(c("model1", "model2")) # names of sub-models to be jointly optimised

[Package OpenMx version 2.0.0-3838 Index]