Copyright © 2007-2024 The OpenMx Project
Here's a test .rda file containing a model, along with an accompanying script to add a CI to this model, and estimate it with NPSOL and with CSOLNP
The behaviors are very different: NPSOL code reds on the model, but computes the CIs where they should be.
CSOLNP says everything is fine, but returns miniscule CIs - sometimes it's even out of order.
The direct link to the attached model is
https://openmx.ssri.psu.edu/sites/default/files/issues/m1.txt
mxVersion() OpenMx version: 2.0.0.3952 R version: R version 3.1.2 (2014-10-31) Platform: x86_64-apple-darwin13.4.0 Default optimiser: CSOLNP # ===================== # = Set opt to NPSOL = # ===================== mxOption(NULL, "Default optimizer", "NPSOL") # Add a CI, and estimate it... x = mxModel(m1, mxCI("DepressionII_with_heart_disease")) # NPSOL code reds, but the CI looks fine x = mxRun(x, intervals = T); summary(x)$CI # lbound estimate ubound note # DepressionII_with_heart_disease 0.1022891 0.1346589 0.1687101 # ==================== # = Switch optimizer = # ==================== mxOption(NULL, "Default optimizer", "CSOLNP") x = mxModel(m1, mxCI("DepressionII_with_heart_disease")) x = mxRun(x, intervals = T); summary(x)$CI # CSOLNP claims to run fine, but the CIs are near (but not quite) identical to each other and miles out. # DepressionII_with_heart_disease 0.1346571 0.1346638 0.1346748
Attachment | Size |
---|---|
m1.txt [1] | 17.66 KB |
CSOLNP_CI_fail.R [2] | 941 bytes |