Running ‘testthat.R’ [5s/6s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > # This file is part of the standard setup for testthat.
  > # It is recommended that you do not modify it.
  > #
  > # Where should you do additional test configuration?
  > # Learn more about the roles of various files in:
  > # * https://r-pkgs.org/testing-design.html#sec-tests-files-overview
  > # * https://testthat.r-lib.org/articles/special-files.html
  > 
  > library(testthat)
  > library(tidyfinance)
  > 
  > test_check("tidyfinance")
  Error in ar.ols(x, aic = aic, order.max = order.max, na.action = na.action,  : 
    non-conformable arguments
  Saving _problems/test-estimate_fama_macbeth-93.R
  Error in ar.ols(x, aic = aic, order.max = order.max, na.action = na.action,  : 
    non-conformable arguments
  Saving _problems/test-estimate_fama_macbeth-119.R
  [ FAIL 2 | WARN 1 | SKIP 8 | PASS 86 ]
  
  ══ Skipped tests (8) ═══════════════════════════════════════════════════════════
  • On CRAN (8): 'test-create_wrds_dummy_database.R:2:3',
    'test-create_wrds_dummy_database.R:12:3',
    'test-download_data_constituents.R:2:3', 'test-download_data_factors.R:2:3',
    'test-download_data_fred.R:2:3', 'test-download_data_fred.R:14:3',
    'test-download_data_macro_predictors.R:2:3', 'test-download_data_osap.R:2:3'
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-estimate_fama_macbeth.R:89:3'): estimate_fama_macbeth works with valid newey-west vcov ──
  <dplyr:::mutate_error/rlang_error/error/condition>
  Error in `mutate(tidyr::nest(cross_sections, data = c(all_of(data_options$date), value)), model = purrr::map(data, ~lm("value ~ 1", data = .)), risk_premium = purrr::map_dbl(model, ~.$coefficients), n = purrr::map_dbl(data, nrow), standard_error = purrr::map_dbl(model, ~compute_standard_error(., vcov, vcov_options)))`: i In argument: `standard_error = purrr::map_dbl(model, ~compute_standard_error(., vcov, vcov_options))`.
  Caused by error in `purrr::map_dbl()`:
  i In index: 1.
  Caused by error in `bwNeweyWest()`:
  ! VAR(1) prewhitening of estimating functions failed
  ── Error ('test-estimate_fama_macbeth.R:119:3'): estimate_fama_macbeth computes correct number of rows ──
  <dplyr:::mutate_error/rlang_error/error/condition>
  Error in `mutate(tidyr::nest(cross_sections, data = c(all_of(data_options$date), value)), model = purrr::map(data, ~lm("value ~ 1", data = .)), risk_premium = purrr::map_dbl(model, ~.$coefficients), n = purrr::map_dbl(data, nrow), standard_error = purrr::map_dbl(model, ~compute_standard_error(., vcov, vcov_options)))`: i In argument: `standard_error = purrr::map_dbl(model, ~compute_standard_error(., vcov, vcov_options))`.
  Caused by error in `purrr::map_dbl()`:
  i In index: 1.
  Caused by error in `bwNeweyWest()`:
  ! VAR(1) prewhitening of estimating functions failed
  
  [ FAIL 2 | WARN 1 | SKIP 8 | PASS 86 ]
  Error:
  ! Test failures.
  Execution halted