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: 8117843533230.33, 17189.0437510837, 5900.50337567902, -24353530532870.1

Beginning fit attempt 1 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: 8117843533236.21, 17189.1825087162, 5900.58848236629, -24353530532887.7

Beginning fit attempt 2 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: 8117446193207.77, 17189.1497961627, 5900.59474230019, -24352338512802.6

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

 Lowest minimum so far:  21994.5743437688
 OpenMx status code 6 not in list of acceptable status codes, (0,0)
 Not all eigenvalues of the Hessian are positive: 8081745379588.64, 14082.593852885, 6651.5407641715, -24245236067695.5

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

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

 Fit attempt worse than current best:  22092.8159384325 vs 21994.5743437688

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

 Fit attempt worse than current best:  22092.8159384325 vs 21994.5743437688

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

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

 Fit attempt worse than current best:  22092.8159384326 vs 21994.5743437688

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

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

 Fit attempt worse than current best:  22092.8159384325 vs 21994.5743437688

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:
-5.29602722235535e-08,0.706927478580154,0.00183692976525409,0.706930205731242
Running drop_a with 3 parameters

Beginning initial fit attempt
Running drop_a with 3 parameters

 Lowest minimum so far:  22699.0155309413
 OpenMx status code 6 not in list of acceptable status codes, (0,0)
 Not all eigenvalues of the Hessian are positive: 6105587017030.07, 13006.5959345729, -22786360891307.3

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: 6154822076770.3, 13006.4305194878, -22970108635771.4

Beginning fit attempt 2 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: 6105733549935.63, 13006.562338449, -22786907759555.7

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

 Fit attempt worse than current best:  35486.7457822032 vs 22699.0155309413

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

 Lowest minimum so far:  22699.0155309411
 OpenMx status code 6 not in list of acceptable status codes, (0,0)
 Not all eigenvalues of the Hessian are positive: 6154968609686.57, 13006.4731978565, -22970655504059.9

Beginning fit attempt 5 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: 6105293951190.07, 13006.4319622679, -22785267154702.3

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

 Fit attempt worse than current best:  34956.5653035113 vs 22699.0155309411

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: 6105733549937.86, 13006.4386687922, -22786907759564.1

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: 6105587017021.82, 13006.4837591323, -22786360891276.4

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

 Fit attempt worse than current best:  36771.631542077 vs 22699.0155309411

Beginning fit attempt 10 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: 3003924787873.53, 13006.5017214927, -11210799864177.7

Retry limit reached



 Retry limit reached; Best fit=22699.016 (started at 25153.739)  (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.05147666710662e-08,3.16964326469534e-07,0.999749917925984
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.5477988272 vs 20174.8414520721

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

 Fit attempt worse than current best:  29647.1189178065 vs 20174.8414520721

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

 Fit attempt worse than current best:  28503.9411744623 vs 20174.8414520721

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

 Fit attempt worse than current best:  27365.759202804 vs 20174.8414520721

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

 Fit attempt worse than current best:  20266.5478054399 vs 20174.8414520721

Beginning fit attempt 5 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: 7324858657999.93, 30688.0375751691, 2475.14315835068, -21974575868298.5

Beginning fit attempt 6 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 7 of at maximum 10 extra tries
Running ACE with 4 parameters

 Fit attempt worse than current best:  20266.5478004462 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.5478049532 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: 7324671197641.04, 30688.007046901, 2475.12769495195, -21974013487221.9

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: 3293898603474.8, 30688.0176119422, 2475.17244241921, -9881695704723.12

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:
-4.90073771383181e-08,0.706929991826007,0.547585563532409,0.447101729829311
Running drop_c with 3 parameters

Beginning initial fit attempt
Running drop_c with 3 parameters

 Fit attempt worse than current best:  22699.0155309414 vs 20408.3387777638

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

 Fit attempt worse than current best:  41609.6632921956 vs 20408.3387777638

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

 Fit attempt worse than current best:  42828.3925371246 vs 20408.3387777638

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

 Fit attempt worse than current best:  22699.0155309414 vs 20408.3387777638

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

 Fit attempt worse than current best:  22699.0155309357 vs 20408.3387777638

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

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

 Fit attempt worse than current best:  42078.5596672388 vs 20408.3387777638

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

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

 Fit attempt worse than current best:  28012.8791570334 vs 20408.3387777638

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

 Fit attempt worse than current best:  46493.9136995469 vs 20408.3387777638

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

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