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"), mxAlgebraObjective("twin")
one would write
mxMultiGroupObjective(MZ.objective + DZ.objective)
or
mxMultiGroupObjective(MZ, DZ)
or perhaps something else?
Yes, I like
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.
Comments
#1
so instead of
one would write
or
or perhaps something else?
#2
Yes, I like
mxMultiGroupObjective(MZ, DZ)
most of all, but with the proviso that the first argument is a list:
to allow something like
as the default, with, e.g.,
for alternatives. Obviously dimension of weights would have to agree with length of list.
#3
I wrote an implementation in C today.
#4
Joshua has implemented, tested, and documented this.