Running ‘testthat.R’ [156s/91s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(mdgc)
  > 
  > test_check("mdgc")
  ══ Skipped tests ═══════════════════════════════════════════════════════════════
  ● On CRAN (1)
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Failure (test-get-log-lm-terms.R:78:3): 'get_log_lm_terms' gives the correct result with and without gradients ──
  `val` not equal to -45.8852616647973.
  1/1 mismatches
  [1] -92.4 - -45.9 == -46.5
  ── Failure (test-get-log-lm-terms.R:82:3): 'get_log_lm_terms' gives the correct result with and without gradients ──
  `val` not equal to -45.8852616647973.
  1/1 mismatches
  [1] NaN - -45.9 == NaN
  ── Failure (test-get-log-lm-terms.R:114:3): 'get_log_lm_terms' gives the correct result with and without gradients ──
  drop(c(attr(grad, "grad_vcov")) %*% jac) not equal to head(true_grad, -4).
  15/15 mismatches (average diff: 21)
  [1]   8.888 -   4.4439 ==   4.4439
  [2]  16.533 -   8.2665 ==   8.2665
  [3]   0.154 -   0.0771 ==   0.0771
  [4]   2.568 -   1.2839 ==   1.2839
  [5] -20.791 - -10.3954 == -10.3954
  [6]  -4.676 -  -0.4874 ==  -4.1881
  [7] -14.443 -   2.0320 == -16.4747
  [8]  39.586 -  -0.1059 ==  39.6916
  [9] -10.702 -  -5.2184 ==  -5.4836
  ...
  ── Failure (test-get-log-lm-terms.R:117:3): 'get_log_lm_terms' gives the correct result with and without gradients ──
  drop(attr(grad, "grad_mea")) not equal to tail(true_grad, 4).
  3/4 mismatches (average diff: 8.3)
  [2]  -4.52 - -2.26 ==  -2.26
  [3] -23.68 - -2.70 == -20.98
  [4]  -3.76 - -2.10 ==  -1.66
  ── Failure (test-get-log-lm-terms.R:123:3): 'get_log_lm_terms' gives the correct result with and without gradients ──
  drop(c(attr(grad, "grad_vcov")) %*% jac) not equal to head(true_grad, -4).
  15/15 mismatches (average diff: 2.34e+146)
  [1]   8.89e+00 -   4.4439 ==   4.44e+00
  [2]   1.65e+01 -   8.2665 ==   8.27e+00
  [3]   1.54e-01 -   0.0771 ==   7.71e-02
  [4]   2.57e+00 -   1.2839 ==   1.28e+00
  [5]  -2.08e+01 - -10.3954 ==  -1.04e+01
  [6]  4.67e+145 -  -0.4874 ==  4.67e+145
  [7]  1.55e+146 -   2.0320 ==  1.55e+146
  [8]   1.28e+01 -  -0.1059 ==   1.29e+01
  [9] -5.61e+146 -  -5.2184 == -5.61e+146
  ...
  ── Failure (test-get-log-lm-terms.R:126:3): 'get_log_lm_terms' gives the correct result with and without gradients ──
  drop(attr(grad, "grad_mea")) not equal to tail(true_grad, 4).
  3/4 mismatches (average diff: 3.7)
  [2]  -4.20 - -2.26 == -1.93
  [3] -10.20 - -2.70 == -7.50
  [4]  -3.76 - -2.10 == -1.66
  ── Failure (test-get-log-lm-terms.R:143:3): 'get_log_lm_terms' gives the correct result with and without gradients ──
  drop(c(attr(grad, "grad_vcov")) %*% jac) not equal to head(true_grad, -4).
  15/15 mismatches (average diff: 7.49)
  [1]   8.907 -   4.4537 ==   4.4537
  [2]  16.827 -   8.4136 ==   8.4136
  [3]   0.135 -   0.0677 ==   0.0677
  [4]   2.697 -   1.3483 ==   1.3483
  [5] -20.970 - -10.4850 == -10.4850
  [6]   1.816 -   0.7158 ==   1.0999
  [7]   9.530 -   2.0139 ==   7.5156
  [8]   2.619 -  -2.2619 ==   4.8807
  [9] -24.691 -  -8.3369 == -16.3544
  ...
  ── Failure (test-get-log-lm-terms.R:146:3): 'get_log_lm_terms' gives the correct result with and without gradients ──
  drop(attr(grad, "grad_mea")) not equal to tail(true_grad, 4).
  3/4 mismatches (average diff: 12.3)
  [2]  -1.32 - -0.667 ==  -0.657
  [3]  -7.62 - -4.105 ==  -3.518
  [4] -38.73 - -6.146 == -32.587
  ── Failure (test-get-log-lm-terms.R:189:3): 'get_log_lm_terms' gives the correct result with and without gradients with multinomial variables ──
  `val` not equal to -62.496433767902.
  1/1 mismatches
  [1] -125 - -62.5 == -62.2
  ── Failure (test-get-log-lm-terms.R:221:3): 'get_log_lm_terms' gives the correct result with and without gradients with multinomial variables ──
  drop(c(attr(grad, "grad_vcov")) %*% jac) not equal to head(true_grad, -2).
  15/15 mismatches (average diff: 8.55)
  [1]  -8.159 - -10.849 ==   2.69
  [2]  38.953 -  11.341 ==  27.61
  [3] -20.091 -  -8.097 == -11.99
  [4]   8.700 -   0.314 ==   8.39
  [5]  11.391 -   7.783 ==   3.61
  [6] -33.317 - -14.980 == -18.34
  [7]   0.561 - -10.402 ==  10.96
  [8]  -4.026 -   1.321 ==  -5.35
  [9]   3.466 -   9.081 ==  -5.62
  ...
  ── Failure (test-get-log-lm-terms.R:224:3): 'get_log_lm_terms' gives the correct result with and without gradients with multinomial variables ──
  drop(attr(grad, "grad_mea")) not equal to tail(true_grad, 2).
  2/2 mismatches (average diff: 0.921)
  [1] -1.16 - -0.263 == -0.898
  [2] -2.00 - -1.055 == -0.943
  ── Failure (test-get-log-lm-terms.R:230:3): 'get_log_lm_terms' gives the correct result with and without gradients with multinomial variables ──
  drop(c(attr(grad, "grad_vcov")) %*% jac) not equal to head(true_grad, -2).
  15/15 mismatches (average diff: 4.02)
  [1] -17.565 - -10.849 ==  -6.715
  [2]  24.282 -  11.341 ==  12.941
  [3] -10.461 -  -8.097 ==  -2.364
  [4]   0.707 -   0.314 ==   0.393
  [5]   9.755 -   7.783 ==   1.972
  [6] -27.507 - -14.980 == -12.526
  [7]  -7.431 - -10.402 ==   2.971
  [8]   2.034 -   1.321 ==   0.714
  [9]   5.397 -   9.081 ==  -3.684
  ...
  ── Failure (test-get-log-lm-terms.R:233:3): 'get_log_lm_terms' gives the correct result with and without gradients with multinomial variables ──
  drop(attr(grad, "grad_mea")) not equal to tail(true_grad, 2).
  2/2 mismatches (average diff: 0.718)
  [1] -1.40 - -0.263 == -1.133
  [2] -1.36 - -1.055 == -0.303
  ── Error (test-get-log-lm-terms.R:321:3): 'get_log_lm_terms' gives the correct result with and without gradients (ordinal and binary data) ──
  Error: Some exception occured. Further details cannot be provided because of https://stackoverflow.com/q/66362932/5861244.
  Backtrace:
      █
   1. └─mdgc:::log_ml(par) test-get-log-lm-terms.R:321:2
   2.   └─mdgc:::eval_log_lm_terms(...) test-get-log-lm-terms.R:313:4
  ── Failure (test-get-log-lm-terms.R:524:5): mdgc_log_ml gives the correct result with a single log marginal likelihood term ──
  `res` not equal to f1 + f2.
  1/1 mismatches
  [1] -20 - -10 == -10
  ── Failure (test-get-log-lm-terms.R:524:5): mdgc_log_ml gives the correct result with a single log marginal likelihood term ──
  `res` not equal to f1 + f2.
  1/1 mismatches
  [1] -20 - -10 == -10
  ── Failure (test-get-log-lm-terms.R:524:5): mdgc_log_ml gives the correct result with a single log marginal likelihood term ──
  `res` not equal to f1 + f2.
  1/1 mismatches
  [1] -20 - -10 == -10
  ── Failure (test-get-log-lm-terms.R:524:5): mdgc_log_ml gives the correct result with a single log marginal likelihood term ──
  `res` not equal to f1 + f2.
  1/1 mismatches
  [1] -20 - -10 == -10
  ── Failure (test-get-log-lm-terms.R:524:5): mdgc_log_ml gives the correct result with a single log marginal likelihood term ──
  `res` not equal to f1 + f2.
  1/1 mismatches
  [1] -20 - -10 == -10
  ── Failure (test-get-log-lm-terms.R:524:5): mdgc_log_ml gives the correct result with a single log marginal likelihood term ──
  `res` not equal to f1 + f2.
  1/1 mismatches
  [1] -20.1 - -10 == -10
  ── Failure (test-get-log-lm-terms.R:524:5): mdgc_log_ml gives the correct result with a single log marginal likelihood term ──
  `res` not equal to f1 + f2.
  1/1 mismatches
  [1] -20 - -10 == -10
  ── Failure (test-get-log-lm-terms.R:524:5): mdgc_log_ml gives the correct result with a single log marginal likelihood term ──
  `res` not equal to f1 + f2.
  1/1 mismatches
  [1] -20 - -10 == -10
  ── Failure (test-get-log-lm-terms.R:524:5): mdgc_log_ml gives the correct result with a single log marginal likelihood term ──
  `res` not equal to f1 + f2.
  1/1 mismatches
  [1] -20 - -10 == -10
  ── Failure (test-get-log-lm-terms.R:524:5): mdgc_log_ml gives the correct result with a single log marginal likelihood term ──
  `res` not equal to f1 + f2.
  1/1 mismatches
  [1] -Inf - -10 == -Inf
  ── Error (test-get-log-lm-terms.R:522:5): mdgc_log_ml gives the correct result with a single log marginal likelihood term ──
  Error: Some exception occured. Further details cannot be provided because of https://stackoverflow.com/q/66362932/5861244.
  Backtrace:
      █
   1. └─mdgc::mdgc_log_ml(...) test-get-log-lm-terms.R:522:4
   2.   └─mdgc:::.mdgc_log_ml(...)
   3.     └─mdgc:::eval_log_lm_terms(...)
  ── Error (test-man-files.R:15:3): mdgc examples gives the same ─────────────────
  Error: Some exception occured. Further details cannot be provided because of https://stackoverflow.com/q/66362932/5861244.
  Backtrace:
       █
    1. └─mdgc::mdgc(...) test-man-files.R:15:2
    2.   └─mdgc::mdgc_fit(...)
    3.     └─mdgc:::svrg(...)
    4.       └─base::sapply(...)
    5.         └─base::lapply(X = X, FUN = FUN, ...)
    6.           └─mdgc:::FUN(X[[i]], ...)
    7.             └─mdgc:::par_fn_wrap(...)
    8.               └─mdgc:::par_fn(...)
    9.                 └─mdgc:::.mdgc_log_ml(...)
   10.                   └─mdgc:::eval_log_lm_terms(...)
  ── Failure (test-man-files.R:49:3): iris examples give the same ────────────────
  mdgc_log_ml(ptr, start_vals, obj$means) not equal to `truth`.
  1/1 mismatches
  [1] -Inf - -622 == -Inf
  ── Error (test-man-files.R:51:3): iris examples give the same ──────────────────
  Error: Some exception occured. Further details cannot be provided because of https://stackoverflow.com/q/66362932/5861244.
  Backtrace:
      █
   1. ├─testthat::expect_equal(...) test-man-files.R:51:2
   2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
   3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
   4. └─mdgc::mdgc_log_ml(ptr, start_vals, obj$means, use_aprx = TRUE)
   5.   └─mdgc:::.mdgc_log_ml(...)
   6.     └─mdgc:::eval_log_lm_terms(...)
  ── Error (test-mdgc-fit.R:58:3): ADAM gives the same ───────────────────────────
  Error: Some exception occured. Further details cannot be provided because of https://stackoverflow.com/q/66362932/5861244.
  Backtrace:
      █
   1. └─mdgc::mdgc_fit(...) test-mdgc-fit.R:58:2
   2.   └─mdgc:::adam(...)
   3.     └─mdgc:::par_fn_wrap(...)
   4.       └─mdgc:::par_fn(...)
   5.         └─mdgc:::.mdgc_log_ml(...)
   6.           └─mdgc:::eval_log_lm_terms(...)
  ── Error (test-mdgc-fit.R:79:3): svrg gives the same ───────────────────────────
  Error: Some exception occured. Further details cannot be provided because of https://stackoverflow.com/q/66362932/5861244.
  Backtrace:
      █
   1. └─mdgc::mdgc_fit(...) test-mdgc-fit.R:79:2
   2.   └─mdgc:::svrg(...)
   3.     └─base::sapply(...)
   4.       └─base::lapply(X = X, FUN = FUN, ...)
   5.         └─mdgc:::FUN(X[[i]], ...)
   6.           └─mdgc:::par_fn_wrap(...)
   7.             └─mdgc:::par_fn(...)
   8.               └─mdgc:::.mdgc_log_ml(...)
   9.                 └─mdgc:::eval_log_lm_terms(...)
  ── Error (test-mdgc-impute.R:45:3): mdgc_impute gives the same as before and with and without reordering ──
  Error: Some exception occured. Further details cannot be provided because of https://stackoverflow.com/q/66362932/5861244.
  Backtrace:
      █
   1. └─mdgc::mdgc_impute(...) test-mdgc-impute.R:45:2
   2.   └─mdgc:::impute(...)
  
  [ FAIL 31 | WARN 0 | SKIP 1 | PASS 7 ]
  Error: Test failures
  Execution halted