You are here

Does it really take that long?

5 posts / 0 new
Last post
Julia's picture
Offline
Joined: 03/29/2012 - 09:40
Does it really take that long?

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

Ryne's picture
Offline
Joined: 07/31/2009 - 15:12
It can take this long,

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.

Julia's picture
Offline
Joined: 03/29/2012 - 09:40
Thank you so so much for this

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!

neale's picture
Offline
Joined: 07/31/2009 - 15:14
Parallel?

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.
mspiegel's picture
Offline
Joined: 07/31/2009 - 15:24
To echo Ryne's comment, use

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