Running ‘AAAtest-all.R’ [184s/207s]
Running the tests in ‘tests/AAAtest-all.R’ failed.
Complete output:
  > if (require("testthat")) {
  +     pkg <- "glmmTMB"
  +     require(pkg, character.only=TRUE)
  +     print(sessionInfo())
  +     test_check(pkg, reporter="summary")
  +     print(warnings()) # TODO? catch most of these by expect_warning(..)
  + } else {
  +     warnings("Package 'testthat' not available, cannot run unit tests for package",
  + 	     sQuote(pkg))
  + }
  Loading required package: testthat
  Loading required package: glmmTMB
  R version 4.1.3 RC (2022-03-02 r81853)
  Platform: x86_64-pc-linux-gnu (64-bit)
  Running under: Debian GNU/Linux bookworm/sid
  
  Matrix products: default
  BLAS:   /home/hornik/tmp/R.check/r-patched-gcc/Work/build/lib/libRblas.so
  LAPACK: /home/hornik/tmp/R.check/r-patched-gcc/Work/build/lib/libRlapack.so
  
  locale:
   [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
   [3] LC_TIME=en_US.UTF-8        LC_COLLATE=C              
   [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
   [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
   [9] LC_ADDRESS=C               LC_TELEPHONE=C            
  [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       
  
  attached base packages:
  [1] stats     graphics  grDevices utils     datasets  methods   base     
  
  other attached packages:
  [1] glmmTMB_1.1.2.3 testthat_3.1.2 
  
  loaded via a namespace (and not attached):
   [1] Rcpp_1.0.8          TMB_1.8.0           magrittr_2.0.2     
   [4] splines_4.1.3       MASS_7.3-55         xtable_1.8-4       
   [7] lattice_0.20-45     R6_2.5.1            rlang_1.0.2        
  [10] multcomp_1.4-18     minqa_1.2.4         grid_4.1.3         
  [13] nlme_3.1-155        TH.data_1.1-0       cli_3.2.0          
  [16] coda_0.19-4         emmeans_1.7.2       survival_3.3-1     
  [19] lme4_1.1-28         numDeriv_2016.8-1.1 brio_1.1.3         
  [22] Matrix_1.4-0        nloptr_2.0.0        codetools_0.2-18   
  [25] sandwich_3.0-1      estimability_1.3    compiler_4.1.3     
  [28] boot_1.3-28         mvtnorm_1.1-3       zoo_1.8-9          
  Anova: ..............
  VarCorr: WWWWWWWWWWWWWW1
  altopt: 
  alternative optimizers: S
  basics: W.........2...SS.....SW3W4.5WW6.S
  trickier examples: SS.SSSS....
  bootMer: 
  bootMer: SS
  control: SS
  disp: ...
  downstream: 
  emmeans: .............
  effects: ..
  edgecases: 
  test edge cases: 7
  env: 
  basic examples: ...
  families: 
  alternative binomial specifications: WWWW..........
  non-integer count warnings: .......
  fitting exotic families: SSSSS
  trunc compois: S
  compois: S
  genpois: S
  tweedie: S.
  link function info available: ............
  link info added to family: ...
  formulas: 
  formula parsing: ................
  mapopt: 
  methods: 
  basic methods: .............89..abcde...Wf.S..............g...................
  simulate consistency with glm/lm: ...
  Ranef etc.: .......S...........
  offset: 
  offsets: SSSSSSSS
  predict: h....SSS
  Predict two-column response case: SSWW.......WWWW..i
  reml: 
  REML: j
  rr: ........Wk
  saveload: 
  Saving and loading glmmTMB objects: .
  sparseX: 
  sparse X models: Wlm.no..
  start: ..
  utils: .............
  varstruc: 
  variance structures: ........SSS
  weight: 
  weight: WWWWWWWWWWpqWWWWWWWWWWr
  zi: 
  ZI models: SS
  
  ══ Skipped ═════════════════════════════════════════════════════════════════════
  1. downstream methods work with optim() (test-altopt.R:11:3) - Reason: On CRAN
  
  2. Update Gaussian (test-basics.R:67:3) - Reason: On CRAN
  
  3. Variance structures (test-basics.R:76:3) - Reason: On CRAN
  
  4. Multiple RE, reordering (test-basics.R:106:6) - Reason: On CRAN
  
  5. close to lme4 results (test-basics.R:141:5) - Reason: On CRAN
  
  6. basic zero inflation (test-basics.R:194:8) - Reason: On CRAN
  
  7. alternative binomial model specifications (test-basics.R:212:5) - Reason: On CRAN
  
  8. NA handling (test-basics.R:233:5) - Reason: On CRAN
  
  9. quine NB fit (test-basics.R:251:5) - Reason: On CRAN
  
  10. contrasts arg (test-basics.R:262:5) - Reason: On CRAN
  
  11. zero disp setting (test-basics.R:273:5) - Reason: On CRAN
  
  12. Bernoulli responses (test-bootMer.R:11:3) - Reason: On CRAN
  
  13. binomial responses (test-bootMer.R:21:5) - Reason: On CRAN
  
  14. profile method (test-control.R:16:3) - Reason: On CRAN
  
  15. parallel regions (test-control.R:50:3) - Reason: On CRAN
  
  16. beta (test-families.R:90:3) - Reason: On CRAN
  
  17. nbinom (test-families.R:112:5) - Reason: On CRAN
  
  18. dbetabinom (test-families.R:167:5) - Reason: On CRAN
  
  19. truncated (test-families.R:240:5) - Reason: On CRAN
  
  20. truncated_genpois (test-families.R:317:3) - Reason: On CRAN
  
  21. truncated_compois (test-families.R:334:5) - Reason: On CRAN
  
  22. compois (test-families.R:345:5) - Reason: On CRAN
  
  23. genpois (test-families.R:356:5) - Reason: On CRAN
  
  24. tweedie (test-families.R:365:5) - Reason: On CRAN
  
  25. anova ML/REML checks (test-methods.R:115:5) - Reason: On CRAN
  
  26. various binomial response types work (test-methods.R:398:3) - Reason: On CRAN
  
  27. LM with offset as argument (test-offset.R:29:3) - Reason: On CRAN
  
  28. LM with offset in formula (test-offset.R:37:5) - Reason: On CRAN
  
  29. LM with offset in formula - variable not in environment (test-offset.R:50:5) - Reason: On CRAN
  
  30. LM with offset in dispersion formula (test-offset.R:59:5) - Reason: On CRAN
  
  31. LM with multiple offsets (cond/dispersion) (test-offset.R:67:5) - Reason: On CRAN
  
  32. LM with random crap in the formula (test-offset.R:76:5) - Reason: On CRAN
  
  33. offset in do.call (test-offset.R:83:5) - Reason: On CRAN
  
  34. LONG offset in do.call (test-offset.R:92:5) - Reason: On CRAN
  
  35. new levels of fixed effect factor (test-predict.R:40:5) - Reason: On CRAN
  
  36. new levels in RE term (test-predict.R:47:5) - Reason: On CRAN
  
  37. new levels in AR1 (OK) (test-predict.R:54:5) - Reason: On CRAN
  
  38. two-column response (test-predict.R:64:5) - Reason: On CRAN
  
  39. Prediction with dispformula=~0 (test-predict.R:72:5) - Reason: On CRAN
  
  40. ar1 requires factor time (test-varstruc.R:52:3) - Reason: On CRAN
  
  41. varcorr_print (test-varstruc.R:72:5) - Reason: On CRAN
  
  42. cov_struct_order (test-varstruc.R:98:5) - Reason: On CRAN
  
  43. zi (test-zi.R:12:3) - Reason: On CRAN
  
  44. zi beta and Gamma (test-zi.R:37:5) - Reason: On CRAN
  
  ══ Warnings ════════════════════════════════════════════════════════════════════
  1. (code run outside of `test_that()`) (test-VarCorr.R:8:1) - NA/NaN function evaluation
  
  2. (code run outside of `test_that()`) (test-VarCorr.R:8:1) - NA/NaN function evaluation
  
  3. (code run outside of `test_that()`) (test-VarCorr.R:8:1) - NA/NaN function evaluation
  
  4. (code run outside of `test_that()`) (test-VarCorr.R:8:1) - NA/NaN function evaluation
  
  5. (code run outside of `test_that()`) (test-VarCorr.R:8:1) - NA/NaN function evaluation
  
  6. (code run outside of `test_that()`) (test-VarCorr.R:8:1) - NA/NaN function evaluation
  
  7. (code run outside of `test_that()`) (test-VarCorr.R:8:1) - NA/NaN function evaluation
  
  8. (code run outside of `test_that()`) (test-VarCorr.R:8:1) - NA/NaN function evaluation
  
  9. (code run outside of `test_that()`) (test-VarCorr.R:8:1) - NA/NaN function evaluation
  
  10. (code run outside of `test_that()`) (test-VarCorr.R:8:1) - NA/NaN function evaluation
  
  11. (code run outside of `test_that()`) (test-VarCorr.R:8:1) - NA/NaN function evaluation
  
  12. (code run outside of `test_that()`) (test-VarCorr.R:8:1) - NA/NaN function evaluation
  
  13. (code run outside of `test_that()`) (test-VarCorr.R:8:1) - NA/NaN function evaluation
  
  14. (code run outside of `test_that()`) (test-VarCorr.R:8:1) - NA/NaN function evaluation
  
  15. (code run outside of `test_that()`) (test-basics.R:39:1) - Model convergence problem; non-positive-definite Hessian matrix. See vignette('troubleshooting')
  
  16. Alternative family specifications [via update(.)] (???) - Model convergence problem; non-positive-definite Hessian matrix. See vignette('troubleshooting')
  
  17. Alternative family specifications [via update(.)] (???) - Model convergence problem; non-positive-definite Hessian matrix. See vignette('troubleshooting')
  
  18. Update Binomial (???) - Model convergence problem; non-positive-definite Hessian matrix. See vignette('troubleshooting')
  
  19. Update Binomial (???) - Model convergence problem; false convergence (8). See vignette('troubleshooting')
  
  20. binomial (test-families.R:23:5) - Model convergence problem; non-positive-definite Hessian matrix. See vignette('troubleshooting')
  
  21. binomial (test-families.R:23:5) - Model convergence problem; false convergence (8). See vignette('troubleshooting')
  
  22. binomial (???) - Model convergence problem; non-positive-definite Hessian matrix. See vignette('troubleshooting')
  
  23. binomial (???) - Model convergence problem; false convergence (8). See vignette('troubleshooting')
  
  24. drop1 (test-methods.R:104:7) - Model convergence problem; non-positive-definite Hessian matrix. See vignette('troubleshooting')
  
  25. (code run outside of `test_that()`) (???) - Model convergence problem; non-positive-definite Hessian matrix. See vignette('troubleshooting')
  
  26. (code run outside of `test_that()`) (???) - Model convergence problem; non-positive-definite Hessian matrix. See vignette('troubleshooting')
  
  27. (code run outside of `test_that()`) (test-predict.R:108:1) - Model convergence problem; non-positive-definite Hessian matrix. See vignette('troubleshooting')
  
  28. (code run outside of `test_that()`) (test-predict.R:108:1) - Model convergence problem; false convergence (8). See vignette('troubleshooting')
  
  29. (code run outside of `test_that()`) (???) - Model convergence problem; non-positive-definite Hessian matrix. See vignette('troubleshooting')
  
  30. (code run outside of `test_that()`) (???) - Model convergence problem; false convergence (8). See vignette('troubleshooting')
  
  31. rr eigenvalues (test-rr.R:93:9) - NA/NaN function evaluation
  
  32. basic fits (???) - Model convergence problem; non-positive-definite Hessian matrix. See vignette('troubleshooting')
  
  33. Weights can be an argument (test-weight.R:35:5) - NA/NaN function evaluation
  
  34. Weights can be an argument (test-weight.R:35:5) - NA/NaN function evaluation
  
  35. Weights can be an argument (test-weight.R:35:5) - NA/NaN function evaluation
  
  36. Weights can be an argument (test-weight.R:35:5) - NA/NaN function evaluation
  
  37. Weights can be an argument (test-weight.R:35:5) - NA/NaN function evaluation
  
  38. Weights can be an argument (test-weight.R:35:5) - NA/NaN function evaluation
  
  39. Weights can be an argument (test-weight.R:35:5) - NA/NaN function evaluation
  
  40. Weights can be an argument (test-weight.R:35:5) - NA/NaN function evaluation
  
  41. Weights can be an argument (test-weight.R:35:5) - NA/NaN function evaluation
  
  42. Weights can be an argument (test-weight.R:35:5) - NA/NaN function evaluation
  
  43. (code run outside of `test_that()`) (test-weight.R:55:1) - NA/NaN function evaluation
  
  44. (code run outside of `test_that()`) (test-weight.R:55:1) - NA/NaN function evaluation
  
  45. (code run outside of `test_that()`) (test-weight.R:55:1) - NA/NaN function evaluation
  
  46. (code run outside of `test_that()`) (test-weight.R:55:1) - NA/NaN function evaluation
  
  47. (code run outside of `test_that()`) (test-weight.R:55:1) - NA/NaN function evaluation
  
  48. (code run outside of `test_that()`) (test-weight.R:55:1) - NA/NaN function evaluation
  
  49. (code run outside of `test_that()`) (test-weight.R:55:1) - NA/NaN function evaluation
  
  50. (code run outside of `test_that()`) (test-weight.R:55:1) - NA/NaN function evaluation
  
  51. (code run outside of `test_that()`) (test-weight.R:55:1) - NA/NaN function evaluation
  
  52. (code run outside of `test_that()`) (test-weight.R:55:1) - NA/NaN function evaluation
  
  ══ Failed ══════════════════════════════════════════════════════════════════════
  ── 1. Error (test-VarCorr.R:8:1): (code run outside of `test_that()`) ──────────
  Error in `eigen(h)`: infinite or missing values in 'x'
  Backtrace:
   1. glmmTMB::glmmTMB(distance ~ age + (age | Subject), data = Orthodont)
        at test-VarCorr.R:8:0
   2. glmmTMB::fitTMB(TMBStruc)
   3. base::eigen(h)
  
  ── 2. Failure (test-basics.R:56:5): Basic Gaussian Sleepdata examples ──────────
  fixef(fm2)$cond not equal to fixef(fm1)$cond.
  2/2 mismatches (average diff: 151)
  [1]  8.72 - 251.4 == -243
  [2] 69.51 -  10.5 ==   59
  
  ── 3. Failure (test-basics.R:119:5): Alternative family specifications [via upda
  `gm0` not equal to `res_chr`.
  Component "fit": Component "par": Mean relative difference: 2.92192
  Component "fit": Component "objective": Mean relative difference: 0.1734178
  Component "fit": Component "iterations": Mean relative difference: 1.181818
  Component "fit": Component "evaluations": Mean relative difference: 1.222222
  Component "fit": Component "parfull": Mean relative difference: 1.439409
  Component "sdr": Component "par.fixed": Mean relative difference: 2.92192
  Component "sdr": Component "cov.fixed": Mean relative difference: 62.62031
  Component "sdr": Component "pdHess": 1 element mismatch
  Component "sdr": Component "gradient.fixed": Mean relative difference: 47.87122
  ...
  
  ── 4. Failure (test-basics.R:120:5): Alternative family specifications [via upda
  `gm0` not equal to matchForm(gm0, update(gm0, family = binomial()), fn = TRUE).
  Component "fit": Component "par": Mean relative difference: 2.92192
  Component "fit": Component "objective": Mean relative difference: 0.1734178
  Component "fit": Component "iterations": Mean relative difference: 1.181818
  Component "fit": Component "evaluations": Mean relative difference: 1.222222
  Component "fit": Component "parfull": Mean relative difference: 1.439409
  Component "sdr": Component "par.fixed": Mean relative difference: 2.92192
  Component "sdr": Component "cov.fixed": Mean relative difference: 62.62031
  Component "sdr": Component "pdHess": 1 element mismatch
  Component "sdr": Component "gradient.fixed": Mean relative difference: 47.87122
  ...
  
  ── 5. Failure (test-basics.R:124:5): Alternative family specifications [via upda
  `gm0` not equal to `res_list`.
  Component "fit": Component "par": Mean relative difference: 2.92192
  Component "fit": Component "objective": Mean relative difference: 0.1734178
  Component "fit": Component "iterations": Mean relative difference: 1.181818
  Component "fit": Component "evaluations": Mean relative difference: 1.222222
  Component "fit": Component "parfull": Mean relative difference: 1.439409
  Component "sdr": Component "par.fixed": Mean relative difference: 2.92192
  Component "sdr": Component "cov.fixed": Mean relative difference: 62.62031
  Component "sdr": Component "pdHess": 1 element mismatch
  Component "sdr": Component "gradient.fixed": Mean relative difference: 47.87122
  ...
  
  ── 6. Failure (test-basics.R:131:3): Update Binomial ───────────────────────────
  `gm1` not equal to matchForm(gm1, gm1u, fn = TRUE).
  Component "fit": Component "par": Mean relative difference: 1.766488
  Component "fit": Component "objective": Mean relative difference: 0.1698966
  Component "fit": Component "convergence": Mean absolute difference: 1
  Component "fit": Component "iterations": Mean relative difference: 0.6470588
  Component "fit": Component "evaluations": Mean relative difference: 0.8333333
  Component "fit": Component "message": 1 string mismatch
  Component "fit": Component "parfull": Mean relative difference: 2.011674
  Component "sdr": Component "par.fixed": Mean relative difference: 1.766488
  Component "sdr": Component "cov.fixed": Mean relative difference: 6.751637
  ...
  
  ── 7. Error (test-edgecases.R:9:5): profiling failure ──────────────────────────
  Error in `(function (start, objective, gradient = NULL, hessian = NULL, 
      ..., scale = 1, control = list(), lower = -Inf, upper = Inf) 
  {
      par <- setNames(as.double(start), names(start))
      n <- length(par)
      iv <- integer(78 + 3 * n)
      v <- double(130 + (n * (n + 27))/2)
      .Call(C_port_ivset, 2, iv, v)
      if (length(control)) {
          nms <- names(control)
          if (!is.list(control) || is.null(nms)) 
              stop("'control' argument must be a named list")
          pos <- pmatch(nms, names(port_cpos))
          if (any(nap <- is.na(pos))) {
              warning(sprintf(ngettext(length(nap), "unrecognized control element named %s ignored", 
                  "unrecognized control elements named %s ignored"), 
                  paste(sQuote(nms[nap]), collapse = ", ")), domain = NA)
              pos <- pos[!nap]
              control <- control[!nap]
          }
          ivpars <- pos <= 4
          vpars <- !ivpars
          if (any(ivpars)) 
              iv[port_cpos[pos[ivpars]]] <- as.integer(unlist(control[ivpars]))
          if (any(vpars)) 
              v[port_cpos[pos[vpars]]] <- as.double(unlist(control[vpars]))
      }
      obj <- quote(objective(.par, ...))
      rho <- new.env(parent = environment())
      assign(".par", par, envir = rho)
      grad <- hess <- low <- upp <- NULL
      if (!is.null(gradient)) {
          grad <- quote(gradient(.par, ...))
          if (!is.null(hessian)) {
              if (is.logical(hessian)) 
                  stop("logical 'hessian' argument not allowed.  See documentation.")
              hess <- quote(hessian(.par, ...))
          }
      }
      if (any(lower != -Inf) || any(upper != Inf)) {
          low <- rep_len(as.double(lower), length(par))
          upp <- rep_len(as.double(upper), length(par))
      }
      else low <- upp <- numeric()
      .Call(C_port_nlminb, obj, grad, hess, rho, low, upp, d = rep_len(as.double(scale), 
          length(par)), iv, v)
      iv1 <- iv[1L]
      list(par = get(".par", envir = rho), objective = v[10L], 
          convergence = (if (iv1 %in% 3L:6L) 0L else 1L), iterations = iv[31L], 
          evaluations = c(`function` = iv[6L], gradient = iv[30L]), 
          message = if (19 <= iv1 && iv1 <= 43) {
              if (any(B <- iv1 == port_cpos)) sprintf("'control' component '%s' = %g, is out of range", 
                  names(port_cpos)[B], v[iv1]) else sprintf("V[IV[1]] = V[%d] = %g is out of range (see PORT docu.)", 
                  iv1, v[iv1])
          } else port_msg(iv1))
  })(c(theta = 0, theta = 0, theta = 0), function (x = last.par[lfixed()], 
      ...) 
  {
      if (tracepar) {
          cat("par:\n")
          print(x)
      }
      if (!validpar(x)) 
          return(NaN)
      if (is.null(random)) {
          ans <- f(x, order = 0)
          if (!ADreport) {
              if (is.finite(ans) && ans < value.best) {
                  last.par.best <<- x
                  value.best <<- ans
              }
          }
      }
      else {
          ans <- try({
              if (MCcontrol$doMC) {
                  ff(x, order = 0)
                  MC(last.par, n = MCcontrol$n, seed = MCcontrol$seed, 
                    order = 0)
              }
              else ff(x, order = 0)
          }, silent = silent)
          if (is.character(ans)) 
              ans <- NaN
      }
      ans
  }, function (x = last.par[lfixed()], ...) 
  {
      if (is.null(random)) {
          ans <- f(x, order = 1)
      }
      else {
          ans <- try({
              if (MCcontrol$doMC) {
                  ff(x, order = 0)
                  MC(last.par, n = MCcontrol$n, seed = MCcontrol$seed, 
                    order = 1)
              }
              else ff(x, order = 1)
          }, silent = silent)
          if (is.character(ans)) 
              ans <- rep(NaN, length(x))
      }
      if (tracemgc) 
          cat("outer mgc: ", max(abs(ans)), "\n")
      ans
  }, control = list(iter.max = 300, eval.max = 400))`: NA/NaN gradient evaluation
  Backtrace:
    1. testthat::expect_warning(...)
         at test-edgecases.R:9:4
    6. glmmTMB::glmmTMB(...)
    7. glmmTMB::fitTMB(TMBStruc)
    9. glmmTMB optfun()
   11. base::with.default(...)
   12. [ base::eval(...) ] with 1 more call
   15. stats `<fn>`(`<dbl>`, `<fn>`, `<fn>`, control = `<named list>`)
  
  ── 8. Failure (test-methods.R:72:5): Predict ───────────────────────────────────
  predict(fm2) not equal to predict(fm2, newdata = sleepstudy).
  180/180 mismatches (average diff: 3.85)
  [1] 254 - 239 == 14.731
  [2] 274 - 261 == 12.345
  [3] 293 - 283 ==  9.960
  [4] 313 - 305 ==  7.574
  [5] 332 - 327 ==  5.189
  [6] 352 - 349 ==  2.803
  [7] 371 - 371 ==  0.418
  [8] 391 - 393 == -1.968
  [9] 411 - 415 == -4.353
  ...
  
  ── 9. Failure (test-methods.R:77:5): Predict ───────────────────────────────────
  pr2se$fit not equivalent to predict(fm2).
  180/180 mismatches (average diff: 3.85)
  [1] 239 - 254 == -14.731
  [2] 261 - 274 == -12.345
  [3] 283 - 293 ==  -9.960
  [4] 305 - 313 ==  -7.574
  [5] 327 - 332 ==  -5.189
  [6] 349 - 352 ==  -2.803
  [7] 371 - 371 ==  -0.418
  [8] 393 - 391 ==   1.968
  [9] 415 - 411 ==   4.353
  ...
  
  ── 10. Failure (test-methods.R:80:5): Predict ──────────────────────────────────
  unname(pr2se$fit[1]) not equal to 254.2208.
  1/1 mismatches
  [1] 239 - 254 == -14.7
    ... and 17 more
  
  
  Maximum number of 10 failures reached, some test results may be missing.
  
  ══ DONE ════════════════════════════════════════════════════════════════════════
  Error: Test failures
  Execution halted