Running examples in ‘umx-Ex.R’ failed
The error most likely occurred in:

> ### Name: power.ACE.test
> ### Title: Test the power of an ACE model to detect paths of interest.
> ### Aliases: power.ACE.test
> 
> ### ** Examples
> 
> 
> # ===============================================
> # = Power to detect a^2=.5 with equal MZ and DZ =
> # ===============================================
> power.ACE.test(AA = .5, CC = 0, update = "a") 
This is beta code: I likely will alter the interface!
Warning: In model 'drop_a' Optimizer returned a non-zero status code 6. The model does not satisfy the first-order optimality conditions to the required accuracy, and no improved point for the merit function could be found during the final linesearch (Mx status RED)
For 80% power, you need 5 MZ and 5 DZ pairs
   method = ncp
        n = 10
    power = 0.8
sig.level = 0.05
statistic = LRT
> # Suggests n = 84 MZ and 94 DZ pairs.
> 
> # ================================
> # = Show power across range of N =
> # ================================
> power.ACE.test(AA= .5, CC= 0, update = "a", search = TRUE)
This is beta code: I likely will alter the interface!
Warning: In model 'drop_a' Optimizer returned a non-zero status code 6. The model does not satisfy the first-order optimality conditions to the required accuracy, and no improved point for the merit function could be found during the final linesearch (Mx status RED)
     N     power lower upper
1   68 0.2527548    NA    NA
2   97 0.3387609    NA    NA
3  127 0.4232452    NA    NA
4  156 0.4990226    NA    NA
5  186 0.5704155    NA    NA
6  215 0.6323162    NA    NA
7  245 0.6890179    NA    NA
8  274 0.7370188    NA    NA
9  304 0.7800923    NA    NA
10 333 0.8159042    NA    NA
11 363 0.8475326    NA    NA
12 392 0.8734572    NA    NA
13 421 0.8953717    NA    NA
14 451 0.9143768    NA    NA
15 480 0.9296981    NA    NA
16 510 0.9428569    NA    NA
17 539 0.9533703    NA    NA
18 569 0.9623254    NA    NA
19 598 0.9694253    NA    NA
20 628 0.9754296    NA    NA
> 
> # Salutary note: You need well fitting models with correct betas in the data
> # for power to be valid.
> # tryHard helps ensure this, as does the default nSim= 4000 pair data.
> # Power is important to get right, so I recommend using tryHard = "yes"
> power.ACE.test(AA= .5, CC= 0, update = "a", tryHard= "yes")
This is beta code: I likely will alter the interface!
Running ACE with 4 parameters

Beginning initial fit attempt
Running ACE with 4 parameters

 Lowest minimum so far:  22092.8159384326
 OpenMx status code 6 not in list of acceptable status codes, (0,0)
 Not all eigenvalues of the Hessian are positive: 8184397988088.61, 17189.0437512205, 5900.50337571961, -24553193897445

Beginning fit attempt 1 of at maximum 10 extra tries
Running ACE with 4 parameters
 OpenMx status code 6 not in list of acceptable status codes, (0,0)
 Not all eigenvalues of the Hessian are positive: 192501811545.937, 17189.0458966827, 5900.50401215437, -64167248241.6953

Beginning fit attempt 2 of at maximum 10 extra tries
Running ACE with 4 parameters
 OpenMx status code 6 not in list of acceptable status codes, (0,0)
 Not all eigenvalues of the Hessian are positive: 4010748869739.11, 17189.1064140892, 5900.49682663247, -12032246542396.5

Beginning fit attempt 3 of at maximum 10 extra tries
Running ACE with 4 parameters
 OpenMx status code 6 not in list of acceptable status codes, (0,0)
 Not all eigenvalues of the Hessian are positive: 592447638521.711, 17189.0920180667, 5900.55159776145, -197482523900.281

Beginning fit attempt 4 of at maximum 10 extra tries
Running ACE with 4 parameters

 Lowest minimum so far:  21994.5743443757
 OpenMx status code 6 not in list of acceptable status codes, (0,0)
 Not all eigenvalues of the Hessian are positive: 4086193748386.03, 14055.9117884791, 6590.10977999373, -12258581173867

Beginning fit attempt 5 of at maximum 10 extra tries
Running ACE with 4 parameters

 Fit attempt worse than current best:  22092.8159384326 vs 21994.5743443757

Beginning fit attempt 6 of at maximum 10 extra tries
Running ACE with 4 parameters

 Fit attempt worse than current best:  22092.8159384326 vs 21994.5743443757

Beginning fit attempt 7 of at maximum 10 extra tries
Running ACE with 4 parameters

 Fit attempt worse than current best:  22699.0155309382 vs 21994.5743443757

Beginning fit attempt 8 of at maximum 10 extra tries
Running ACE with 4 parameters

 Lowest minimum so far:  21994.5743437988
 OpenMx status code 6 not in list of acceptable status codes, (0,0)
 Not all eigenvalues of the Hessian are positive: 387930355.670207, 14075.3700859855, 6635.9856848875, -1163719939.32248

Beginning fit attempt 9 of at maximum 10 extra tries
Running ACE with 4 parameters

 Lowest minimum so far:  21994.5743437975
 OpenMx status code 6 not in list of acceptable status codes, (0,0)
 Not all eigenvalues of the Hessian are positive: 4125114045985.77, 14075.6972371002, 6636.03362816141, -12375342066831

Beginning fit attempt 10 of at maximum 10 extra tries
Running ACE with 4 parameters

 Lowest minimum so far:  21994.5743437975
 OpenMx status code 6 not in list of acceptable status codes, (0,0)
 Not all eigenvalues of the Hessian are positive: 8081159577062.21, 14075.7691939908, 6636.09936949221, -24243478660060.3

Retry limit reached



 Retry limit reached; Best fit=21994.574 (started at 22414.561)  (11 attempt(s): 11 valid, 0 errors)


 Uncertain solution found - consider parameter validity, try again, increase extraTries, change inits, change model, or check data!

 Start values from best fit:
4.35025731504873e-09,0.706923628518186,0.00284705586810198,0.706930729669784
Running drop_a with 3 parameters

Beginning initial fit attempt
Running drop_a with 3 parameters

 Lowest minimum so far:  22092.8159384326
 OpenMx status code 6 not in list of acceptable status codes, (0,0)
 Not all eigenvalues of the Hessian are positive: 175308246333.813, 13604.4870946278, -46973672751.4069

Beginning fit attempt 1 of at maximum 10 extra tries
Running drop_a with 3 parameters
 OpenMx status code 6 not in list of acceptable status codes, (0,0)
 Not all eigenvalues of the Hessian are positive: 2936357236282.74, 13604.5438080964, -10958634281972.1

Beginning fit attempt 2 of at maximum 10 extra tries
Running drop_a with 3 parameters

 Fit attempt worse than current best:  22699.015530936 vs 22092.8159384326

Beginning fit attempt 3 of at maximum 10 extra tries
Running drop_a with 3 parameters

 Fit attempt worse than current best:  22699.0155309412 vs 22092.8159384326

Beginning fit attempt 4 of at maximum 10 extra tries
Running drop_a with 3 parameters

 Fit attempt worse than current best:  27074.5958758345 vs 22092.8159384326

Beginning fit attempt 5 of at maximum 10 extra tries
Running drop_a with 3 parameters

 Fit attempt worse than current best:  22507.3378630607 vs 22092.8159384326

Beginning fit attempt 6 of at maximum 10 extra tries
Running drop_a with 3 parameters

 Fit attempt worse than current best:  22699.0155309387 vs 22092.8159384326

Beginning fit attempt 7 of at maximum 10 extra tries
Running drop_a with 3 parameters

 Fit attempt worse than current best:  22699.0155309402 vs 22092.8159384326

Beginning fit attempt 8 of at maximum 10 extra tries
Running drop_a with 3 parameters

 Lowest minimum so far:  22092.8159384325

Solution found




 Solution found!  Final fit=22092.816 (started at 25153.594)  (9 attempt(s): 9 valid, 0 errors)

 Start values from best fit:
-5.5021998912792e-08,0.612219317473,0.790371709474687
For 80% power, you need 166 MZ and 166 DZ pairs
   method = ncp
        n = 333
    power = 0.8
sig.level = 0.05
statistic = LRT
> 
> # =====================
> # = Power to detect C =
> # =====================
> 
> # 102 of each of MZ and DZ pairs for 80% power.
> power.ACE.test(AA= .5, CC= .3, update = "c", tryHard= "yes")
This is beta code: I likely will alter the interface!
Running ACE with 4 parameters

Beginning initial fit attempt
Running ACE with 4 parameters

 Lowest minimum so far:  19935.2075053042
 OpenMx status code 6 not in list of acceptable status codes, (0,0)
 Not all eigenvalues of the Hessian are positive: 3858216689449.83, 30688.0132747231, 2475.14477218674, -11574649962648.3

Beginning fit attempt 1 of at maximum 10 extra tries
Running ACE with 4 parameters

Solution found




 Solution found!  Final fit=19935.208 (started at 20174.841)  (2 attempt(s): 2 valid, 0 errors)

 Start values from best fit:
-4.71671879815816e-08,0.706929985840092,0.547585578344345,0.447101731092727
Running drop_c with 3 parameters

Beginning initial fit attempt
Running drop_c with 3 parameters
 OpenMx status code 6 not in list of acceptable status codes, (0,0)

Beginning fit attempt 1 of at maximum 10 extra tries
Running drop_c with 3 parameters

 Lowest minimum so far:  20015.8223706492
 OpenMx status code 6 not in list of acceptable status codes, (0,0)
 Not all eigenvalues of the Hessian are positive: 5430434831221.96, 27764.8678517967, -20266658543282.8

Beginning fit attempt 2 of at maximum 10 extra tries
Running drop_c with 3 parameters

 Lowest minimum so far:  20015.8223706488
 OpenMx status code 6 not in list of acceptable status codes, (0,0)
 Not all eigenvalues of the Hessian are positive: 5517265047184.13, 27764.8147417405, -20590713320885.7

Beginning fit attempt 3 of at maximum 10 extra tries
Running drop_c with 3 parameters

Solution found




 Solution found!  Final fit=20015.822 (started at 20408.339)  (4 attempt(s): 4 valid, 0 errors)

 Start values from best fit:
1.87481384521797e-09,0.881661986703553,0.436315080819436
For 80% power, you need 203 MZ and 203 DZ pairs
   method = ncp
        n = 406
    power = 0.8
sig.level = 0.05
statistic = LRT
> 
> # ========================================
> # = Set 'a' to a fixed, but non-zero value =
> # ========================================
> 
> power.ACE.test(update= "a", value= sqrt(.2), AA= .5, CC= 0)
This is beta code: I likely will alter the interface!
Warning: In model 'ACE' Optimizer returned a non-zero status code 6. The model does not satisfy the first-order optimality conditions to the required accuracy, and no improved point for the merit function could be found during the final linesearch (Mx status RED)
Warning: In model 'drop_a' Optimizer returned a non-zero status code 6. The model does not satisfy the first-order optimality conditions to the required accuracy, and no improved point for the merit function could be found during the final linesearch (Mx status RED)
For 80% power, you need 62 MZ and 62 DZ pairs
   method = ncp
        n = 124
    power = 0.8
sig.level = 0.05
statistic = LRT
> # TODO get power.ACE.test to print the value of A in the null model.
> 
> # ========================================
> # = Drop More than one parameter (A & C) =
> # ========================================
> # E vs AE: the hypothesis that twins show no familial similarity.
> power.ACE.test(update = "a_after_dropping_c", AA= .5, CC= .3)
This is beta code: I likely will alter the interface!
Warning: In model 'ACE' Optimizer returned a non-zero status code 6. The model does not satisfy the first-order optimality conditions to the required accuracy, and no improved point for the merit function could be found during the final linesearch (Mx status RED)
Warning: In model 'drop_a_after_dropping_c' Optimizer returned a non-zero status code 6. The model does not satisfy the first-order optimality conditions to the required accuracy, and no improved point for the merit function could be found during the final linesearch (Mx status RED)
Error in mxPowerSearch(trueModel, falseModel, probes = probes, gdFun = gdFun,  : 
  falseModel fit better than trueModel?
Calls: power.ACE.test -> mxPower -> mxPowerSearch
Execution halted