Does it really take that long?

Posted on
Picture of user. Julia Joined: 03/29/2012
Hello.

I am running an OpenMx under 32-bit Windows (since as I understand it is not possible to do it under 64-bit?). My data file contains appr. 30000 twin pairs, and I am running a bivariate common sex-spesific ACE model with two moderators. It seems like either I have written a very slow script (although parameter estimates are reasonable) or it is just too many parameters to estimate (110 in a saturated model). It was taking so much time that in order to verify that my script actually works, I took only 1000 twin pairs for the analysis. But even then it takes appr. 2.5 h to run a saturated model! Is it normal with this number of parameters or it sounds like a mistake in the script? If former, is there a way to speed up the process?

Thank you beforehand.
Julia

Replied on Thu, 04/26/2012 - 11:30
Picture of user. Ryne Joined: 07/31/2009

It can take this long, especially with lots and lots of raw data. The easiest speed-up is to use covariance matrices, which will be difficult if you're including moderators via definition variables. You can also turn off the calculation of the Hessian matrix. This is used to generate standard errors at the end of optimization. This is a very time-intensive process, and you can disable it in the mxRun command if all you want is the overall model fit.
Replied on Fri, 04/27/2012 - 07:38
Picture of user. Julia Joined: 03/29/2012

In reply to by Ryne

Thank you so so much for this suggestion! Now it takes only 10-15 min for the whole dataset:) An improvement is still desired, but I will try it in Linux in order to be able to use more RAM. Thanks again!
Replied on Tue, 05/22/2012 - 21:49
Picture of user. neale Joined: 07/31/2009

In reply to by Julia

The other way to speed things up is parallel processing. I don't know whether this is switched on in your case, or not? This option might speed things up:

mxOption(NULL, "Number of Threads", omxDetectCores() - 1)

- it will assign as many threads as there are available, less one just to keep the system happy.
Replied on Thu, 04/26/2012 - 11:40
Picture of user. mspiegel Joined: 07/31/2009

To echo Ryne's comment, use mxOption() to disable standard errors and calculated Hessian:
model <- mxOption(model, "Standard Errors", "No")
model <- mxOption(model, "Calculate Hesian", "No")

In addition, if you model is taking a long time to run, they I would recommend turning on checkpointing: http://openmx.psyc.virginia.edu/docs/OpenMx/latest/File_Checkpointing.html