Multigroup Fit Function

mhunter's picture
Project:OpenMx
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:active
Description

We should have a multigroup fit function built in.

Comments

tbates's picture

#1

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?

neale's picture

#2

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.

jpritikin's picture

#3

I wrote an implementation in C today.