You are here

How to perform df correction for constraint groups?

4 posts / 0 new
Last post
trinewa's picture
Offline
Joined: 11/30/2009 - 06:35
How to perform df correction for constraint groups?

Hi
In old Mx I used the following command to make a correction in degrees of freedom for equality constraint groups:
opt df=-18 ! df correction for each constrained group: (nvar*nvar+1)/2

How would this be performed in OpenMx?

Ryne's picture
Offline
Joined: 07/31/2009 - 15:12
OpenMx does adjust degrees of

OpenMx does adjust degrees of freedom for constraints and equalities. When the same label is given multiple places, it is only counted as one parameter. When mxConstraint is used to constrain parameters, 1 parameter is deducted from the number of parameters (thus adding 1 to the model degrees of freedom). Use summary() to take a look at degrees of freedom; no message will be given for equalities made through labels, but there should be a message in the summary regarding constraints.

Is that what you were asking?

mspiegel's picture
Offline
Joined: 07/31/2009 - 15:24
See ?summary for some manual

See ?summary for some manual tuning of the summary function. Currently, it is possible to specify an explicit number of number of observations for the model ('numObs') and specify an explicit number of observed statistics for the model ('numStats'). Maybe we need a third knob for specifying another explicit value.

neale's picture
Offline
Joined: 07/31/2009 - 15:14
Classic Mx's option was

Classic Mx's option was useful for adjusting degrees of freedom when, for example, the user had accidentally specified too many constraints in a constraint group (such as might be the case with a matrix constraint with a necessarily symmetric result). However, in that case, the correction should be nvar*(nvar-1)/2 but without seeing the specific application I can't say whether 18 is the correct amount or not. Likely the script is quite old, because one can make use of the \vech operator in Classic Mx to select only elements on the diagonal or below. And #define syntax might be used to pre-compute the quantity once nvar is #defined.

But to answer your question, it looks as though the number of statistics might be deflated to correct for the specification of redundant constraints. Much better would be to use the \vech equivalent in OpenMx so that the correction isn't necessary. Nevertheless, these are both hacks to some extent, and I agree with mspiegel that having another knob for df looks like it would be useful.