Running ‘testthat.R’ [15s/21s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(summclust)
  > 
  > test_check("summclust")
  Loading required namespace: fabricatr
  summclust.fixest(obj = feols_fit, cluster = ~group_id1, params = c("treatment", 
      "log_income"))
   
  Number of observations: 95 97 99 104 98 93 116 102 100 96 
  Number of clusters: 7 
   
                     coef      tstat          se     p_val   conf_int_l
  treatment   0.014634446  1.5882634 0.009214118 0.1466894 -0.006209337
  log_income -0.001417457 -0.4237128 0.003345325 0.6817219 -0.008985108
              conf_int_u
  treatment  0.035478230
  log_income 0.006150194
   
                   N_G  leverage partial-leverage-treatment
  Min.     93.00000000 0.1414602                 0.09313171
  1st Qu.  96.25000000 0.1655626                 0.09505736
  Median   98.50000000 0.1969216                 0.09877701
  Mean    100.00000000 0.2000000                 0.10000000
  3rd Qu. 101.50000000 0.2151630                 0.10266611
  Max.    116.00000000 0.3296761                 0.11516014
  coefvar   0.06497863 0.2705771                 0.06531733
          partial-leverage-log_income beta-treatment beta-log_income
  Min.                     0.04745902    0.009432553   -4.418022e-03
  1st Qu.                  0.06474135    0.012721659   -1.545444e-03
  Median                   0.08748224    0.014827927   -1.478700e-03
  Mean                     0.10000000    0.014603939   -1.467387e-03
  3rd Qu.                  0.11591556    0.016141665   -9.697266e-04
  Max.                     0.22874955    0.020724656    4.721959e-05
  coefvar                  0.52899992    0.221676594    8.002307e-01
  summclust.fixest(obj = feols_fit, cluster = ~group_id1, params = c("treatment", 
      "log_income"))
   
  Number of observations: 95 97 99 104 98 93 116 102 100 96 
  Number of clusters: 7 
   
                     coef      tstat          se     p_val   conf_int_l
  treatment   0.014634446  1.5882634 0.009214118 0.1466894 -0.006209337
  log_income -0.001417457 -0.4237128 0.003345325 0.6817219 -0.008985108
              conf_int_u
  treatment  0.035478230
  log_income 0.006150194
   
                   N_G  leverage partial-leverage-treatment
  Min.     93.00000000 0.1414602                 0.09313171
  1st Qu.  96.25000000 0.1655626                 0.09505736
  Median   98.50000000 0.1969216                 0.09877701
  Mean    100.00000000 0.2000000                 0.10000000
  3rd Qu. 101.50000000 0.2151630                 0.10266611
  Max.    116.00000000 0.3296761                 0.11516014
  coefvar   0.06497863 0.2705771                 0.06531733
          partial-leverage-log_income beta-treatment beta-log_income
  Min.                     0.04745902    0.009432553   -4.418022e-03
  1st Qu.                  0.06474135    0.012721659   -1.545444e-03
  Median                   0.08748224    0.014827927   -1.478700e-03
  Mean                     0.10000000    0.014603939   -1.467387e-03
  3rd Qu.                  0.11591556    0.016141665   -9.697266e-04
  Max.                     0.22874955    0.020724656    4.721959e-05
  coefvar                  0.52899992    0.221676594    8.002307e-01
  Loading required namespace: ggplot2
  Loading required namespace: latex2exp
  Loading required package: zoo
  
  Attaching package: 'zoo'
  
  The following objects are masked from 'package:base':
  
      as.Date, as.Date.numeric
  
  downloading the 'nlswork' dataset.
  downloading the 'nlswork' dataset.
  NOTE: 1/1/0/0 fixed-effect singletons were removed (2 observations).
  NOTE: 1/1/0/0 fixed-effect singletons were removed (2 observations).
  NOTE: 1 observation removed because of NA values (vcov: 1).
  NOTE: 1 observation removed because of NA values (vcov: 1).
  NOTE: 1 observation removed because of NA values (RHS: 1).
  [ FAIL 3 | WARN 0 | SKIP 6 | PASS 111 ]
  
  ══ Skipped tests (6) ═══════════════════════════════════════════════════════════
  • On CRAN (2): 'test-r-vs-stata-2.R:11:3', 'test-r-vs-stata.R:11:3'
  • packageVersion("sandwich") != "3.1.0" is TRUE (4):
    'test-sandwich-vcovJK.R:7:3', 'test-sandwich-vcovJK.R:188:3',
    'test-sandwich-vcovJK.R:368:3', 'test-sandwich-vcovJK.R:561:3'
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Failure ('test-r-vs-stata.R:215:3'): test against stata - leverage, fixef absorb ──
  round(max(unlist(summclust_res$leverage_g)), 6) (`actual`) not equal to 20.011074 (`expected`).
  
    `actual`: 19.0
  `expected`: 20.0
  ── Failure ('test-r-vs-stata.R:221:3'): test against stata - leverage, fixef absorb ──
  round(mean(unlist(summclust_res$leverage_g)), 6) (`actual`) not equal to 5.333333 (`expected`).
  
    `actual`: 5.17
  `expected`: 5.33
  ── Failure ('test-r-vs-stata.R:269:3'): test against stata - leverage, fixef absorb ──
  round(summclust_res$coef_var_leverage_g, 6) (`actual`) not equal to 1.155829 (`expected`).
  
    `actual`: 1.138
  `expected`: 1.156
  
  [ FAIL 3 | WARN 0 | SKIP 6 | PASS 111 ]
  Error: Test failures
  Execution halted