Running ‘testthat.R’ [489s/529s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > test_check("BMhyb")
  Loading required package: BMhyb
  [1] "Now starting analysis"
  [1] "Starting with initial values"
     sigma.sq          mu          SE          bt          vh 
  0.117682960 2.118832288 0.007956494 1.000000000 0.007956494 
    Nelder-Mead direct search function minimizer
  function value for initial parameters = 24.088800
    Scaled convergence tolerance is 2.41888
  Stepsize computed as 0.211883
  BUILD              6 29.371482 24.088800
  HI-REDUCTION       8 26.889548 24.088800
  Exiting from Nelder Mead minimizer
      10 function evaluations used
          step    negloglik     sigma.sq           mu           SE           bt 
   1.000000000 24.088800143  0.117682960  2.118832288  0.007956494  1.000000000 
            vh 
   0.007956494 
    Nelder-Mead direct search function minimizer
  function value for initial parameters = 24.088800
    Scaled convergence tolerance is 2.41888
  Stepsize computed as 0.211883
  BUILD              6 29.371482 24.088800
  HI-REDUCTION       8 26.889548 24.088800
  Exiting from Nelder Mead minimizer
      10 function evaluations used
          step    negloglik     sigma.sq           mu           SE           bt 
   2.000000000 24.088800143  0.117682960  2.118832288  0.007956494  1.000000000 
            vh 
   0.007956494 
    Nelder-Mead direct search function minimizer
  function value for initial parameters = 23.936703
    Scaled convergence tolerance is 2.40367
  Stepsize computed as 0.195482
  BUILD              6 29.118155 23.932020
  HI-REDUCTION       8 26.770931 23.932020
  Exiting from Nelder Mead minimizer
      10 function evaluations used
  [1] "New improvement found, resetting step counter"
          step    negloglik     sigma.sq           mu           SE           bt 
   3.000000000 23.932020061  0.127658257  2.150305894  0.008502963  0.929616341 
            vh 
   0.008716891 
    Nelder-Mead direct search function minimizer
  function value for initial parameters = 24.061305
    Scaled convergence tolerance is 2.41613
  Stepsize computed as 0.179845
  BUILD              6 28.801636 23.863388
  HI-REDUCTION       8 26.623416 23.863388
  Exiting from Nelder Mead minimizer
      10 function evaluations used
  [1] "New improvement found, resetting step counter"
         step   negloglik    sigma.sq          mu          SE          bt 
   4.00000000 23.86338756  0.12975030  1.97829857  0.00898335  0.89694835 
           vh 
   0.00932222 
    Nelder-Mead direct search function minimizer
  function value for initial parameters = 24.006442
    Scaled convergence tolerance is 2.41064
  Stepsize computed as 0.186433
  BUILD              6 29.019701 23.883731
  HI-REDUCTION       8 26.766887 23.883731
  Exiting from Nelder Mead minimizer
      10 function evaluations used
         step   negloglik    sigma.sq          mu          SE          bt 
   5.00000000 23.86338756  0.12975030  1.97829857  0.00898335  0.89694835 
           vh 
   0.00932222 
    Nelder-Mead direct search function minimizer
  function value for initial parameters = 23.844090
    Scaled convergence tolerance is 2.39441
  Stepsize computed as 0.197818
  BUILD              6 29.321204 23.840633
  HI-REDUCTION       8 26.931505 23.840633
  LO-REDUCTION      10 26.333988 23.711544
  Exiting from Nelder Mead minimizer
      12 function evaluations used
  [1] "New improvement found, resetting step counter"
         step   negloglik    sigma.sq          mu          SE          bt 
   6.00000000 23.71154423  0.08682227  2.02763559  0.05865888  0.88958009 
           vh 
   0.05817563 
    Nelder-Mead direct search function minimizer
  function value for initial parameters = 23.902649
    Scaled convergence tolerance is 2.40026
  Stepsize computed as 0.198847
  BUILD              6 29.416734 23.902649
  HI-REDUCTION       8 27.027496 23.902649
  LO-REDUCTION      10 26.430250 23.747866
  Exiting from Nelder Mead minimizer
      12 function evaluations used
         step   negloglik    sigma.sq          mu          SE          bt 
   7.00000000 23.71154423  0.08682227  2.02763559  0.05865888  0.88958009 
           vh 
   0.05817563 
    Nelder-Mead direct search function minimizer
  function value for initial parameters = 23.909086
    Scaled convergence tolerance is 2.40091
  Stepsize computed as 0.208579
  BUILD              6 29.555789 23.909086
  HI-REDUCTION       8 27.085369 23.909086
  LO-REDUCTION      10 26.403289 23.909086
  Exiting from Nelder Mead minimizer
      12 function evaluations used
         step   negloglik    sigma.sq          mu          SE          bt 
   8.00000000 23.71154423  0.08682227  2.02763559  0.05865888  0.88958009 
           vh 
   0.05817563 
  [1] "100 of 100 done"
  [1] "Now starting analysis"
  [1] "Starting with initial values"
    sigma.sq         mu         SE         bt         vh 
  14.2614366 -0.3325722  0.1426144  1.0000000  0.1426144 
    Nelder-Mead direct search function minimizer
  function value for initial parameters = 12.708571
    Scaled convergence tolerance is 1.28086
  Stepsize computed as 1.426144
  Exiting from Nelder Mead minimizer
      6 function evaluations used
        step  negloglik   sigma.sq         mu         SE         bt         vh 
   1.0000000 12.3065873 14.2614366 -0.3325722  1.5687580  1.0000000  0.1426144 
    Nelder-Mead direct search function minimizer
  function value for initial parameters = 12.306587
    Scaled convergence tolerance is 1.24066
  Stepsize computed as 1.426144
  Exiting from Nelder Mead minimizer
      6 function evaluations used
        step  negloglik   sigma.sq         mu         SE         bt         vh 
   2.0000000 12.3065873 14.2614366 -0.3325722  1.5687580  1.0000000  0.1426144 
    Nelder-Mead direct search function minimizer
  ── 1. Error: Simulation works (@test_condition.R#31)  ──────────────────────────
  non-finite value supplied by optim
  Backtrace:
   1. BMhyb::BMhyb(...)
   2. BMhyb:::OptimizeThoroughly(...)
   3. stats::optim(...)
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  [ OK: 12 | SKIPPED: 0 | WARNINGS: 11 | FAILED: 1 ]
  1. Error: Simulation works (@test_condition.R#31) 
  
  Error: testthat unit tests failed
  Execution halted