You are here

Multigroup Fit Function

We should have a multigroup fit function built in.

Reporter: 
Created: 
Fri, 01/25/2013 - 12:03
Updated: 
Tue, 05/06/2014 - 22:46

Comments

so instead of

mxModel(name="MZ", mxData(mzData, type="raw"), mxFIMLObjective("top.mzCov", "top.expMean")),
mxModel(name="DZ", mxData(dzData, type="raw"), mxFIMLObjective("top.dzCov", "top.expMean")),
mxAlgebra(MZ.objective + DZ.objective, name="twin"), 
mxAlgebraObjective("twin")

one would write

mxMultiGroupObjective(MZ.objective + DZ.objective)

or

mxMultiGroupObjective(MZ, DZ)

or perhaps something else?

Yes, I like

mxMultiGroupObjective(MZ, DZ)

most of all, but with the proviso that the first argument is a list:

mxMultiGroupObjective(list(MZ, DZ))

to allow something like

mxMultiGroupObjective(list(MZ, DZ), operator='sum')

as the default, with, e.g.,

mxMultiGroupObjective(list(MZ, DZ), weights=algebraName, operator='weightedSum')

for alternatives. Obviously dimension of weights would have to agree with length of list.

I wrote an implementation in C today.

Joshua has implemented, tested, and documented this.