Error in Obtaining Cis
Attachment | Size |
---|---|
Multi_ACE_Twin Nov 2016 By Gender Nov 10.R | 16.6 KB |
Table 1.pdf | 43.16 KB |
No SEs are suspect and the return code is zero.
However when I try the command:
FitCholMod <- mxRun(CholMod, intervals =TRUE)
It runs as before but I receive this error message.
Error in runHelper(model, frontendStart, intervals, silent, suppressWarnings, :
NLOPT fatal error -1
So the confidence intervals are not produced.
I have tried the other optimizes. With CSOLNP a number of SEs are suspect. With NPSOL MX returns a code of 1 and more SEs are suspect.
I can obtain CIs with a worse fitting (non-preferred) model with the SLSQP optimizer. The non-preferred model has a significantly worse fit than the full-Cholesky, so I don't want to use that model.
With other models, just MZ vs DZ and a cohort model (young MZ, old MZ, young DZ, old DZ) I can obtain CIs.
I have several suspicions:
* I don't have enough male dizygotic twins !!!!
* I should rescale the dependent variables (years of education is left as is 8-18, income have been divided by $10,000, but occupational status still ranges from 0-100). I could divide occupational status by 10.
*It did seem to work before I downloaded the new MX version but I am at all not certain that I was analyzing the same model.
Any suggestions?
CIs
Log in or register to post comments
In reply to CIs by jpritikin
CIs for Multivariate ACE
I tried to run the code from within R but got an error.
> source('https://github.com/OpenMx/OpenMx')
Error in source("https://github.com/OpenMx/OpenMx") :
https://github.com/OpenMx/OpenMx:5:1: unexpected '<'
4:
5: <
Should I try an earlier version of MX? I am not sure a how to do that.
Log in or register to post comments
In reply to CIs for Multivariate ACE by gary.marks@acu…
installing from GitHub
You'll need, for instance, a working compiler for fortran and C++. You can learn more here:
http://openmx.psyc.virginia.edu/wiki/howto-build-openmx-source-repository
It's fun, but a bit geeky. Alternatively, if you can share the model (just
save(CholMod, file = "CholMod.RData")
, a developer with the latest version could then check if you email the model file to them.Log in or register to post comments
Rescaling the variables might
mxTryHard()
in place ofmxRun()
; make sure you're passing argumentintervals=TRUE
no matter which of the two you're using.Log in or register to post comments
Custom compute plan
fitCholAce = mxRun(modelChol, intervals=F, onlyFrontend=T)
fitCholAce$compute$steps$CI$engine = "NPSOL"
fitCholAce$compute$.persist = TRUE
fitCholAce = mxRun(fitCholAce)
Note that
fitCholAce
, and any MxModel object derived from it, will thereafter always calculate confidence intervals, regardless of whether argumentintervals
isTRUE
orFALSE
. You can restore the usual behavior by running the MxModel after setting the compute plan's.persist
slot toFALSE
.Edit: Looks like R's main assignment operator is being parsed as an HTML tag(?) in forum posts right now...
Log in or register to post comments
Thanks I feel I am making
It's a good idea but I get an error after the MxRun command:
Error in (function (classes, fdef, mtable) :
unable to find an inherited method for function ‘assignId’ for signature ‘"list"’
I find the ML estimates for the SLSQP and CSOLNP optimizers are identical but they return status codes of zero and 6 respectively. When both produce CIs, for a straight MZ/DZ model they are also the same.
Log in or register to post comments
In reply to Thanks I feel I am making by gary.marks@acu…
intervals=TRUE
Ah, I bet the first call to
mxRun()
needs to haveintervals=T
, as infitCholAce <- mxRun(modelChol, intervals=F, onlyFrontend=T)
If that doesn't help, I'd be curious to see the
traceback()
for that error message.OK, that's encouraging.
Log in or register to post comments