Error message when using mxRowObjective
Posted on

Forums
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
Hi Jocilyn, The script did
Hi Jocilyn,
The script did not come through. Could you try attaching it again?
Cheers,
Steve
Log in or register to post comments
In reply to Hi Jocilyn, The script did by Steve
Sorry about that, here are
Sorry about that, here are the files.
Cheers,
Jocilyn
Log in or register to post comments
In reply to Sorry about that, here are by jdellava
That looks like an error in
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
Log in or register to post comments
I'll take a look at the
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.
Log in or register to post comments
In reply to I'll take a look at the by mspiegel
Thanks for the clarification,
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.
Log in or register to post comments
In reply to Thanks for the clarification, by Ryne
Thank you for the help. I
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
Log in or register to post comments
In reply to Thank you for the help. I by jdellava
The script needs to be
The script needs to be altered in the following way to get it to run. It does crash.
Log in or register to post comments
Hi all, Thank you for the
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
Log in or register to post comments
In reply to Hi all, Thank you for the by jdellava
We're working on it.
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.
Log in or register to post comments
In reply to We're working on it. by mspiegel
The crash has been fixed.
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
Log in or register to post comments
In reply to The crash has been fixed. by mspiegel
Thank you!
Thank you!
Log in or register to post comments