Running ‘testthat.R’ [3s/4s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library("testthat")
  > library("ivreg")
  > 
  > test_check("ivreg")
  Saving _problems/test-case-deletion-31.R
  Saving _problems/test-case-deletion-43.R
  Saving _problems/test-predict-4.R
  [ FAIL 3 | WARN 0 | SKIP 0 | PASS 49 ]
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-case-deletion.R:31:3'): deletion statistics computed correctly with na.exclude ──
  Error in `match.arg(type, c("variance", "robustness"))`: 'arg' should be one of "variance", "robustness"
  Backtrace:
      ▆
   1. ├─testthat::expect_true(all(is.na(dffits(m.miss)[c(1, 4, 10)]))) at test-case-deletion.R:31:3
   2. │ └─testthat::quasi_label(enquo(object), label)
   3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
   4. └─stats::dffits(m.miss)
   5.   └─stats::weighted.residuals(model)
   6.     ├─stats::weights(obj, "working")
   7.     └─ivreg:::weights.ivreg(obj, "working")
   8.       └─base::match.arg(type, c("variance", "robustness"))
  ── Error ('test-case-deletion.R:43:3'): rownames of deletion statistics preserved with na.omit ──
  Error in `match.arg(type, c("variance", "robustness"))`: 'arg' should be one of "variance", "robustness"
  Backtrace:
      ▆
   1. ├─testthat::expect_equal(names(dffits(m.miss.2)), nms) at test-case-deletion.R:43:3
   2. │ └─testthat::quasi_label(enquo(object), label)
   3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
   4. └─stats::dffits(m.miss.2)
   5.   └─stats::weighted.residuals(model)
   6.     ├─stats::weights(obj, "working")
   7.     └─ivreg:::weights.ivreg(obj, "working")
   8.       └─base::match.arg(type, c("variance", "robustness"))
  ── Error ('test-predict.R:4:1'): (code run outside of `test_that()`) ───────────
  Error in `match.arg(type, c("variance", "robustness"))`: 'arg' should be one of "variance", "robustness"
  Backtrace:
       ▆
    1. ├─stats::predict(deq, newdata = new, se.fit = TRUE, interval = "prediction") at test-predict.R:4:1
    2. └─ivreg:::predict.ivreg(deq, newdata = new, se.fit = TRUE, interval = "prediction")
    3.   ├─stats::sigma(object)
    4.   └─stats:::sigma.default(object)
    5.     ├─stats::deviance(object, ...)
    6.     ├─ivreg:::deviance.ivreg(object, ...)
    7.     ├─base::NextMethod()
    8.     └─stats:::deviance.lm(object, ...)
    9.       └─stats::weighted.residuals(object)
   10.         ├─stats::weights(obj, "working")
   11.         └─ivreg:::weights.ivreg(obj, "working")
   12.           └─base::match.arg(type, c("variance", "robustness"))
  
  [ FAIL 3 | WARN 0 | SKIP 0 | PASS 49 ]
  Error:
  ! Test failures.
  Execution halted