Multi-group constraints in saturated model

2 replies [Last post]
pgseye's picture
Offline
Joined: 10/13/2009

Hi,

I don't know if I'm missing something basic here, but how does one apply constraints on means and variances across more than 2 groups (mxConstraint only accepts 2 arguments) in a saturated model, ie across sex and zygosity groups?

My data is setup such:

mzfData <- subset(twinsib.wide, ZygosityNumber ==1, selVars)
mzmData <- subset(twinsib.wide, ZygosityNumber ==2, selVars)
dzfData <- subset(twinsib.wide, ZygosityNumber ==3, selVars)
dzmData <- subset(twinsib.wide, ZygosityNumber ==4, selVars)
dzfmData <- subset(twinsib.wide, ZygosityNumber ==5, selVars)
dzmfData <- subset(twinsib.wide, ZygosityNumber ==6, selVars)

multiTwinSatModel <- mxModel("multiTwinSat",
mxModel("MZF",
...
),
mxModel("MZM",
...
),
mxModel("DZF",
...
),
etc...
),

I haven't nested individual models by zygosity or sex.

Thank you.

Paul

tbates's picture
Offline
Joined: 07/31/2009
to constrain several

to constrain several different objects to be equal to each other, you would need to specify the constraint for each object:
mxConstraint(a==b)
mxConstraint(a==c)
mxConstraint(a==d)

An alternative would be to insert the same object into each subModel
so
MZM means = top.means
DZM means = top.means
MZF means = top.means
...

pgseye's picture
Offline
Joined: 10/13/2009
ah ha... Thanks Tim, I feel a

ah ha...

Thanks Tim,

I feel a little silly.