Error message when using mxRowObjective

Posted on
Picture of user. jdellava Joined: 10/14/2009

Hi All,

I am trying to fit the alternate forms comorbidity model with raw data. When I run the script (attached) I get the following error message:

Error: The entity 'MZExpectedFrequency' in model 'MZ' generated the error message: 'lbound' must have length equal to diag(covariance).

Any suggestions?

Cheers,
Jocilyn

Replied on Tue, 09/14/2010 - 12:53
Picture of user. Ryne Joined: Jul 31, 2009

In reply to by jdellava

That looks like an error in the omxMnor call. If I'm reading your code right, your expected covariance and means matrices are for four variables, while your lower and upper bounds are for two variables. I haven't messed around with the GenEpi library enough to be absolutely sure, but it appears that omxMnor requires that the lengths of the mean, lbound and ubound vectors be equal to the number of rows (and columns) in the covariance matrix. The error showed up as an error in the mxAlgebra call 'MZExpectedFrequencies' because the GenEpi functions are helper functions outside of the core OpenMx library, so they evaluated as part of the algebra. Change the lbound and ubound arguments in omxMnor to nvar*2 and you should be fine.

Hope this helps.

ryne

Replied on Tue, 09/14/2010 - 13:57
Picture of user. mspiegel Joined: Jul 31, 2009

I'll take a look at the script later today. But to respond to an earlier post, omxMnor is one of the matrix functions supported by mxAlgebra() expressions: http://openmx.psyc.virginia.edu/wiki/matrix-operators-and-functions.

Replied on Tue, 09/14/2010 - 14:10
Picture of user. Ryne Joined: Jul 31, 2009

In reply to by mspiegel

Thanks for the clarification, and apologies for the error. I was able to replicate the error message using just the omxMnor function, which can be fixed by supplying the same dimensionality to the lbound and ubound vectors as the means vector. I didn't know that we had mxAlgebra expressions that could exist as objects outside of MxAlgebra objects, so I foolishly assumed that it was a GenEpi function. My mistake.

Replied on Mon, 09/20/2010 - 16:26
Picture of user. jdellava Joined: Oct 14, 2009

In reply to by Ryne

Thank you for the help. I made a few changes to the script (attached) and got the following:

Running AlternateForms

*** caught bus error ***
address 0x1, cause 'non-existent physical address'

Traceback:
1: .Call("callNPSOL", objective, startVals, constraints, matrices, parameters, algebras, data, intervalList, communication, options, state, PACKAGE = "OpenMx")
2: runHelper(model, frontendStart, intervals, silent, suppressWarnings, unsafe, checkpoint, useSocket, onlyFrontend)
3: mxRun(AltFormsModel)

Possible actions:
1: abort (with core dump, if enabled)
2: normal R exit
3: exit R without saving workspace
4: exit R saving workspace
Selection: summary(AltFormsRun)
Selection:

Any suggestions?

Thank you,
Jocilyn

Replied on Wed, 09/22/2010 - 07:52
Picture of user. jdellava Joined: Oct 14, 2009

Hi all,

Thank you for the help. The script still seems to generate the same error message when I run it. Are there any changes I can make to prevent the crash?

Cheers,
Jocilyn

Replied on Wed, 09/22/2010 - 10:25
Picture of user. mspiegel Joined: Jul 31, 2009

In reply to by jdellava

We're working on it. Evidence points to the presence of a definition variable that is triggering a bug. I imagine it would be difficult to transform the model into one without a definition variable. We'll find the bug within a few days from now.

Replied on Wed, 09/22/2010 - 16:59
Picture of user. mspiegel Joined: Jul 31, 2009

In reply to by mspiegel

The crash has been fixed. You can grab the latest version from the subversion repository, or wait until the next binary release. Subversion directions are here: http://openmx.psyc.virginia.edu/wiki/howto-build-openmx-source-repository