# Ordinal ACE model script is crashing R

18 posts / 0 new
Offline
Joined: 08/04/2009 - 16:08
Ordinal ACE model script is crashing R

Hi
I'm trying to get an ordinal ACE model working but it keeps crashing R.
I'm using OpenMx .5 R 2.10.1 under Windows 7 64 bit

Any suggestions would be greatly appreciated
thanks
s

Offline
Joined: 07/31/2009 - 15:10
Yikes. Anything crashing R is

Yikes.

Anything crashing R is likely a problem in the back-end.

Would it be possible to share the script and the data that's causing the crash? If it's not possible to share the data, simulated data that is also fine, as long as it still causes the crash.

A couple other checks:

• Are you getting an error message back from R before it crashes? If so, please post it here.
• Have you run any other scripts with the same install of OpenMx?
Try running some of the demos. If the demos have the same issue, it's likely a problem with your install or your system configuration. If other scripts run without problems, then it's more likely an OpenMx issue that your script has found, and something the development team should take a look at.
Offline
Joined: 08/04/2009 - 16:08
sorry - I meant to attach

sorry - I meant to attach the code
I'm using the inbuilt twinData dataset (which btw is actually QIMR data)
When I load up the model (prior to using the mxRun command) it parses without error - I can't see any issues in the actual model (although the code is a little bloated because it is a teaching example)
After I try to run there is an error message that pops up very fast saying there is an issue with the frontend and then I get the crash message (screen shot attached)

I have run many other scripts with this this install and all worked fine - I was teaching today and thought I'd give the script a go to see it was something to do with the RopenMxoperating system combinations. ~15/20 people in the class got the same crash. the others got an error message (I don't have a copy of the error but it refered to an incorrect index within the data(?) ) - the class were using personal laptops so we had a mix of pc and mac, most people were using R 2.11.1 and everyone was using openMx .5

sarah

Offline
Joined: 07/31/2009 - 15:24
The crash is caused by a

The crash is caused by a column of data that has continuous variables. When I remove the 'age' column from the dataset, the script will run. Tim and I need to figure out if the appropriate fix is to either (a) throw an error in the front-end if the data set contains a mix of continuous and ordinal variables, even in cases when the continuous variables are not used, or (b) just ignore the unused columns in the back-end.

Offline
Joined: 07/31/2009 - 15:10
These should be ignored in

These should be ignored in the back-end if they're not part of the covariance algebra. I'm currently testing a fix. This model should run using the next binary release.

smedland, do you mind if we add a variation of this script to our test set?

Offline
Joined: 07/31/2009 - 15:24
This has been fixed in OpenMx

This has been fixed in OpenMx 0.5.1

Offline
Joined: 07/21/2010 - 15:57
Hello, I almost got the same

Hello,

I almost got the same problem. I'm using OpenMX 0.5.2 with R-2.11.1 and trying to reproduce the results of Byrne and Goffin (1993) "Modeling MTMM Data from Additive and Multiplicative Covariance Structures: An Audit of Construct Validity Concordance." At mxModel part R crashes. With the old versions of both OpenMX and R, I reproduced the results. But R was used to crash with my own data. I thought this might me a bug in OpenMx, so I updated OpenMx and R and now even I couldn't run the program which ran with old OpenMx and R.

Any suggestions and guidelines will be highly appreciated. Thanks

With Best Regards!

Yours Sincerely,

MY

Offline
Joined: 07/31/2009 - 15:14
Sorry, it is almost

Sorry, it is almost impossible to help unless you attaching the script and data in question.

Offline
Joined: 07/21/2010 - 15:57
Thanks Prof. Neale for you

Thanks Prof. Neale for you notice and positive response. Attached are R Script and data for your consideration. With Mx and the old versions of R and OpenMx, I was able to reproduce the results of Byrne and Goffin (1993). But when I tried the same model with my own data, R was used to crash.

Then I updated OpenMx and R and now even I couldn't able to reproduce the results of Byrne and Goffin (1993) and R crashed at mxRun part of the script.

I'm new to SEM and to me OpenMx seems more easy and simple than Mx. I have to implement the methodology of Byrne and Goffin (1993), Three-Mode Factor Analysis (3FA) and Stochastic Three-Mode Models (S3MMs) of Oort (1999). I'd highly appreciate your help to accomplish this. Thanks

With Kind Regards!

Yours Sincerely,

P.S. English isn't my first language, please forgive me if I made any mistake. Thanks

Offline
Joined: 07/31/2009 - 15:24
I can reproduce this crash

I can reproduce this crash under Windows with R 2.10.1 and OpenMx 0.9.2. I'll run the script under valgrind.

Offline
Joined: 07/21/2010 - 15:57
Thanks Prof. Neale for your

Thanks Prof. Neale for your understanding.

Highly Appreciated

With Best Regards!

Yours Sincerely,

Offline
Joined: 07/21/2010 - 15:57
Thanks Mr. MSPIEGEL for your

Thanks Mr. MSPIEGEL for your understanding.

Any suggestions will be highly Appreciated. Thanks

With Best Regards!

Yours Sincerely,

Offline
Joined: 07/31/2009 - 15:10
I think I've located the

I think I've located the problem--it's actually two bugs bumping into one another.

The first bug causes the ML Objective to raise an error when processing data of type 'cor'. I've implemented a fix; the latest source revision (r1422) has it, and with it both scripts run successfully.

The crash is actually due to a bug in the error reporting system that is triggered by the first bug. This issue is a bit more intricate. Luckily, without the first bug, the second isn't triggered. So even while we're working on fixing the second bug, you should be able to run your scripts without any problems.

Thanks to both of you for reporting this issue.

Is it alright if we add these scripts to our test suite to prevent similar issues from happening in the future?
If you have correct estimates, likelihoods, etc., please post them so that we can make the test more complete.

Thank you again.

Offline
Joined: 07/21/2010 - 15:57
Yes, Sure you can use my

Yes, Sure you can use my script to your test suite.

I'd appreciate if you could suggest me what I should do to fix this problem on my machine.

Any suggestions will be highly appreciated. Thanks

With Kind Regards!

Yours Sincerely,

Offline
Joined: 07/31/2009 - 15:10
The easiest workaround for

The easiest workaround for now is to change your mxData statement to use type="cov", which will avoid triggering the bug. You don't need to adjust the data itself, since a correlation matrix is a special case of a covariance matrix. I apologize; I should have mentioned this workaround when I posted the bugfix.

The error will be fixed in the next binary release, which should be out fairly soon. Once the new binary arrives, you should be able to use type="cor" without issues.

If you need type="cor" working sooner, you can get a fixed update before then by building OpenMx from source (see the page HOWTO build OpenMx from the source repository for instructions).

Thank you again for finding this bug and for the use of your test case; support from the user community really helps the project move forward.

Offline
Joined: 07/21/2010 - 15:57
Thanks a lot tbrick. I really

Thanks a lot tbrick. I really appreciate your help. Thanks again.

MY

Offline
Joined: 07/21/2010 - 15:57
Thanks a lot tbrick for your

Thanks a lot tbrick for your help and suggestions. Following your suggestions I was able to reproduce the results of Byrne and Goffin (1993). But when I tried with my own data R again crashed. Any suggestion will be highly appreciated. Thanks

With Kind Regards!

Yours Sincerely,

MY

Offline
Joined: 07/31/2009 - 15:10
Double-check your data type. If you're using data with type="cor" it's likely the same bug. Try the same workaround--changing it to type="cov" should avoid triggering the bug.