mxTryHard status codes
Posted on
Rachel
Joined: 02/08/2012
Forums
Dear all,
I have been running a model within a loop over several variables, which does not converge well for all variables. Therefore, I applied mxTryHard. There are two things I noticed:
1) for models that run well without calling mxTryHard the best fit does not seem to change using mxTryHard, but the status code changes from 0 to -1
> fit1 <- mxRun(model,intervals =F)
> fit1$output$Minus2LogLikelihood
[1] 4595.342
> fit1$output$status
$code
[1] 0
$status
[1] 0
fit2<-mxTryHard(model,intervals=F)
> fit2$output$Minus2LogLikelihood
[1] 4595.342
fit2$output$status
$code
[1] -1
$status
[1] 0
2) even when I set "intervals=F" (like in the example above) the mxTryHard option computes intervals.
Can you help?
Thanks in advance
Thanks Rachel. The first bug
Log in or register to post comments
Thank you!
Log in or register to post comments
Expirience same problem
I experience the same status code = -1 problem in case of any model I run with mxTryHard, be it a model that results in "Solution found", or a model that results: "OpenMx status code 1 greater than 0; Not all eigenvalues of hessian are greater than 0; Retry limit reached, "
I'm running OpenMx version: 2.3.1 [GIT v2.3.1], R version: R version 3.2.1 (2015-06-18), Platform: x86_64-w64-mingw32, Default optimiser: NPSOL, installed from the website.
Does this mean both models converged (MxStatus Green)?
Log in or register to post comments
In reply to Expirience same problem by martonandko
Status code = -1 means
mxTryHard()
?Log in or register to post comments
In reply to Status code = -1 means by AdminRobK
Thanks for having a look at
Limiting the extra runs to 1 to supress output (output the same for 10 extra runs), mxTryHard returns:
Begin fit attempt 1 of at maximum 2 tries
Lowest minimum so far: 461.211751950297
Not all eigenvalues of hessian are greater than 0: 559.193020473922, 486.393117628652, 204.302637390566, 187.97870749209, 174.565171935069, 127.448215232486, 34.6394063711714, 4.85183481710131, 1.37182372473253, -0.127544032337779
Begin fit attempt 2 of at maximum 2 tries
Lowest minimum so far: 461.211751950279
OpenMx status code 1 greater than 0
Not all eigenvalues of hessian are greater than 0: 559.192121639248, 486.392579488029, 204.304599125184, 187.979472270581, 174.565930769942, 127.448041794442, 34.6396697751378, 4.8521695638418, 1.37244146991232, -0.126964546464526
Retry limit reached
Estimate confidence intervals for imperfect solution
Start values from best fit:
0.767557125047236,0.169527920231489,0.414497889243009,0.543614188916936,0.728527002372227,0.505322379565154,0.118637216479181,-0.0932594170628762,1,1
@output$status returns:
$code
[1] -1
$status
[1] 0
In case of a model where it says, solution found:
Begin fit attempt 1 of at maximum 11 tries
Lowest minimum so far: 461.211751950294
OpenMx status code 1 greater than 0
Begin fit attempt 2 of at maximum 11 tries
Lowest minimum so far: 461.211751950276
OpenMx status code 1 greater than 0
Begin fit attempt 3 of at maximum 11 tries
Lowest minimum so far: 461.211751950274
Solution found
Estimating confidence intervals
Start values from best fit:
0.767557199351073,0.169527720018016,0.414497827985777,0.543614118267592,0.728526940730898,0.505322361547715,0.11863739923075,-0.0932593099645859,1
But the status is the same as the previuos model:
$code
[1] -1
$status
[1] 0
Log in or register to post comments
In reply to Thanks for having a look at by martonandko
status code is probably spurious
I think the status code of -1 is spurious, and due to a bug.
Log in or register to post comments
In reply to status code is probably spurious by AdminRobK
Is there a work around?
Two other interesting things, which might be bugs is:
-if I rerun a fitted model, which was fitted with mxTryHard with the simple mxRun command, the status code stays -1 for all models.
-if I don't include the "intervals = T" command in the mxTryHard command, and rerun the fitted model with the simple mxRun command with the "intervals = T" command, then it doesn't calculate the confidence intervals.
Log in or register to post comments
In reply to Is there a work around? by martonandko
Thanks for pointing these
Log in or register to post comments
In reply to Expirience same problem by martonandko
Any chance you can supply a
Log in or register to post comments