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 '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 27 MZ and 27 DZ pairs
   method = ncp
        n = 54
    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 '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)
     N     power lower upper
1   11 0.2523795    NA    NA
2   16 0.3437704    NA    NA
3   21 0.4302398    NA    NA
4   25 0.4946639    NA    NA
5   30 0.5684157    NA    NA
6   35 0.6342601    NA    NA
7   40 0.6922232    NA    NA
8   44 0.7331374    NA    NA
9   49 0.7778938    NA    NA
10  54 0.8161405    NA    NA
11  59 0.8485566    NA    NA
12  64 0.8758298    NA    NA
13  68 0.8943937    NA    NA
14  73 0.9140567    NA    NA
15  78 0.9303214    NA    NA
16  83 0.9437068    NA    NA
17  87 0.9526520    NA    NA
18  92 0.9619696    NA    NA
19  97 0.9695443    NA    NA
20 102 0.9756789    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

 Fit attempt generated errors

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

 Lowest minimum so far:  21994.5743438144
 OpenMx status code 6 not in list of acceptable status codes, (0,0)
 Not all eigenvalues of the Hessian are positive: 3826293134203.54, 14074.2532027119, 6632.72895103325, -11478879331472.2

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

 Fit attempt worse than current best:  22092.8159384325 vs 21994.5743438144

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

 Fit attempt worse than current best:  22092.8159384326 vs 21994.5743438144

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

 Fit attempt worse than current best:  22092.8159384326 vs 21994.5743438144

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.5743438144

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

 Fit attempt worse than current best:  22699.0155309381 vs 21994.5743438144

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

 Fit attempt worse than current best:  22092.8159384325 vs 21994.5743438144

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

 Fit attempt worse than current best:  22092.8159384325 vs 21994.5743438144

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

 Fit attempt worse than current best:  22092.8159384325 vs 21994.5743438144

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

 Fit attempt worse than current best:  22092.8159384326 vs 21994.5743438144

Retry limit reached



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


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

 Start values from best fit:
-4.81267118428631e-08,0.706923546372885,0.0030676595690846,0.70693066108981
Running drop_a with 3 parameters

Beginning initial fit attempt
Running drop_a with 3 parameters

 Lowest minimum so far:  22699.0155309401
 OpenMx status code 6 not in list of acceptable status codes, (0,0)
 Not all eigenvalues of the Hessian are positive: 6105587017021.49, 13006.4472825881, -22786360891275.1

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

 Lowest minimum so far:  22699.0155309401
 OpenMx status code 6 not in list of acceptable status codes, (0,0)
 Not all eigenvalues of the Hessian are positive: 6105733549937.77, 13006.4304848156, -22786907759563.7

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

 Lowest minimum so far:  22699.0155309147
 OpenMx status code 6 not in list of acceptable status codes, (0,0)
 Not all eigenvalues of the Hessian are positive: 6105733549939.13, 13006.3006144901, -22786907759568.5

Beginning fit attempt 3 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: 6105587017021.56, 13006.5608516888, -22786360891275.5

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

 Fit attempt worse than current best:  34203.1383342174 vs 22699.0155309147

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

 Fit attempt worse than current best:  34757.8012557382 vs 22699.0155309147

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

 Lowest minimum so far:  22699.0155309066
 OpenMx status code 6 not in list of acceptable status codes, (0,0)
 Not all eigenvalues of the Hessian are positive: 6154968609683.96, 13006.3464031309, -22970655504049.6

Beginning fit attempt 7 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: 6105733549928.94, 13006.3141863967, -22786907759530.2

Beginning fit attempt 8 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: 6105733549939.71, 13006.4964391899, -22786907759570.9

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

 Fit attempt worse than current best:  35459.2362398932 vs 22699.0155309066

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

 Fit attempt worse than current best:  32186.5333536433 vs 22699.0155309066

Retry limit reached



 Retry limit reached; Best fit=22699.016 (started at 25153.559)  (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:
9.7954555433706e-09,3.40449153680889e-06,0.999749921232996
For 80% power, you need 23 MZ and 23 DZ pairs
   method = ncp
        n = 46
    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

 Fit attempt worse than current best:  20266.5478053722 vs 20174.8414520721

Beginning fit attempt 1 of at maximum 10 extra tries
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: 7442993221064.84, 30688.0707934029, 2475.17697625519, -22328979557493.4

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

 Fit attempt worse than current best:  20266.5478054399 vs 19935.2075053042

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

 Fit attempt worse than current best:  20266.5478054399 vs 19935.2075053042

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

 Fit attempt worse than current best:  20266.5478054399 vs 19935.2075053042

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

 Fit attempt worse than current best:  20266.5478054399 vs 19935.2075053042

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

 Fit attempt worse than current best:  20266.5477972182 vs 19935.2075053042

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

 Fit attempt worse than current best:  20266.5478054399 vs 19935.2075053042

Beginning fit attempt 8 of at maximum 10 extra tries
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: 7325046118355.01, 30688.085260059, 2475.20730570018, -21975138249363.9

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

 Fit attempt worse than current best:  20266.5478054399 vs 19935.2075053042

Beginning fit attempt 10 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: 7325046118356.96, 30688.0035195664, 2475.13307678043, -21975138249369.6

Retry limit reached



 Retry limit reached; Best fit=19935.208 (started at 20174.841)  (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:
-7.27523996269777e-08,0.706929997966998,0.54758557447398,0.447101762515372
Running drop_c with 3 parameters

Beginning initial fit attempt
Running drop_c with 3 parameters

 Fit attempt worse than current best:  22699.015530923 vs 20408.3386827091

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

 Fit attempt worse than current best:  22699.0155309413 vs 20408.3386827091

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

 Fit attempt worse than current best:  41609.6633353106 vs 20408.3386827091

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

 Fit attempt worse than current best:  42828.3925842958 vs 20408.3386827091

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

 Fit attempt worse than current best:  27768.2947832917 vs 20408.3386827091

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

 Fit attempt worse than current best:  26230.3775654205 vs 20408.3386827091

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

 Fit attempt worse than current best:  34085.2051018662 vs 20408.3386827091

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

 Fit attempt worse than current best:  30889.2350126296 vs 20408.3386827091

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

 Fit attempt worse than current best:  27104.1848291066 vs 20408.3386827091

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

 Fit attempt worse than current best:  26358.5154419919 vs 20408.3386827091

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

 Fit attempt worse than current best:  22699.0155308157 vs 20408.3386827091

Retry limit reached



 All fit attempts resulted in errors - check starting values or model specification

For 80% power, you need 6 MZ and 6 DZ pairs
   method = ncp
        n = 12
    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 98 MZ and 98 DZ pairs
   method = ncp
        n = 197
    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