Running ‘testthat.R’ [9s/14s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(modmarg)
  > 
  > test_check("modmarg")
  [ FAIL 8 | WARN 26 | SKIP 0 | PASS 195 ]
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test_ivreg.R:31:3'): 2sls coefficients and standard errors are correct ──
  <packageNotFoundError/error/condition>
  Error in `loadNamespace(x)`: there is no package called 'AER'
  Backtrace:
      ▆
   1. └─base::loadNamespace(x) at test_ivreg.R:31:3
   2.   └─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   3.     └─base (local) withOneRestart(expr, restarts[[1L]])
   4.       └─base (local) doWithOneRestart(return(expr), restart)
  ── Error ('test_ivreg.R:70:3'): 2SLS margins are correct ───────────────────────
  <packageNotFoundError/error/condition>
  Error in `loadNamespace(x)`: there is no package called 'AER'
  Backtrace:
      ▆
   1. └─base::loadNamespace(x) at test_ivreg.R:70:3
   2.   └─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   3.     └─base (local) withOneRestart(expr, restarts[[1L]])
   4.       └─base (local) doWithOneRestart(return(expr), restart)
  ── Error ('test_ivreg.R:133:3'): 2SLS margins handle weights ───────────────────
  <packageNotFoundError/error/condition>
  Error in `loadNamespace(x)`: there is no package called 'AER'
  Backtrace:
      ▆
   1. └─base::loadNamespace(x) at test_ivreg.R:133:3
   2.   └─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   3.     └─base (local) withOneRestart(expr, restarts[[1L]])
   4.       └─base (local) doWithOneRestart(return(expr), restart)
  ── Error ('test_ivreg.R:199:3'): 2SLS margins warn if weights are absent ───────
  <packageNotFoundError/error/condition>
  Error in `loadNamespace(x)`: there is no package called 'AER'
  Backtrace:
      ▆
   1. └─base::loadNamespace(x) at test_ivreg.R:199:3
   2.   └─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   3.     └─base (local) withOneRestart(expr, restarts[[1L]])
   4.       └─base (local) doWithOneRestart(return(expr), restart)
  ── Error ('test_ivreg.R:221:3'): 2SLS margins handle missing covariates ────────
  <packageNotFoundError/error/condition>
  Error in `loadNamespace(x)`: there is no package called 'AER'
  Backtrace:
      ▆
   1. └─base::loadNamespace(x) at test_ivreg.R:221:3
   2.   └─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   3.     └─base (local) withOneRestart(expr, restarts[[1L]])
   4.       └─base (local) doWithOneRestart(return(expr), restart)
  ── Error ('test_ivreg.R:279:3'): 2SLS margins handle missing weights ───────────
  <packageNotFoundError/error/condition>
  Error in `loadNamespace(x)`: there is no package called 'AER'
  Backtrace:
      ▆
   1. └─base::loadNamespace(x) at test_ivreg.R:279:3
   2.   └─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   3.     └─base (local) withOneRestart(expr, restarts[[1L]])
   4.       └─base (local) doWithOneRestart(return(expr), restart)
  ── Error ('test_ivreg.R:347:3'): 2SLS margins handle missing weights and covariates ──
  <packageNotFoundError/error/condition>
  Error in `loadNamespace(x)`: there is no package called 'AER'
  Backtrace:
      ▆
   1. └─base::loadNamespace(x) at test_ivreg.R:347:3
   2.   └─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   3.     └─base (local) withOneRestart(expr, restarts[[1L]])
   4.       └─base (local) doWithOneRestart(return(expr), restart)
  ── Error ('test_ivreg.R:416:3'): P values are calculated correctly ─────────────
  <packageNotFoundError/error/condition>
  Error in `loadNamespace(x)`: there is no package called 'AER'
  Backtrace:
      ▆
   1. └─base::loadNamespace(x) at test_ivreg.R:416:3
   2.   └─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   3.     └─base (local) withOneRestart(expr, restarts[[1L]])
   4.       └─base (local) doWithOneRestart(return(expr), restart)
  
  [ FAIL 8 | WARN 26 | SKIP 0 | PASS 195 ]
  Error: Test failures
  Execution halted