Running ‘testthat.R’ [8s/12s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(modmarg)
  > 
  > test_check("modmarg")
  ── 1. Error: 2sls coefficients and standard errors are correct (@test_ivreg.R#33
  there is no package called 'AER'
  Backtrace:
   1. AER::ivreg
   2. base::getExportedValue(pkg, name)
   3. base::asNamespace(ns)
   4. base::getNamespace(ns)
   5. base::loadNamespace(name)
   6. base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   7. base:::withOneRestart(expr, restarts[[1L]])
   8. base:::doWithOneRestart(return(expr), restart)
  
  ── 2. Error: 2SLS margins are correct (@test_ivreg.R#72)  ──────────────────────
  there is no package called 'AER'
  Backtrace:
   1. AER::ivreg
   2. base::getExportedValue(pkg, name)
   3. base::asNamespace(ns)
   4. base::getNamespace(ns)
   5. base::loadNamespace(name)
   6. base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   7. base:::withOneRestart(expr, restarts[[1L]])
   8. base:::doWithOneRestart(return(expr), restart)
  
  ── 3. Error: 2SLS margins handle weights (@test_ivreg.R#135)  ──────────────────
  there is no package called 'AER'
  Backtrace:
   1. AER::ivreg
   2. base::getExportedValue(pkg, name)
   3. base::asNamespace(ns)
   4. base::getNamespace(ns)
   5. base::loadNamespace(name)
   6. base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   7. base:::withOneRestart(expr, restarts[[1L]])
   8. base:::doWithOneRestart(return(expr), restart)
  
  ── 4. Error: 2SLS margins warn if weights are absent (@test_ivreg.R#201)  ──────
  there is no package called 'AER'
  Backtrace:
   1. AER::ivreg
   2. base::getExportedValue(pkg, name)
   3. base::asNamespace(ns)
   4. base::getNamespace(ns)
   5. base::loadNamespace(name)
   6. base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   7. base:::withOneRestart(expr, restarts[[1L]])
   8. base:::doWithOneRestart(return(expr), restart)
  
  ── 5. Error: 2SLS margins handle missing covariates (@test_ivreg.R#223)  ───────
  there is no package called 'AER'
  Backtrace:
   1. AER::ivreg
   2. base::getExportedValue(pkg, name)
   3. base::asNamespace(ns)
   4. base::getNamespace(ns)
   5. base::loadNamespace(name)
   6. base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   7. base:::withOneRestart(expr, restarts[[1L]])
   8. base:::doWithOneRestart(return(expr), restart)
  
  ── 6. Error: 2SLS margins handle missing weights (@test_ivreg.R#281)  ──────────
  there is no package called 'AER'
  Backtrace:
   1. AER::ivreg
   2. base::getExportedValue(pkg, name)
   3. base::asNamespace(ns)
   4. base::getNamespace(ns)
   5. base::loadNamespace(name)
   6. base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   7. base:::withOneRestart(expr, restarts[[1L]])
   8. base:::doWithOneRestart(return(expr), restart)
  
  ── 7. Error: 2SLS margins handle missing weights and covariates (@test_ivreg.R#3
  there is no package called 'AER'
  Backtrace:
   1. AER::ivreg
   2. base::getExportedValue(pkg, name)
   3. base::asNamespace(ns)
   4. base::getNamespace(ns)
   5. base::loadNamespace(name)
   6. base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   7. base:::withOneRestart(expr, restarts[[1L]])
   8. base:::doWithOneRestart(return(expr), restart)
  
  ── 8. Error: P values are calculated correctly (@test_ivreg.R#418)  ────────────
  there is no package called 'AER'
  Backtrace:
   1. AER::ivreg
   2. base::getExportedValue(pkg, name)
   3. base::asNamespace(ns)
   4. base::getNamespace(ns)
   5. base::loadNamespace(name)
   6. base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   7. base:::withOneRestart(expr, restarts[[1L]])
   8. base:::doWithOneRestart(return(expr), restart)
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  [ OK: 193 | SKIPPED: 0 | WARNINGS: 26 | FAILED: 8 ]
  1. Error: 2sls coefficients and standard errors are correct (@test_ivreg.R#33) 
  2. Error: 2SLS margins are correct (@test_ivreg.R#72) 
  3. Error: 2SLS margins handle weights (@test_ivreg.R#135) 
  4. Error: 2SLS margins warn if weights are absent (@test_ivreg.R#201) 
  5. Error: 2SLS margins handle missing covariates (@test_ivreg.R#223) 
  6. Error: 2SLS margins handle missing weights (@test_ivreg.R#281) 
  7. Error: 2SLS margins handle missing weights and covariates (@test_ivreg.R#349) 
  8. Error: P values are calculated correctly (@test_ivreg.R#418) 
  
  Error: testthat unit tests failed
  Execution halted