Running ‘testthat.R’ [91s/169s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(OncoBayes2)
  This is OncoBayes2 version 0.8.7
  > 
  > test_check("OncoBayes2")
  Loading required package: StanHeaders
  rstan (Version 2.21.8, GitRev: 2e1f913d3ca3)
  For execution on a local, multicore CPU with excess RAM we recommend calling
  options(mc.cores = parallel::detectCores()).
  To avoid recompilation of unchanged Stan programs, we recommend calling
  rstan_options(auto_write = TRUE)
  Tests running with fake sampling
  
  Attaching package: 'tibble'
  
  The following object is masked from 'package:assertthat':
  
      has_name
  
  
  Attaching package: 'tidyr'
  
  The following object is masked from 'package:rstan':
  
      extract
  
  The following object is masked from 'package:testthat':
  
      matches
  
  
  Attaching package: 'dplyr'
  
  The following object is masked from 'package:testthat':
  
      matches
  
  The following objects are masked from 'package:stats':
  
      filter, lag
  
  The following objects are masked from 'package:base':
  
      intersect, setdiff, setequal, union
  
  Tests running with fake sampling
  No stratum defined - assigning all groups to single stratum "all"
  No stratum defined - assigning all groups to single stratum "all"
  No stratum defined - assigning all groups to single stratum "all"
  Bayesian Logistic Regression Model trial with 
  
  Number of observations   : 4 
  Number of historic groups: 2 
  Number of trial arms     : 2 
  Generated formula        :
   cbind(num_toxicities, num_patients - num_toxicities) ~
   1 + I(log(drug1/1)) |
   0 |
   stratum_id / group_id 
  
  Toxicity intervals and EWOC requirements:
  -----------------------------------------
  prob_underdose (   0 - 0.16] <= 1
     prob_target (0.16 - 0.33] <= 1
   prob_overdose (0.33 -    1] <= 0.25
  
  BLRM prior undefined!
  Bayesian Logistic Regression Model trial with 
  
  Number of observations   : 4 
  Number of historic groups: 2 
  Number of trial arms     : 2 
  Generated formula        :
   cbind(num_toxicities, num_patients - num_toxicities) ~
   1 + I(log(drug1/1)) |
   0 |
   stratum_id / group_id 
  
  Toxicity intervals and EWOC requirements:
  -----------------------------------------
  prob_underdose (   0 - 0.16] <= 1
     prob_target (0.16 - 0.33] <= 1
   prob_overdose (0.33 -    1] <= 0.25
  
  blrmfit summary:
  -------------------------------------------------------------------------------- 
  Bayesian Logistic Regression Model with EXchangeability-NonEXchangeability
  
  Number of observations: 6 
  Number of groups      : 4 
  Number of strata      : 1 
  Number of components  : 1 
  Number of interactions: 0 
  EXNEX components      : 0 
  EXNEX interactions    : 0 
  
  Observations per group:
     Group n Stratum n_total
  1 hist_A 2     all       6
  2 hist_B 2     all       6
  3  cur_A 1     all       0
  4  cur_B 1     all       0
  
  Groups per stratum:
    Stratum Groups n_total
  1     all      4      12
  
  Component posterior:
  Population mean posterior mu_log_beta
  intercept:
     mean se_mean      sd    2.5%     50%   97.5%   n_eff    Rhat 
    -3.85    0.72    0.56   -4.22   -3.85   -3.47    0.60     Inf 
  log-slope:
     mean se_mean      sd    2.5%     50%   97.5%   n_eff    Rhat 
   -0.391   0.087   0.068  -0.437  -0.391  -0.346   0.602     Inf 
  
  Population heterogeniety posterior tau_log_beta
  intercept:
     mean se_mean      sd    2.5%     50%   97.5%   n_eff    Rhat 
     0.23    0.22    0.17    0.12    0.23    0.34    0.60     Inf 
  log-slope:
     mean se_mean      sd    2.5%     50%   97.5%   n_eff    Rhat 
   0.1190  0.0037  0.0029  0.1171  0.1190  0.1210  0.6021     Inf 
  
  Population correlation posterior rho_log_beta
                   mean se_mean   sd  2.5%   50% 97.5% n_eff Rhat
  I(log(drug1/1)) 0.094    0.87 0.67 -0.36 0.094  0.55   0.6  Inf
  
  No interaction model posterior specified.
  Error in na.fail.default(X[[i]], ...) : missing values in object
  In addition: There were 12 warnings (use warnings() to see them)
  Bayesian Logistic Regression Model trial with 
  
  Number of observations   : 1 
  Number of historic groups: 1 
  Number of trial arms     : 1 
  Generated formula        :
   cbind(num_toxicities, num_patients - num_toxicities) ~
   1 + I(log(A/1)) |
   1 + I(log(B/1)) |
   1 + I(log(C/1)) |
   0 + I(2 * (A/1 * B/1) / (1 + A/1 * B/1))+ I(2 * (A/1 * C/1) / (1 + A/1 * C/1))+ I(2 * (B/1 * C/1) / (1 + B/1 * C/1))|
   stratum_id / group_id 
  
  Toxicity intervals and EWOC requirements:
  -----------------------------------------
  prob_underdose (   0 - 0.16] <= 1
     prob_target (0.16 - 0.33] <= 1
   prob_overdose (0.33 -    1] <= 0.25
  
  BLRM prior undefined!
  [ FAIL 12 | WARN 81 | SKIP 30 | PASS 330 ]
  
  ══ Skipped tests ═══════════════════════════════════════════════════════════════
  • On CRAN (27)
  • empty test (3)
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Failure ('test-blrm_trial.R:1287'): ewoc_check issues warnings (single-agent) ──
  ec_ok$prob_overdose_est not equal to nd_ok$`75%`.
  Attributes: < Modes: list, NULL >
  Attributes: < Lengths: 2, 0 >
  Attributes: < names for target but not for current >
  Attributes: < current is not list-like >
  target is pillar_num, current is numeric
  Backtrace:
      ▆
   1. └─OncoBayes2 (local) check_ewoc_warnings(examples$single_agent)
   2.   ├─base::with(...) at test-blrm_trial.R:1287:4
   3.   └─base::with.default(...)
   4.     └─base::eval(substitute(expr), data, enclos = parent.frame())
   5.       └─base::eval(substitute(expr), data, enclos = parent.frame())
   6.         └─testthat::expect_equal(ec_ok$prob_overdose_est, nd_ok$`75%`) at test-blrm_trial.R:1318:8
  ── Failure ('test-blrm_trial.R:1287'): ewoc_check issues warnings (single-agent) ──
  ec_fail$prob_overdose_est not equal to nd_fail$`75%`.
  Attributes: < Modes: list, NULL >
  Attributes: < Lengths: 2, 0 >
  Attributes: < names for target but not for current >
  Attributes: < current is not list-like >
  target is pillar_num, current is numeric
  Backtrace:
      ▆
   1. └─OncoBayes2 (local) check_ewoc_warnings(examples$single_agent)
   2.   ├─base::with(...) at test-blrm_trial.R:1287:4
   3.   └─base::with.default(...)
   4.     └─base::eval(substitute(expr), data, enclos = parent.frame())
   5.       └─base::eval(substitute(expr), data, enclos = parent.frame())
   6.         └─testthat::expect_equal(ec_fail$prob_overdose_est, nd_fail$`75%`) at test-blrm_trial.R:1319:8
  ── Failure ('test-blrm_trial.R:1287'): ewoc_check issues warnings (single-agent) ──
  ec$prob_overdose_est not equal to s$`75%`.
  Attributes: < Modes: list, NULL >
  Attributes: < Lengths: 2, 0 >
  Attributes: < names for target but not for current >
  Attributes: < current is not list-like >
  target is pillar_num, current is numeric
  Backtrace:
      ▆
   1. └─OncoBayes2 (local) check_ewoc_warnings(examples$single_agent)
   2.   ├─base::with(...) at test-blrm_trial.R:1287:4
   3.   └─base::with.default(...)
   4.     └─base::eval(substitute(expr), data, enclos = parent.frame())
   5.       └─base::eval(substitute(expr), data, enclos = parent.frame())
   6.         └─testthat::expect_equal(ec$prob_overdose_est, s$`75%`) at test-blrm_trial.R:1325:8
  ── Failure ('test-blrm_trial.R:1287'): ewoc_check issues warnings (single-agent) ──
  upd_ec$prob_overdose_est not equal to upd_s$`75%`.
  Attributes: < Modes: list, NULL >
  Attributes: < Lengths: 2, 0 >
  Attributes: < names for target but not for current >
  Attributes: < current is not list-like >
  target is pillar_num, current is numeric
  Backtrace:
      ▆
   1. └─OncoBayes2 (local) check_ewoc_warnings(examples$single_agent)
   2.   ├─base::with(...) at test-blrm_trial.R:1287:4
   3.   └─base::with.default(...)
   4.     └─base::eval(substitute(expr), data, enclos = parent.frame())
   5.       └─base::eval(substitute(expr), data, enclos = parent.frame())
   6.         └─testthat::expect_equal(upd_ec$prob_overdose_est, upd_s$`75%`) at test-blrm_trial.R:1330:8
  ── Failure ('test-blrm_trial.R:1287'): ewoc_check issues warnings (combo2) ─────
  ec_ok$prob_overdose_est not equal to nd_ok$`75%`.
  Attributes: < Modes: list, NULL >
  Attributes: < Lengths: 2, 0 >
  Attributes: < names for target but not for current >
  Attributes: < current is not list-like >
  target is pillar_num, current is numeric
  Backtrace:
      ▆
   1. └─OncoBayes2 (local) check_ewoc_warnings(examples$combo2)
   2.   ├─base::with(...) at test-blrm_trial.R:1287:4
   3.   └─base::with.default(...)
   4.     └─base::eval(substitute(expr), data, enclos = parent.frame())
   5.       └─base::eval(substitute(expr), data, enclos = parent.frame())
   6.         └─testthat::expect_equal(ec_ok$prob_overdose_est, nd_ok$`75%`) at test-blrm_trial.R:1318:8
  ── Failure ('test-blrm_trial.R:1287'): ewoc_check issues warnings (combo2) ─────
  ec_fail$prob_overdose_est not equal to nd_fail$`75%`.
  Attributes: < Modes: list, NULL >
  Attributes: < Lengths: 2, 0 >
  Attributes: < names for target but not for current >
  Attributes: < current is not list-like >
  target is pillar_num, current is numeric
  Backtrace:
      ▆
   1. └─OncoBayes2 (local) check_ewoc_warnings(examples$combo2)
   2.   ├─base::with(...) at test-blrm_trial.R:1287:4
   3.   └─base::with.default(...)
   4.     └─base::eval(substitute(expr), data, enclos = parent.frame())
   5.       └─base::eval(substitute(expr), data, enclos = parent.frame())
   6.         └─testthat::expect_equal(ec_fail$prob_overdose_est, nd_fail$`75%`) at test-blrm_trial.R:1319:8
  ── Failure ('test-blrm_trial.R:1287'): ewoc_check issues warnings (combo2) ─────
  ec$prob_overdose_est not equal to s$`75%`.
  Attributes: < Modes: list, NULL >
  Attributes: < Lengths: 2, 0 >
  Attributes: < names for target but not for current >
  Attributes: < current is not list-like >
  target is pillar_num, current is numeric
  Backtrace:
      ▆
   1. └─OncoBayes2 (local) check_ewoc_warnings(examples$combo2)
   2.   ├─base::with(...) at test-blrm_trial.R:1287:4
   3.   └─base::with.default(...)
   4.     └─base::eval(substitute(expr), data, enclos = parent.frame())
   5.       └─base::eval(substitute(expr), data, enclos = parent.frame())
   6.         └─testthat::expect_equal(ec$prob_overdose_est, s$`75%`) at test-blrm_trial.R:1325:8
  ── Failure ('test-blrm_trial.R:1287'): ewoc_check issues warnings (combo2) ─────
  upd_ec$prob_overdose_est not equal to upd_s$`75%`.
  Attributes: < Modes: list, NULL >
  Attributes: < Lengths: 2, 0 >
  Attributes: < names for target but not for current >
  Attributes: < current is not list-like >
  target is pillar_num, current is numeric
  Backtrace:
      ▆
   1. └─OncoBayes2 (local) check_ewoc_warnings(examples$combo2)
   2.   ├─base::with(...) at test-blrm_trial.R:1287:4
   3.   └─base::with.default(...)
   4.     └─base::eval(substitute(expr), data, enclos = parent.frame())
   5.       └─base::eval(substitute(expr), data, enclos = parent.frame())
   6.         └─testthat::expect_equal(upd_ec$prob_overdose_est, upd_s$`75%`) at test-blrm_trial.R:1330:8
  ── Failure ('test-blrm_trial.R:1287'): ewoc_check issues warnings (combo3) ─────
  ec_ok$prob_overdose_est not equal to nd_ok$`75%`.
  Attributes: < Modes: list, NULL >
  Attributes: < Lengths: 2, 0 >
  Attributes: < names for target but not for current >
  Attributes: < current is not list-like >
  target is pillar_num, current is numeric
  Backtrace:
      ▆
   1. └─OncoBayes2 (local) check_ewoc_warnings(examples$combo3)
   2.   ├─base::with(...) at test-blrm_trial.R:1287:4
   3.   └─base::with.default(...)
   4.     └─base::eval(substitute(expr), data, enclos = parent.frame())
   5.       └─base::eval(substitute(expr), data, enclos = parent.frame())
   6.         └─testthat::expect_equal(ec_ok$prob_overdose_est, nd_ok$`75%`) at test-blrm_trial.R:1318:8
  ── Failure ('test-blrm_trial.R:1287'): ewoc_check issues warnings (combo3) ─────
  ec_fail$prob_overdose_est not equal to nd_fail$`75%`.
  Attributes: < Modes: list, NULL >
  Attributes: < Lengths: 2, 0 >
  Attributes: < names for target but not for current >
  Attributes: < current is not list-like >
  target is pillar_num, current is numeric
  Backtrace:
      ▆
   1. └─OncoBayes2 (local) check_ewoc_warnings(examples$combo3)
   2.   ├─base::with(...) at test-blrm_trial.R:1287:4
   3.   └─base::with.default(...)
   4.     └─base::eval(substitute(expr), data, enclos = parent.frame())
   5.       └─base::eval(substitute(expr), data, enclos = parent.frame())
   6.         └─testthat::expect_equal(ec_fail$prob_overdose_est, nd_fail$`75%`) at test-blrm_trial.R:1319:8
  ── Failure ('test-blrm_trial.R:1287'): ewoc_check issues warnings (combo3) ─────
  ec$prob_overdose_est not equal to s$`75%`.
  Attributes: < Modes: list, NULL >
  Attributes: < Lengths: 2, 0 >
  Attributes: < names for target but not for current >
  Attributes: < current is not list-like >
  target is pillar_num, current is numeric
  Backtrace:
      ▆
   1. └─OncoBayes2 (local) check_ewoc_warnings(examples$combo3)
   2.   ├─base::with(...) at test-blrm_trial.R:1287:4
   3.   └─base::with.default(...)
   4.     └─base::eval(substitute(expr), data, enclos = parent.frame())
   5.       └─base::eval(substitute(expr), data, enclos = parent.frame())
   6.         └─testthat::expect_equal(ec$prob_overdose_est, s$`75%`) at test-blrm_trial.R:1325:8
  ── Failure ('test-blrm_trial.R:1287'): ewoc_check issues warnings (combo3) ─────
  upd_ec$prob_overdose_est not equal to upd_s$`75%`.
  Attributes: < Modes: list, NULL >
  Attributes: < Lengths: 2, 0 >
  Attributes: < names for target but not for current >
  Attributes: < current is not list-like >
  target is pillar_num, current is numeric
  Backtrace:
      ▆
   1. └─OncoBayes2 (local) check_ewoc_warnings(examples$combo3)
   2.   ├─base::with(...) at test-blrm_trial.R:1287:4
   3.   └─base::with.default(...)
   4.     └─base::eval(substitute(expr), data, enclos = parent.frame())
   5.       └─base::eval(substitute(expr), data, enclos = parent.frame())
   6.         └─testthat::expect_equal(upd_ec$prob_overdose_est, upd_s$`75%`) at test-blrm_trial.R:1330:8
  
  [ FAIL 12 | WARN 81 | SKIP 30 | PASS 330 ]
  Error: Test failures
  Execution halted