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

 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: 8117644863214.86, 17189.0376727628, 5900.51429950484, -24352934522823.6

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: 8117255219194.57, 17189.144820786, 5900.62689947337, -24351765590763

Beginning fit attempt 2 of at maximum 10 extra tries
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: 3845055226249.24, 17189.1685439692, 5900.58929453368, -11535165611927

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: 8117644863215.54, 17189.0496797824, 5900.51451108928, -24352934522825.8

Beginning fit attempt 4 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: 8181613459191.11, 17189.0951320298, 5900.53741802449, -24544840310752.5

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

 Fit attempt worse than current best:  23417.714552631 vs 22092.8159384326

Beginning fit attempt 6 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: 8184596658102.78, 17189.1279191519, 5900.47071583683, -24553789907487.5

Beginning fit attempt 7 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: 8117843533231.02, 17189.1943873268, 5900.61882479893, -24353530532872.2

Beginning fit attempt 8 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: 8184596658093.37, 17189.162596237, 5900.56441829728, -24553789907459.2

Beginning fit attempt 9 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: 8117453889208.47, 17189.1370030849, 5900.57779044191, -24352361600804.6

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

 Lowest minimum so far:  22092.8159384325
 OpenMx status code 6 not in list of acceptable status codes, (0,0)
 Not all eigenvalues of the Hessian are positive: 3845643554785.67, 17188.9663836085, 5900.42228277867, -11536930597536.1

Retry limit reached



 Retry limit reached; Best fit=22092.816 (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:
-5.45109060271456e-08,4.18802217910595e-08,0.612219319633955,0.790371749297771
Running drop_a with 3 parameters

Beginning initial fit attempt
Running drop_a with 3 parameters

 Fit attempt worse than current best:  22699.0155307495 vs 22092.8159384325

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

 Fit attempt worse than current best:  22699.0155309413 vs 22092.8159384325

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

 Fit attempt worse than current best:  35486.7455520466 vs 22092.8159384325

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

 Fit attempt worse than current best:  22699.0155309413 vs 22092.8159384325

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

 Fit attempt worse than current best:  22699.0155309406 vs 22092.8159384325

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

 Fit attempt worse than current best:  22699.0155309414 vs 22092.8159384325

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

 Fit attempt worse than current best:  41608.7547497086 vs 22092.8159384325

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

 Fit attempt worse than current best:  41551.371347739 vs 22092.8159384325

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

 Fit attempt worse than current best:  22699.0155309414 vs 22092.8159384325

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

 Fit attempt worse than current best:  22699.0155309413 vs 22092.8159384325

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

 Fit attempt worse than current best:  23007.7730918615 vs 22092.8159384325

Retry limit reached



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

For 80% power, you need 18 MZ and 18 DZ pairs
   method = ncp
        n = 36
    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.5478053702 vs 20174.841452072

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: 3356510362711.12, 30688.0159813997, 2475.14115148767, -10069530982432.2

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 generated errors

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

 Fit attempt worse than current best:  20266.5478054013 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.5478054381 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.5478053554 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

 Fit attempt worse than current best:  20266.5478052878 vs 19935.2075053042

Beginning fit attempt 9 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: 7380006541116.89, 30688.0040078615, 2475.10941814647, -22140019517649.3

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: 7325046118358.53, 30688.1106320077, 2475.21521255285, -21975138249374.3

Retry limit reached



 Retry limit reached; Best fit=19935.208 (started at 20174.841)  (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:
-9.04957072657167e-09,0.706929946071967,0.547585658368459,0.447101731522759
Running drop_c with 3 parameters

Beginning initial fit attempt
Running drop_c with 3 parameters

 Fit attempt worse than current best:  22699.0155309222 vs 20408.3390114429

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

 Fit attempt worse than current best:  22699.0155309414 vs 20408.3390114429

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

 Fit attempt worse than current best:  34278.9440068344 vs 20408.3390114429

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

 Fit attempt worse than current best:  45527.7902779181 vs 20408.3390114429

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

 Fit attempt worse than current best:  22699.0155309413 vs 20408.3390114429

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

 Fit attempt worse than current best:  22699.0155309414 vs 20408.3390114429

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

 Fit attempt worse than current best:  35746.73559664 vs 20408.3390114429

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

 Fit attempt worse than current best:  22699.0155309414 vs 20408.3390114429

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

 Fit attempt worse than current best:  29774.2973076237 vs 20408.3390114429

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

 Fit attempt worse than current best:  28836.8212255907 vs 20408.3390114429

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

 Fit attempt worse than current best:  22699.0155309413 vs 20408.3390114429

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