Set the Optimizer using umx_set_optimizer
As of version 2.0, OpenMx has 3 optimizers:
SLSQP (the default).
NPSOL doesn’t ship on the CRAN version of OpenMx (it’s proprietary). It is, however, highly optimized and works well with the vast majority of models. If you’re having hassles with mxRun, or CIs, NPSOL might help.
CSOLNP can work well for ordinal models.
SLSQP has the benefit of working out of the box from CRAN, and is often as good or better than
You can see what optimizer is being used by calling
umx_set_optimizer with no parameters.
umx_set_optimizer() # SLSQP
Set the optimizer by name:
umx_set_optimizer("CSOLNP") umx_set_optimizer() # "CSOLNP"
See all options by asking for something that doesn’t exist:
umx_set_optimizer("tinkerbell") # The Optimizer 'tinkerbell' is not legal. Legal values (from mxAvailableOptimizers() ) are:'CSOLNP' and 'SLSQP'
If, as above, you don’t see
NPSOL as an option and want to use it (or parallel processing), grab the custom UVA version of
How to enable NPSOL
- Grab the NPSOL version of OpemMx with this command:
That’s it :-)