Running ‘testthat.R’ [107s/162s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(clubSandwich)
  Registered S3 method overwritten by 'clubSandwich':
    method    from    
    bread.mlm sandwich
  > 
  > test_check("clubSandwich")
  [ FAIL 8 | WARN 0 | SKIP 28 | PASS 1340 ]
  
  ══ Skipped tests (28) ══════════════════════════════════════════════════════════
  • Need to understand target-unbiasedness for ivreg objects. (2):
    'test_AER_ivreg.R:141:3', 'test_ivreg_ivreg.R:141:3'
  • On CRAN (24): 'test_Wald.R:119:3', 'test_Wald.R:173:3',
    'test_geeglm.R:159:3', 'test_linear_contrast.R:136:3',
    'test_lme_3level.R:39:3', 'test_lme_3level.R:76:3',
    'test_lme_3level.R:116:3', 'test_lme_3level.R:127:3',
    'test_lme_3level.R:138:3', 'test_lme_3level.R:179:3', 'test_lme_MVML.R:4:1',
    'test_lmerMod.R:124:3', 'test_mlm.R:94:3',
    'test_plm-first-differences.R:92:3', 'test_plm-fixed-effects.R:146:3',
    'test_plm-unbalanced-fixed-effects.R:170:3', 'test_rma-ls.R:26:3',
    'test_rma-mv.R:101:3', 'test_rma-mv.R:220:3', 'test_rma-mv.R:321:3',
    'test_rma-uni.R:76:3', 'test_robu.R:173:3', 'test_robu.R:210:3',
    'test_robu.R:252:3'
  • empty test (1): 'test_estfun.R:50:1'
  • packageVersion("plm") > "2.6-1" is TRUE (1):
    'test_plm-first-differences.R:41:3'
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test_lmerMod.R:31:3'): bread works ──────────────────────────────────
  Error: 'tcrossprod' is not an exported object from 'namespace:Matrix'
  Backtrace:
      ▆
   1. ├─testthat::expect_true(...) at test_lmerMod.R:31:2
   2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
   3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
   4. └─clubSandwich:::check_bread(...)
   5.   ├─clubSandwich:::weightMatrix(obj, cluster)
   6.   └─clubSandwich:::weightMatrix.lmerMod(obj, cluster)
   7.     ├─clubSandwich:::targetVariance(obj, cluster)
   8.     └─clubSandwich:::targetVariance.lmerMod(obj, cluster)
   9.       └─clubSandwich:::matrix_list(...)
  ── Error ('test_lmerMod.R:49:3'): vcovCR options work for CR2 ──────────────────
  Error: 'tcrossprod' is not an exported object from 'namespace:Matrix'
  Backtrace:
      ▆
   1. ├─clubSandwich::vcovCR(obj_A1, type = "CR2") at test_lmerMod.R:49:2
   2. └─clubSandwich:::vcovCR.lmerMod(obj_A1, type = "CR2")
   3.   └─clubSandwich:::vcov_CR(...)
   4.     ├─clubSandwich:::weightMatrix(obj, cluster)
   5.     └─clubSandwich:::weightMatrix.lmerMod(obj, cluster)
   6.       ├─clubSandwich:::targetVariance(obj, cluster)
   7.       └─clubSandwich:::targetVariance.lmerMod(obj, cluster)
   8.         └─clubSandwich:::matrix_list(...)
  ── Error ('test_lmerMod.R:77:3'): vcovCR options work for CR4 ──────────────────
  Error: 'tcrossprod' is not an exported object from 'namespace:Matrix'
  Backtrace:
      ▆
   1. ├─clubSandwich::vcovCR(obj_A1, type = "CR4") at test_lmerMod.R:77:2
   2. └─clubSandwich:::vcovCR.lmerMod(obj_A1, type = "CR4")
   3.   └─clubSandwich:::vcov_CR(...)
   4.     ├─clubSandwich:::weightMatrix(obj, cluster)
   5.     └─clubSandwich:::weightMatrix.lmerMod(obj, cluster)
   6.       ├─clubSandwich:::targetVariance(obj, cluster)
   7.       └─clubSandwich:::targetVariance.lmerMod(obj, cluster)
   8.         └─clubSandwich:::matrix_list(...)
  ── Error ('test_lmerMod.R:105:3'): CR2 and CR4 are target-unbiased ─────────────
  Error: 'tcrossprod' is not an exported object from 'namespace:Matrix'
  Backtrace:
       ▆
    1. ├─testthat::expect_true(check_CR(obj_A1, vcov = "CR2")) at test_lmerMod.R:105:2
    2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
    3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
    4. └─clubSandwich:::check_CR(obj_A1, vcov = "CR2")
    5.   ├─clubSandwich::vcovCR(obj, type = vcov, ...)
    6.   └─clubSandwich:::vcovCR.lmerMod(obj, type = vcov, ...)
    7.     └─clubSandwich:::vcov_CR(...)
    8.       ├─clubSandwich:::weightMatrix(obj, cluster)
    9.       └─clubSandwich:::weightMatrix.lmerMod(obj, cluster)
   10.         ├─clubSandwich:::targetVariance(obj, cluster)
   11.         └─clubSandwich:::targetVariance.lmerMod(obj, cluster)
   12.           └─clubSandwich:::matrix_list(...)
  ── Error ('test_lmerMod.R:141:3'): clubSandwich works with dropped observations ──
  Error: 'tcrossprod' is not an exported object from 'namespace:Matrix'
  Backtrace:
       ▆
    1. └─base::lapply(CR_types, function(x) vcovCR(obj_dropped, type = x)) at test_lmerMod.R:141:2
    2.   └─clubSandwich (local) FUN(X[[i]], ...)
    3.     ├─clubSandwich::vcovCR(obj_dropped, type = x) at test_lmerMod.R:141:30
    4.     └─clubSandwich:::vcovCR.lmerMod(obj_dropped, type = x)
    5.       └─clubSandwich:::vcov_CR(...)
    6.         ├─clubSandwich:::weightMatrix(obj, cluster)
    7.         └─clubSandwich:::weightMatrix.lmerMod(obj, cluster)
    8.           ├─clubSandwich:::targetVariance(obj, cluster)
    9.           └─clubSandwich:::targetVariance.lmerMod(obj, cluster)
   10.             └─clubSandwich:::matrix_list(...)
  ── Error ('test_lmerMod.R:167:3'): lmer agrees with lme ────────────────────────
  Error: 'tcrossprod' is not an exported object from 'namespace:Matrix'
  Backtrace:
      ▆
   1. ├─testthat::expect_equal(...) at test_lmerMod.R:167:2
   2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
   3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
   4. ├─clubSandwich:::targetVariance(lmer_fit)
   5. └─clubSandwich:::targetVariance.lmerMod(lmer_fit)
   6.   └─clubSandwich:::matrix_list(...)
  ── Error ('test_lmerMod.R:234:3'): Possible to cluster at higher level than random effects ──
  Error: 'tcrossprod' is not an exported object from 'namespace:Matrix'
  Backtrace:
      ▆
   1. ├─clubSandwich::vcovCR(lme_2level, type = "CR2", cluster = dat$district_id) at test_lmerMod.R:234:2
   2. └─clubSandwich:::vcovCR.lmerMod(lme_2level, type = "CR2", cluster = dat$district_id)
   3.   └─clubSandwich:::vcov_CR(...)
   4.     ├─clubSandwich:::weightMatrix(obj, cluster)
   5.     └─clubSandwich:::weightMatrix.lmerMod(obj, cluster)
   6.       ├─clubSandwich:::targetVariance(obj, cluster)
   7.       └─clubSandwich:::targetVariance.lmerMod(obj, cluster)
   8.         └─clubSandwich:::matrix_list(...)
  ── Error ('test_plm-random-effects.R:98:3'): nested effects agree with lmer ────
  Error: 'tcrossprod' is not an exported object from 'namespace:Matrix'
  Backtrace:
      ▆
   1. ├─testthat::expect_equivalent(...) at test_plm-random-effects.R:98:2
   2. │ └─testthat::quasi_label(enquo(expected), expected.label, arg = "expected")
   3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
   4. ├─clubSandwich:::targetVariance(lmer_nested, cluster = Produc$region)
   5. └─clubSandwich:::targetVariance.lmerMod(lmer_nested, cluster = Produc$region)
   6.   └─clubSandwich:::matrix_list(...)
  
  [ FAIL 8 | WARN 0 | SKIP 28 | PASS 1340 ]
  Error: Test failures
  Execution halted