In fitting a bivariate threshold model using a definition variable, OpenMx converged but the final result gave the following predicted covariance matrix

InitT1 InitT2

InitT1 1.00000 1.48088

InitT2 1.48088 1.00000

Obviously not positive definite. Yet I did not get any warnings or errors.

Script and data attached.

Greg

Attachment | Size |
---|---|

curiousProblem.R | 1.99 KB |

dz.csv | 1.58 KB |

PS Could the problem be in omxMnor? Add the following line to the code in my previous post:

omxMnor(preCov, c(0, 0), c(-Inf, -Inf), c(t, t))

I believe this is a bug. omxMnor() seems to know what to do with correlation matrices only. I don't know what it is doing otherwise. Nor am I sure what it is doing with the non-pd input.

The following do check out ok against classic Mx. I suspect that a) OpenMx only pays attention to the triangle below the diagonal of the covariance matrix (second example); and b) that it does something to curtail out-of-range values for the correlation so that optimization doesn't come to a grinding halt. I've logged a bug report: http://openmx.psyc.virginia.edu/issue/2013/02/omxmnor-problem

and also fixed a couple of minor errors in the example script (reading & mxFactoring the data)

I don't see anything wrong with the standardization code (in omxAlgebraFunctions.c) called before the call to SADMVN to get the integral:

Any fix soon? Bet many users struggling with IFAIL=6 messages for threshold models will appreciate it while (shudder) some with models that converged may have to redo their (shudder even more, published) results.

In the interim, suggest using constraints to make certain the matrix is pd.