We should have a multigroup fit function built in.
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"),
one would write
mxMultiGroupObjective(MZ.objective + DZ.objective)
or perhaps something else?
Yes, I like
most of all, but with the proviso that the first argument is a list:
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.
Copyright © 2007-2017 The OpenMx Project