I found the source of the bug! I think you have a row of data that contains all missing values for the continuous data, and either missing or non-missing values for the ordinal data (I didn't check). If you have rows that have entirely missing data, you can remove them and the script will work. I'll hand over this bug to Tim, he has more experience with this code. Bug report http://openmx.psyc.virginia.edu/issue/2011/10/handle-row-missing-continu...

Congrats! You found a bug in OpenMx. We'll get right to fixing it, but we'll need a bit more information before we do.

What version of OpenMx are you running? You can just copy and paste the output of the mxVersion() command.

Could you include the lines above what you've listed? Specifically, wherever you set AFac, CFac, EFac, and selVars?

Is this a generated data set, or a real one? If it's generated, could you post it or the script that generates it? If it's real, could you run fakeData() on the dataset you are using and send us the result? The instructions for running fakeData() are here: http://openmx.psyc.virginia.edu/wiki/generating-simulated-data

If we can get those last few details, we'll do our best to fix the problem as quick as we can.

occurs. We can tell that this happened from the start because the number of evaluations is only 2:

> m1run$output$evaluations
[1]2

Hint to my fellow developers: It would be polite of OpenMx to notify the user that bad starting values appear to be the cause of the problem. This could be done whenever the following conditions hold: fit function is not definite, 2 evaluations, number of free parameters > 0.

Miraculously, diag(.6,2,2) for a and e, and diag(.1,2,2) for c are enough to get it going. Better is meanSVnv <- c(100,0). Some of the mxTryHard() iterates fail. I prefer a much smaller scale argument to mxTryHard(), such as scale =.05