CRAN Package Check Results for Package eventstudyr

Last updated on 2025-12-21 03:49:34 CET.

Flavor Version Tinstall Tcheck Ttotal Status Flags
r-devel-linux-x86_64-debian-clang 1.1.4 9.06 120.21 129.27 ERROR
r-devel-linux-x86_64-debian-gcc 1.1.4 6.27 87.99 94.26 ERROR
r-devel-linux-x86_64-fedora-clang 1.1.4 15.00 186.50 201.50 ERROR
r-devel-linux-x86_64-fedora-gcc 1.1.4 16.00 206.22 222.22 ERROR
r-devel-windows-x86_64 1.1.4 15.00 122.00 137.00 OK
r-patched-linux-x86_64 1.1.4 8.86 127.56 136.42 OK
r-release-linux-x86_64 1.1.4 7.55 129.31 136.86 OK
r-release-macos-arm64 1.1.4 OK
r-release-macos-x86_64 1.1.4 8.00 106.00 114.00 OK
r-release-windows-x86_64 1.1.4 14.00 119.00 133.00 OK
r-oldrel-macos-arm64 1.1.4 OK
r-oldrel-macos-x86_64 1.1.4 8.00 109.00 117.00 OK
r-oldrel-windows-x86_64 1.1.4 19.00 157.00 176.00 OK

Check Details

Version: 1.1.4
Check: examples
Result: ERROR Running examples in ‘eventstudyr-Ex.R’ failed The error most likely occurred in: > base::assign(".ptime", proc.time(), pos = "CheckExEnv") > ### Name: EventStudy > ### Title: Estimates Equation (2) in Freyaldenhoven et al. (2021) > ### Aliases: EventStudy > > ### ** Examples > > > # A minimal example > eventstudy_model <- + EventStudy( + estimator = "OLS", + data = example_data, + outcomevar = "y_base", + policyvar = "z", + idvar = "id", + timevar = "t", + pre = 0, post = 3, + normalize = -1 + ) Error in `[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - : attempt access index 12/12 in VECTOR_ELT Calls: EventStudy -> ComputeFirstDifferences -> [ -> [.data.table Execution halted Flavors: r-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc

Version: 1.1.4
Check: tests
Result: ERROR Running ‘testthat.R’ [14s/14s] Running the tests in ‘tests/testthat.R’ failed. Complete output: > library(testthat) > library(eventstudyr) > > test_check("eventstudyr") Saving _problems/test-AddCIs-22.R Saving _problems/test-AddCIs-34.R Saving _problems/test-AddCIs-53.R Saving _problems/test-AddCIs-70.R Saving _problems/test-AddCIs-81.R Saving _problems/test-AddCIs-100.R Saving _problems/test-AddMeans-8.R Saving _problems/test-AddMeans-28.R Saving _problems/test-AddSuptBand-10.R Saving _problems/test-AddSuptBand-30.R Saving _problems/test-ComputeFirstDifferences-16.R Saving _problems/test-ComputeFirstDifferences-29.R Saving _problems/test-ComputeFirstDifferences-43.R Saving _problems/test-ComputeShifts-33.R Saving _problems/test-ComputeShifts-55.R Saving _problems/test-ComputeShifts-83.R Saving _problems/test-ComputeShifts-104.R Saving _problems/test-EventStudy-16.R Saving _problems/test-EventStudy-72.R Saving _problems/test-EventStudy-96.R post, overidpost, pre, and overidpre are set to 0. A static model will be estimated. post, overidpost, pre, and overidpre are set to 0. A static model will be estimated. Saving _problems/test-EventStudy-163.R Saving _problems/test-EventStudy-184.R Saving _problems/test-EventStudy-205.R Saving _problems/test-EventStudy-227.R Saving _problems/test-EventStudy-248.R Saving _problems/test-EventStudy-264.R Saving _problems/test-EventStudy-307.R Saving _problems/test-EventStudy-363.R Saving _problems/test-EventStudy-387.R Saving _problems/test-EventStudy-427.R Saving _problems/test-EventStudy-449.R Saving _problems/test-EventStudy-470.R Saving _problems/test-EventStudy-488.R Saving _problems/test-EventStudy-518.R Saving _problems/test-EventStudyPlot-11.R Saving _problems/test-EventStudyPlot-38.R Saving _problems/test-EventStudyPlot-55.R Saving _problems/test-EventStudyPlot-81.R Saving _problems/test-EventStudyPlot-106.R Saving _problems/test-EventStudyPlot-125.R Saving _problems/test-EventStudyPlot-143.R Saving _problems/test-EventStudyPlot-202.R Saving _problems/test-EventStudyPlot-225.R Saving _problems/test-EventStudyPlot-260.R Saving _problems/test-PreparePlottingData-10.R Saving _problems/test-PreparePlottingData-38.R Saving _problems/test-PreparePlottingData-65.R Saving _problems/test-PreparePlottingData-92.R Saving _problems/test-PreparePlottingData-119.R Saving _problems/test-PreparePlottingData-148.R Saving _problems/test-PreparePlottingData-177.R Saving _problems/test-PreparePlottingData-212.R Saving _problems/test-TestLinear-5.R Saving _problems/test-TestLinear-20.R Saving _problems/test-TestLinear-30.R Saving _problems/test-TestLinear-40.R Saving _problems/test-TestLinear-89.R [ FAIL 57 | WARN 0 | SKIP 0 | PASS 117 ] ══ Failed tests ════════════════════════════════════════════════════════════════ ── Error ('test-AddCIs.R:19:5'): correctly recognizes wrong class for estimate argument ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-AddCIs.R:19:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-AddCIs.R:31:5'): correctly recognizes missing columns in estimates argument ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-AddCIs.R:31:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-AddCIs.R:50:5'): correctly recognizes wrong inputs for conf_level argument ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-AddCIs.R:50:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-AddCIs.R:68:5'): correctly recognizes wrong class for estimate argument ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 6/6 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-AddCIs.R:68:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-AddCIs.R:79:5'): correctly recognizes missing columns in estimates argument ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 6/6 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-AddCIs.R:79:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-AddCIs.R:98:5'): correctly recognizes wrong inputs for conf_level argument ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 6/6 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-AddCIs.R:98:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-AddMeans.R:2:5'): means are computed correctly when a first differenced variable is normalized ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. ├─base::suppressWarnings(...) at test-AddMeans.R:2:5 2. │ └─base::withCallingHandlers(...) 3. └─eventstudyr::EventStudy(...) 4. └─eventstudyr:::ComputeFirstDifferences(...) 5. ├─...[] 6. └─data.table:::`[.data.table`(...) ── Error ('test-AddMeans.R:24:5'): means are computed correctly when the furthest lead is normalized ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-AddMeans.R:24:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-AddSuptBand.R:4:5'): check that the correct part of vcov matrix is used ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. ├─base::suppressWarnings(...) at test-AddSuptBand.R:4:5 2. │ └─base::withCallingHandlers(...) 3. └─eventstudyr::EventStudy(...) 4. └─eventstudyr:::ComputeFirstDifferences(...) 5. ├─...[] 6. └─data.table:::`[.data.table`(...) ── Error ('test-AddSuptBand.R:26:5'): check that the correct part of vcov matrix is used ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 6/6 in VECTOR_ELT Backtrace: ▆ 1. ├─base::suppressWarnings(...) at test-AddSuptBand.R:26:5 2. │ └─base::withCallingHandlers(...) 3. └─eventstudyr::EventStudy(...) 4. └─eventstudyr:::ComputeFirstDifferences(...) 5. ├─...[] 6. └─data.table:::`[.data.table`(...) ── Error ('test-ComputeFirstDifferences.R:16:5'): a column with _fd suffix is added ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 3/3 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr:::ComputeFirstDifferences(...) at test-ComputeFirstDifferences.R:16:5 2. ├─...[] 3. └─data.table:::`[.data.table`(...) ── Error ('test-ComputeFirstDifferences.R:29:5'): correctly computes differences with a balanced dataset ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 4/4 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr:::ComputeFirstDifferences(...) at test-ComputeFirstDifferences.R:29:5 2. ├─...[] 3. └─data.table:::`[.data.table`(...) ── Error ('test-ComputeFirstDifferences.R:42:5'): correctly computes differences with a dataset that has holes in time var ── Error in ``[.data.table`(df_all, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 4/4 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr:::ComputeFirstDifferences(...) at test-ComputeFirstDifferences.R:42:5 2. ├─...[] 3. └─data.table:::`[.data.table`(...) ── Error ('test-ComputeShifts.R:30:5'): correctly adds the desired number of shifts ── Error in ``[.data.table`(dat, , `:=`(paste0(shiftvar, "_lag", lags), data.table::shift(get(shiftvar), lags, type = "lag")), by = c(idvar))`: attempt access index 3/3 in VECTOR_ELT Backtrace: ▆ 1. ├─testthat::expect_equal(...) at test-ComputeShifts.R:30:5 2. │ └─testthat::quasi_label(enquo(object), label) 3. │ └─rlang::eval_bare(expr, quo_get_env(quo)) 4. ├─base::ncol(...) 5. └─eventstudyr:::ComputeShifts(...) 6. └─eventstudyr (local) compute_shifts(df, idvar, shiftvar, shiftvalues, lags, leads) 7. ├─...[] 8. └─data.table:::`[.data.table`(...) ── Error ('test-ComputeShifts.R:53:5'): the columns added have correct suffixes ── Error in ``[.data.table`(dat, , `:=`(paste0(shiftvar, "_lag", lags), data.table::shift(get(shiftvar), lags, type = "lag")), by = c(idvar))`: attempt access index 3/3 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr:::ComputeShifts(...) at test-ComputeShifts.R:53:5 2. └─eventstudyr (local) compute_shifts(df, idvar, shiftvar, shiftvalues, lags, leads) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-ComputeShifts.R:79:5'): correctly shifts variable when there are no holes in timevar ── Error in ``[.data.table`(dat, , `:=`(paste0(shiftvar, "_lag", lags), data.table::shift(get(shiftvar), lags, type = "lag")), by = c(idvar))`: attempt access index 3/3 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr:::ComputeShifts(...) at test-ComputeShifts.R:79:5 2. └─eventstudyr (local) compute_shifts(df, idvar, shiftvar, shiftvalues, lags, leads) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-ComputeShifts.R:100:5'): correctly shifts variable when there are holes in timevar ── Error in ``[.data.table`(dat, , `:=`(paste0(shiftvar, "_lag", lags), data.table::shift(get(shiftvar), lags, type = "lag")), by = c(idvar))`: attempt access index 3/3 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr:::ComputeShifts(...) at test-ComputeShifts.R:100:5 2. └─eventstudyr (local) compute_shifts(df_all, idvar, shiftvar, shiftvalues, lags, leads) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-EventStudy.R:11:5'): correctly creates highest order shiftvalues ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. ├─base::suppressWarnings(...) at test-EventStudy.R:11:5 2. │ └─base::withCallingHandlers(...) 3. └─eventstudyr::EventStudy(...) 4. └─eventstudyr:::ComputeFirstDifferences(...) 5. ├─...[] 6. └─data.table:::`[.data.table`(...) ── Error ('test-EventStudy.R:68:5'): removes the correct column when normalize < 0 ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-EventStudy.R:68:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-EventStudy.R:92:5'): removes the correct column when normalize = 0 ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-EventStudy.R:92:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-EventStudy.R:159:5'): does not create shiftvalues of differenced variable when post + overidpost - 1 < 1 ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-EventStudy.R:159:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-EventStudy.R:180:5'): does not create leads of differenced variable when pre + overidpre < 1 ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-EventStudy.R:180:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-EventStudy.R:201:5'): removes the correct column when normalize > 0 ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-EventStudy.R:201:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-EventStudy.R:223:5'): removes the correct column when normalize = - (pre + overidpre + 1) ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-EventStudy.R:223:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-EventStudy.R:244:5'): removes the correct column when normalize = post + overidpost ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-EventStudy.R:244:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-EventStudy.R:264:5'): subtraction is peformed on the correct column ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 5/5 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr:::ComputeFirstDifferences(...) at test-EventStudy.R:264:5 2. ├─...[] 3. └─data.table:::`[.data.table`(...) ── Error ('test-EventStudy.R:302:5'): correctly creates highest order leads and shiftvalues ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. ├─base::suppressWarnings(...) at test-EventStudy.R:302:5 2. │ └─base::withCallingHandlers(...) 3. └─eventstudyr::EventStudy(...) 4. └─eventstudyr:::ComputeFirstDifferences(...) 5. ├─...[] 6. └─data.table:::`[.data.table`(...) ── Error ('test-EventStudy.R:359:5'): removes the correct column when normalize < 0 ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-EventStudy.R:359:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-EventStudy.R:383:5'): removes the correct column when normalize = 0 ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-EventStudy.R:383:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-EventStudy.R:423:5'): removes the correct column when normalize > 0 ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-EventStudy.R:423:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-EventStudy.R:445:5'): removes the correct column when normalize = - (pre + overidpre + 1) ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-EventStudy.R:445:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-EventStudy.R:466:5'): removes the correct column when normalize = post + overidpost ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-EventStudy.R:466:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-EventStudy.R:481:5'): proxyIV selection works ────────────────── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. ├─testthat::expect_message(...) at test-EventStudy.R:481:5 2. │ └─testthat:::expect_condition_matching_(...) 3. │ └─testthat:::quasi_capture(...) 4. │ ├─testthat (local) .capture(...) 5. │ │ └─base::withCallingHandlers(...) 6. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo)) 7. ├─base::suppressWarnings(...) 8. │ └─base::withCallingHandlers(...) 9. └─eventstudyr::EventStudy(...) 10. └─eventstudyr:::ComputeFirstDifferences(...) 11. ├─...[] 12. └─data.table:::`[.data.table`(...) ── Error ('test-EventStudy.R:511:5'): warning with correct normalize and pre is thrown when anticpation effects are allowed and anticipation_effects_normalization is TRUE ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. ├─testthat::expect_warning(...) at test-EventStudy.R:511:5 2. │ └─testthat:::expect_condition_matching_(...) 3. │ └─testthat:::quasi_capture(...) 4. │ ├─testthat (local) .capture(...) 5. │ │ └─base::withCallingHandlers(...) 6. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo)) 7. └─eventstudyr::EventStudy(...) 8. └─eventstudyr:::ComputeFirstDifferences(...) 9. ├─...[] 10. └─data.table:::`[.data.table`(...) ── Error ('test-EventStudyPlot.R:9:5'): Dimension of OLS and FHS estimation output is the same ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-EventStudyPlot.R:9:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-EventStudyPlot.R:36:5'): correctly changes x-axis and y-axis labels ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-EventStudyPlot.R:36:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-EventStudyPlot.R:53:5'): x- and y-axis breaks and limits are correct ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-EventStudyPlot.R:53:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-EventStudyPlot.R:79:5'): correctly adds mean of outcome var ──── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-EventStudyPlot.R:79:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-EventStudyPlot.R:104:5'): sup-t bands are appropriately present or absent ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-EventStudyPlot.R:104:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-EventStudyPlot.R:123:5'): confidence intervals are appropriately present or absent ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-EventStudyPlot.R:123:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-EventStudyPlot.R:141:5'): Preevent Coeffs and Postevent Coeffs are appropriately present or absent ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-EventStudyPlot.R:141:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-EventStudyPlot.R:200:5'): Sup-t bands are wider than confidence intervals ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-EventStudyPlot.R:200:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-EventStudyPlot.R:223:5'): computed smoothest path for examples is within expectations ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-EventStudyPlot.R:223:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-EventStudyPlot.R:258:5'): computed smoothest path for FHS has at least two coefficients almost equal to zero ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-EventStudyPlot.R:258:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-PreparePlottingData.R:7:5'): labels are unique ───────────────── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-PreparePlottingData.R:7:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-PreparePlottingData.R:35:5'): the correct labels are created ─── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-PreparePlottingData.R:35:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-PreparePlottingData.R:62:5'): the labels are ordered correctly ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-PreparePlottingData.R:62:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-PreparePlottingData.R:89:5'): the control variable is removed ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-PreparePlottingData.R:89:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-PreparePlottingData.R:116:5'): the largest lag label is correctly created ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-PreparePlottingData.R:116:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-PreparePlottingData.R:145:5'): the largest lead label is correctly created ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-PreparePlottingData.R:145:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-PreparePlottingData.R:174:5'): all columns besides 'term' and 'label' are 0 for the normalization column ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-PreparePlottingData.R:174:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-PreparePlottingData.R:209:5'): all columns besides 'term' and 'label' are 0 for the proxyIV column ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-PreparePlottingData.R:209:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-TestLinear.R:2:5'): correctly recognizes wrong variable type for estimate argument ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-TestLinear.R:2:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-TestLinear.R:17:5'): correctly recognizes wrong variable type for pretrends ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-TestLinear.R:17:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-TestLinear.R:27:5'): correctly recognizes wrong variable type for leveling_off ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-TestLinear.R:27:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-TestLinear.R:37:5'): produces only functions that are specified ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-TestLinear.R:37:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-TestLinear.R:82:5'): checks equality with STATA ──────────────── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. ├─base::suppressWarnings(...) at test-TestLinear.R:82:5 2. │ └─base::withCallingHandlers(...) 3. └─eventstudyr::EventStudy(...) 4. └─eventstudyr:::ComputeFirstDifferences(...) 5. ├─...[] 6. └─data.table:::`[.data.table`(...) [ FAIL 57 | WARN 0 | SKIP 0 | PASS 117 ] Error: ! Test failures. Execution halted Flavor: r-devel-linux-x86_64-debian-clang

Version: 1.1.4
Check: re-building of vignette outputs
Result: ERROR Error(s) in re-building vignettes: ... --- re-building ‘documentation.Rmd’ using rmarkdown Quitting from documentation.Rmd:61-70 [Basic Eventstudy Example - Run Code] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ <error/rlang_error> Error in `[.data.table`: ! attempt access index 12/12 in VECTOR_ELT --- Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Error: processing vignette 'documentation.Rmd' failed with diagnostics: attempt access index 12/12 in VECTOR_ELT --- failed re-building ‘documentation.Rmd’ SUMMARY: processing the following file failed: ‘documentation.Rmd’ Error: Vignette re-building failed. Execution halted Flavors: r-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc

Version: 1.1.4
Check: tests
Result: ERROR Running ‘testthat.R’ [10s/13s] Running the tests in ‘tests/testthat.R’ failed. Complete output: > library(testthat) > library(eventstudyr) > > test_check("eventstudyr") Saving _problems/test-AddCIs-22.R Saving _problems/test-AddCIs-34.R Saving _problems/test-AddCIs-53.R Saving _problems/test-AddCIs-70.R Saving _problems/test-AddCIs-81.R Saving _problems/test-AddCIs-100.R Saving _problems/test-AddMeans-8.R Saving _problems/test-AddMeans-28.R Saving _problems/test-AddSuptBand-10.R Saving _problems/test-AddSuptBand-30.R Saving _problems/test-ComputeFirstDifferences-16.R Saving _problems/test-ComputeFirstDifferences-29.R Saving _problems/test-ComputeFirstDifferences-43.R Saving _problems/test-ComputeShifts-33.R Saving _problems/test-ComputeShifts-55.R Saving _problems/test-ComputeShifts-83.R Saving _problems/test-ComputeShifts-104.R Saving _problems/test-EventStudy-16.R Saving _problems/test-EventStudy-72.R Saving _problems/test-EventStudy-96.R post, overidpost, pre, and overidpre are set to 0. A static model will be estimated. post, overidpost, pre, and overidpre are set to 0. A static model will be estimated. Saving _problems/test-EventStudy-163.R Saving _problems/test-EventStudy-184.R Saving _problems/test-EventStudy-205.R Saving _problems/test-EventStudy-227.R Saving _problems/test-EventStudy-248.R Saving _problems/test-EventStudy-264.R Saving _problems/test-EventStudy-307.R Saving _problems/test-EventStudy-363.R Saving _problems/test-EventStudy-387.R Saving _problems/test-EventStudy-427.R Saving _problems/test-EventStudy-449.R Saving _problems/test-EventStudy-470.R Saving _problems/test-EventStudy-488.R Saving _problems/test-EventStudy-518.R Saving _problems/test-EventStudyPlot-11.R Saving _problems/test-EventStudyPlot-38.R Saving _problems/test-EventStudyPlot-55.R Saving _problems/test-EventStudyPlot-81.R Saving _problems/test-EventStudyPlot-106.R Saving _problems/test-EventStudyPlot-125.R Saving _problems/test-EventStudyPlot-143.R Saving _problems/test-EventStudyPlot-202.R Saving _problems/test-EventStudyPlot-225.R Saving _problems/test-EventStudyPlot-260.R Saving _problems/test-PreparePlottingData-10.R Saving _problems/test-PreparePlottingData-38.R Saving _problems/test-PreparePlottingData-65.R Saving _problems/test-PreparePlottingData-92.R Saving _problems/test-PreparePlottingData-119.R Saving _problems/test-PreparePlottingData-148.R Saving _problems/test-PreparePlottingData-177.R Saving _problems/test-PreparePlottingData-212.R Saving _problems/test-TestLinear-5.R Saving _problems/test-TestLinear-20.R Saving _problems/test-TestLinear-30.R Saving _problems/test-TestLinear-40.R Saving _problems/test-TestLinear-89.R [ FAIL 57 | WARN 0 | SKIP 0 | PASS 117 ] ══ Failed tests ════════════════════════════════════════════════════════════════ ── Error ('test-AddCIs.R:19:5'): correctly recognizes wrong class for estimate argument ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-AddCIs.R:19:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-AddCIs.R:31:5'): correctly recognizes missing columns in estimates argument ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-AddCIs.R:31:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-AddCIs.R:50:5'): correctly recognizes wrong inputs for conf_level argument ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-AddCIs.R:50:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-AddCIs.R:68:5'): correctly recognizes wrong class for estimate argument ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 6/6 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-AddCIs.R:68:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-AddCIs.R:79:5'): correctly recognizes missing columns in estimates argument ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 6/6 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-AddCIs.R:79:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-AddCIs.R:98:5'): correctly recognizes wrong inputs for conf_level argument ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 6/6 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-AddCIs.R:98:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-AddMeans.R:2:5'): means are computed correctly when a first differenced variable is normalized ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. ├─base::suppressWarnings(...) at test-AddMeans.R:2:5 2. │ └─base::withCallingHandlers(...) 3. └─eventstudyr::EventStudy(...) 4. └─eventstudyr:::ComputeFirstDifferences(...) 5. ├─...[] 6. └─data.table:::`[.data.table`(...) ── Error ('test-AddMeans.R:24:5'): means are computed correctly when the furthest lead is normalized ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-AddMeans.R:24:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-AddSuptBand.R:4:5'): check that the correct part of vcov matrix is used ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. ├─base::suppressWarnings(...) at test-AddSuptBand.R:4:5 2. │ └─base::withCallingHandlers(...) 3. └─eventstudyr::EventStudy(...) 4. └─eventstudyr:::ComputeFirstDifferences(...) 5. ├─...[] 6. └─data.table:::`[.data.table`(...) ── Error ('test-AddSuptBand.R:26:5'): check that the correct part of vcov matrix is used ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 6/6 in VECTOR_ELT Backtrace: ▆ 1. ├─base::suppressWarnings(...) at test-AddSuptBand.R:26:5 2. │ └─base::withCallingHandlers(...) 3. └─eventstudyr::EventStudy(...) 4. └─eventstudyr:::ComputeFirstDifferences(...) 5. ├─...[] 6. └─data.table:::`[.data.table`(...) ── Error ('test-ComputeFirstDifferences.R:16:5'): a column with _fd suffix is added ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 3/3 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr:::ComputeFirstDifferences(...) at test-ComputeFirstDifferences.R:16:5 2. ├─...[] 3. └─data.table:::`[.data.table`(...) ── Error ('test-ComputeFirstDifferences.R:29:5'): correctly computes differences with a balanced dataset ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 4/4 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr:::ComputeFirstDifferences(...) at test-ComputeFirstDifferences.R:29:5 2. ├─...[] 3. └─data.table:::`[.data.table`(...) ── Error ('test-ComputeFirstDifferences.R:42:5'): correctly computes differences with a dataset that has holes in time var ── Error in ``[.data.table`(df_all, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 4/4 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr:::ComputeFirstDifferences(...) at test-ComputeFirstDifferences.R:42:5 2. ├─...[] 3. └─data.table:::`[.data.table`(...) ── Error ('test-ComputeShifts.R:30:5'): correctly adds the desired number of shifts ── Error in ``[.data.table`(dat, , `:=`(paste0(shiftvar, "_lag", lags), data.table::shift(get(shiftvar), lags, type = "lag")), by = c(idvar))`: attempt access index 3/3 in VECTOR_ELT Backtrace: ▆ 1. ├─testthat::expect_equal(...) at test-ComputeShifts.R:30:5 2. │ └─testthat::quasi_label(enquo(object), label) 3. │ └─rlang::eval_bare(expr, quo_get_env(quo)) 4. ├─base::ncol(...) 5. └─eventstudyr:::ComputeShifts(...) 6. └─eventstudyr (local) compute_shifts(df, idvar, shiftvar, shiftvalues, lags, leads) 7. ├─...[] 8. └─data.table:::`[.data.table`(...) ── Error ('test-ComputeShifts.R:53:5'): the columns added have correct suffixes ── Error in ``[.data.table`(dat, , `:=`(paste0(shiftvar, "_lag", lags), data.table::shift(get(shiftvar), lags, type = "lag")), by = c(idvar))`: attempt access index 3/3 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr:::ComputeShifts(...) at test-ComputeShifts.R:53:5 2. └─eventstudyr (local) compute_shifts(df, idvar, shiftvar, shiftvalues, lags, leads) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-ComputeShifts.R:79:5'): correctly shifts variable when there are no holes in timevar ── Error in ``[.data.table`(dat, , `:=`(paste0(shiftvar, "_lag", lags), data.table::shift(get(shiftvar), lags, type = "lag")), by = c(idvar))`: attempt access index 3/3 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr:::ComputeShifts(...) at test-ComputeShifts.R:79:5 2. └─eventstudyr (local) compute_shifts(df, idvar, shiftvar, shiftvalues, lags, leads) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-ComputeShifts.R:100:5'): correctly shifts variable when there are holes in timevar ── Error in ``[.data.table`(dat, , `:=`(paste0(shiftvar, "_lag", lags), data.table::shift(get(shiftvar), lags, type = "lag")), by = c(idvar))`: attempt access index 3/3 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr:::ComputeShifts(...) at test-ComputeShifts.R:100:5 2. └─eventstudyr (local) compute_shifts(df_all, idvar, shiftvar, shiftvalues, lags, leads) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-EventStudy.R:11:5'): correctly creates highest order shiftvalues ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. ├─base::suppressWarnings(...) at test-EventStudy.R:11:5 2. │ └─base::withCallingHandlers(...) 3. └─eventstudyr::EventStudy(...) 4. └─eventstudyr:::ComputeFirstDifferences(...) 5. ├─...[] 6. └─data.table:::`[.data.table`(...) ── Error ('test-EventStudy.R:68:5'): removes the correct column when normalize < 0 ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-EventStudy.R:68:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-EventStudy.R:92:5'): removes the correct column when normalize = 0 ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-EventStudy.R:92:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-EventStudy.R:159:5'): does not create shiftvalues of differenced variable when post + overidpost - 1 < 1 ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-EventStudy.R:159:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-EventStudy.R:180:5'): does not create leads of differenced variable when pre + overidpre < 1 ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-EventStudy.R:180:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-EventStudy.R:201:5'): removes the correct column when normalize > 0 ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-EventStudy.R:201:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-EventStudy.R:223:5'): removes the correct column when normalize = - (pre + overidpre + 1) ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-EventStudy.R:223:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-EventStudy.R:244:5'): removes the correct column when normalize = post + overidpost ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-EventStudy.R:244:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-EventStudy.R:264:5'): subtraction is peformed on the correct column ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 5/5 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr:::ComputeFirstDifferences(...) at test-EventStudy.R:264:5 2. ├─...[] 3. └─data.table:::`[.data.table`(...) ── Error ('test-EventStudy.R:302:5'): correctly creates highest order leads and shiftvalues ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. ├─base::suppressWarnings(...) at test-EventStudy.R:302:5 2. │ └─base::withCallingHandlers(...) 3. └─eventstudyr::EventStudy(...) 4. └─eventstudyr:::ComputeFirstDifferences(...) 5. ├─...[] 6. └─data.table:::`[.data.table`(...) ── Error ('test-EventStudy.R:359:5'): removes the correct column when normalize < 0 ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-EventStudy.R:359:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-EventStudy.R:383:5'): removes the correct column when normalize = 0 ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-EventStudy.R:383:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-EventStudy.R:423:5'): removes the correct column when normalize > 0 ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-EventStudy.R:423:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-EventStudy.R:445:5'): removes the correct column when normalize = - (pre + overidpre + 1) ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-EventStudy.R:445:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-EventStudy.R:466:5'): removes the correct column when normalize = post + overidpost ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-EventStudy.R:466:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-EventStudy.R:481:5'): proxyIV selection works ────────────────── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. ├─testthat::expect_message(...) at test-EventStudy.R:481:5 2. │ └─testthat:::expect_condition_matching_(...) 3. │ └─testthat:::quasi_capture(...) 4. │ ├─testthat (local) .capture(...) 5. │ │ └─base::withCallingHandlers(...) 6. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo)) 7. ├─base::suppressWarnings(...) 8. │ └─base::withCallingHandlers(...) 9. └─eventstudyr::EventStudy(...) 10. └─eventstudyr:::ComputeFirstDifferences(...) 11. ├─...[] 12. └─data.table:::`[.data.table`(...) ── Error ('test-EventStudy.R:511:5'): warning with correct normalize and pre is thrown when anticpation effects are allowed and anticipation_effects_normalization is TRUE ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. ├─testthat::expect_warning(...) at test-EventStudy.R:511:5 2. │ └─testthat:::expect_condition_matching_(...) 3. │ └─testthat:::quasi_capture(...) 4. │ ├─testthat (local) .capture(...) 5. │ │ └─base::withCallingHandlers(...) 6. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo)) 7. └─eventstudyr::EventStudy(...) 8. └─eventstudyr:::ComputeFirstDifferences(...) 9. ├─...[] 10. └─data.table:::`[.data.table`(...) ── Error ('test-EventStudyPlot.R:9:5'): Dimension of OLS and FHS estimation output is the same ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-EventStudyPlot.R:9:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-EventStudyPlot.R:36:5'): correctly changes x-axis and y-axis labels ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-EventStudyPlot.R:36:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-EventStudyPlot.R:53:5'): x- and y-axis breaks and limits are correct ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-EventStudyPlot.R:53:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-EventStudyPlot.R:79:5'): correctly adds mean of outcome var ──── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-EventStudyPlot.R:79:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-EventStudyPlot.R:104:5'): sup-t bands are appropriately present or absent ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-EventStudyPlot.R:104:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-EventStudyPlot.R:123:5'): confidence intervals are appropriately present or absent ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-EventStudyPlot.R:123:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-EventStudyPlot.R:141:5'): Preevent Coeffs and Postevent Coeffs are appropriately present or absent ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-EventStudyPlot.R:141:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-EventStudyPlot.R:200:5'): Sup-t bands are wider than confidence intervals ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-EventStudyPlot.R:200:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-EventStudyPlot.R:223:5'): computed smoothest path for examples is within expectations ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-EventStudyPlot.R:223:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-EventStudyPlot.R:258:5'): computed smoothest path for FHS has at least two coefficients almost equal to zero ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-EventStudyPlot.R:258:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-PreparePlottingData.R:7:5'): labels are unique ───────────────── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-PreparePlottingData.R:7:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-PreparePlottingData.R:35:5'): the correct labels are created ─── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-PreparePlottingData.R:35:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-PreparePlottingData.R:62:5'): the labels are ordered correctly ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-PreparePlottingData.R:62:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-PreparePlottingData.R:89:5'): the control variable is removed ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-PreparePlottingData.R:89:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-PreparePlottingData.R:116:5'): the largest lag label is correctly created ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-PreparePlottingData.R:116:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-PreparePlottingData.R:145:5'): the largest lead label is correctly created ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-PreparePlottingData.R:145:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-PreparePlottingData.R:174:5'): all columns besides 'term' and 'label' are 0 for the normalization column ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-PreparePlottingData.R:174:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-PreparePlottingData.R:209:5'): all columns besides 'term' and 'label' are 0 for the proxyIV column ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-PreparePlottingData.R:209:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-TestLinear.R:2:5'): correctly recognizes wrong variable type for estimate argument ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-TestLinear.R:2:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-TestLinear.R:17:5'): correctly recognizes wrong variable type for pretrends ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-TestLinear.R:17:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-TestLinear.R:27:5'): correctly recognizes wrong variable type for leveling_off ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-TestLinear.R:27:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-TestLinear.R:37:5'): produces only functions that are specified ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-TestLinear.R:37:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-TestLinear.R:82:5'): checks equality with STATA ──────────────── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. ├─base::suppressWarnings(...) at test-TestLinear.R:82:5 2. │ └─base::withCallingHandlers(...) 3. └─eventstudyr::EventStudy(...) 4. └─eventstudyr:::ComputeFirstDifferences(...) 5. ├─...[] 6. └─data.table:::`[.data.table`(...) [ FAIL 57 | WARN 0 | SKIP 0 | PASS 117 ] Error: ! Test failures. Execution halted Flavor: r-devel-linux-x86_64-debian-gcc

Version: 1.1.4
Check: examples
Result: ERROR Running examples in ‘eventstudyr-Ex.R’ failed The error most likely occurred in: > ### Name: EventStudy > ### Title: Estimates Equation (2) in Freyaldenhoven et al. (2021) > ### Aliases: EventStudy > > ### ** Examples > > > # A minimal example > eventstudy_model <- + EventStudy( + estimator = "OLS", + data = example_data, + outcomevar = "y_base", + policyvar = "z", + idvar = "id", + timevar = "t", + pre = 0, post = 3, + normalize = -1 + ) Error in `[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - : attempt access index 12/12 in VECTOR_ELT Calls: EventStudy -> ComputeFirstDifferences -> [ -> [.data.table Execution halted Flavors: r-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc

Version: 1.1.4
Check: tests
Result: ERROR Running ‘testthat.R’ [21s/28s] Running the tests in ‘tests/testthat.R’ failed. Complete output: > library(testthat) > library(eventstudyr) > > test_check("eventstudyr") Saving _problems/test-AddCIs-22.R Saving _problems/test-AddCIs-34.R Saving _problems/test-AddCIs-53.R Saving _problems/test-AddCIs-70.R Saving _problems/test-AddCIs-81.R Saving _problems/test-AddCIs-100.R Saving _problems/test-AddMeans-8.R Saving _problems/test-AddMeans-28.R Saving _problems/test-AddSuptBand-10.R Saving _problems/test-AddSuptBand-30.R Saving _problems/test-ComputeFirstDifferences-16.R Saving _problems/test-ComputeFirstDifferences-29.R Saving _problems/test-ComputeFirstDifferences-43.R Saving _problems/test-ComputeShifts-33.R Saving _problems/test-ComputeShifts-55.R Saving _problems/test-ComputeShifts-83.R Saving _problems/test-ComputeShifts-104.R Saving _problems/test-EventStudy-16.R Saving _problems/test-EventStudy-72.R Saving _problems/test-EventStudy-96.R post, overidpost, pre, and overidpre are set to 0. A static model will be estimated. post, overidpost, pre, and overidpre are set to 0. A static model will be estimated. Saving _problems/test-EventStudy-163.R Saving _problems/test-EventStudy-184.R Saving _problems/test-EventStudy-205.R Saving _problems/test-EventStudy-227.R Saving _problems/test-EventStudy-248.R Saving _problems/test-EventStudy-264.R Saving _problems/test-EventStudy-307.R Saving _problems/test-EventStudy-363.R Saving _problems/test-EventStudy-387.R Saving _problems/test-EventStudy-427.R Saving _problems/test-EventStudy-449.R Saving _problems/test-EventStudy-470.R Saving _problems/test-EventStudy-488.R Saving _problems/test-EventStudy-518.R Saving _problems/test-EventStudyPlot-11.R Saving _problems/test-EventStudyPlot-38.R Saving _problems/test-EventStudyPlot-55.R Saving _problems/test-EventStudyPlot-81.R Saving _problems/test-EventStudyPlot-106.R Saving _problems/test-EventStudyPlot-125.R Saving _problems/test-EventStudyPlot-143.R Saving _problems/test-EventStudyPlot-202.R Saving _problems/test-EventStudyPlot-225.R Saving _problems/test-EventStudyPlot-260.R Saving _problems/test-PreparePlottingData-10.R Saving _problems/test-PreparePlottingData-38.R Saving _problems/test-PreparePlottingData-65.R Saving _problems/test-PreparePlottingData-92.R Saving _problems/test-PreparePlottingData-119.R Saving _problems/test-PreparePlottingData-148.R Saving _problems/test-PreparePlottingData-177.R Saving _problems/test-PreparePlottingData-212.R Saving _problems/test-TestLinear-5.R Saving _problems/test-TestLinear-20.R Saving _problems/test-TestLinear-30.R Saving _problems/test-TestLinear-40.R Saving _problems/test-TestLinear-89.R [ FAIL 57 | WARN 0 | SKIP 0 | PASS 117 ] ══ Failed tests ════════════════════════════════════════════════════════════════ ── Error ('test-AddCIs.R:19:5'): correctly recognizes wrong class for estimate argument ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-AddCIs.R:19:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-AddCIs.R:31:5'): correctly recognizes missing columns in estimates argument ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-AddCIs.R:31:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-AddCIs.R:50:5'): correctly recognizes wrong inputs for conf_level argument ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-AddCIs.R:50:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-AddCIs.R:68:5'): correctly recognizes wrong class for estimate argument ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 6/6 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-AddCIs.R:68:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-AddCIs.R:79:5'): correctly recognizes missing columns in estimates argument ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 6/6 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-AddCIs.R:79:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-AddCIs.R:98:5'): correctly recognizes wrong inputs for conf_level argument ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 6/6 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-AddCIs.R:98:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-AddMeans.R:2:5'): means are computed correctly when a first differenced variable is normalized ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. ├─base::suppressWarnings(...) at test-AddMeans.R:2:5 2. │ └─base::withCallingHandlers(...) 3. └─eventstudyr::EventStudy(...) 4. └─eventstudyr:::ComputeFirstDifferences(...) 5. ├─...[] 6. └─data.table:::`[.data.table`(...) ── Error ('test-AddMeans.R:24:5'): means are computed correctly when the furthest lead is normalized ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-AddMeans.R:24:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-AddSuptBand.R:4:5'): check that the correct part of vcov matrix is used ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. ├─base::suppressWarnings(...) at test-AddSuptBand.R:4:5 2. │ └─base::withCallingHandlers(...) 3. └─eventstudyr::EventStudy(...) 4. └─eventstudyr:::ComputeFirstDifferences(...) 5. ├─...[] 6. └─data.table:::`[.data.table`(...) ── Error ('test-AddSuptBand.R:26:5'): check that the correct part of vcov matrix is used ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 6/6 in VECTOR_ELT Backtrace: ▆ 1. ├─base::suppressWarnings(...) at test-AddSuptBand.R:26:5 2. │ └─base::withCallingHandlers(...) 3. └─eventstudyr::EventStudy(...) 4. └─eventstudyr:::ComputeFirstDifferences(...) 5. ├─...[] 6. └─data.table:::`[.data.table`(...) ── Error ('test-ComputeFirstDifferences.R:16:5'): a column with _fd suffix is added ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 3/3 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr:::ComputeFirstDifferences(...) at test-ComputeFirstDifferences.R:16:5 2. ├─...[] 3. └─data.table:::`[.data.table`(...) ── Error ('test-ComputeFirstDifferences.R:29:5'): correctly computes differences with a balanced dataset ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 4/4 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr:::ComputeFirstDifferences(...) at test-ComputeFirstDifferences.R:29:5 2. ├─...[] 3. └─data.table:::`[.data.table`(...) ── Error ('test-ComputeFirstDifferences.R:42:5'): correctly computes differences with a dataset that has holes in time var ── Error in ``[.data.table`(df_all, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 4/4 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr:::ComputeFirstDifferences(...) at test-ComputeFirstDifferences.R:42:5 2. ├─...[] 3. └─data.table:::`[.data.table`(...) ── Error ('test-ComputeShifts.R:30:5'): correctly adds the desired number of shifts ── Error in ``[.data.table`(dat, , `:=`(paste0(shiftvar, "_lag", lags), data.table::shift(get(shiftvar), lags, type = "lag")), by = c(idvar))`: attempt access index 3/3 in VECTOR_ELT Backtrace: ▆ 1. ├─testthat::expect_equal(...) at test-ComputeShifts.R:30:5 2. │ └─testthat::quasi_label(enquo(object), label) 3. │ └─rlang::eval_bare(expr, quo_get_env(quo)) 4. ├─base::ncol(...) 5. └─eventstudyr:::ComputeShifts(...) 6. └─eventstudyr (local) compute_shifts(df, idvar, shiftvar, shiftvalues, lags, leads) 7. ├─...[] 8. └─data.table:::`[.data.table`(...) ── Error ('test-ComputeShifts.R:53:5'): the columns added have correct suffixes ── Error in ``[.data.table`(dat, , `:=`(paste0(shiftvar, "_lag", lags), data.table::shift(get(shiftvar), lags, type = "lag")), by = c(idvar))`: attempt access index 3/3 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr:::ComputeShifts(...) at test-ComputeShifts.R:53:5 2. └─eventstudyr (local) compute_shifts(df, idvar, shiftvar, shiftvalues, lags, leads) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-ComputeShifts.R:79:5'): correctly shifts variable when there are no holes in timevar ── Error in ``[.data.table`(dat, , `:=`(paste0(shiftvar, "_lag", lags), data.table::shift(get(shiftvar), lags, type = "lag")), by = c(idvar))`: attempt access index 3/3 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr:::ComputeShifts(...) at test-ComputeShifts.R:79:5 2. └─eventstudyr (local) compute_shifts(df, idvar, shiftvar, shiftvalues, lags, leads) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-ComputeShifts.R:100:5'): correctly shifts variable when there are holes in timevar ── Error in ``[.data.table`(dat, , `:=`(paste0(shiftvar, "_lag", lags), data.table::shift(get(shiftvar), lags, type = "lag")), by = c(idvar))`: attempt access index 3/3 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr:::ComputeShifts(...) at test-ComputeShifts.R:100:5 2. └─eventstudyr (local) compute_shifts(df_all, idvar, shiftvar, shiftvalues, lags, leads) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-EventStudy.R:11:5'): correctly creates highest order shiftvalues ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. ├─base::suppressWarnings(...) at test-EventStudy.R:11:5 2. │ └─base::withCallingHandlers(...) 3. └─eventstudyr::EventStudy(...) 4. └─eventstudyr:::ComputeFirstDifferences(...) 5. ├─...[] 6. └─data.table:::`[.data.table`(...) ── Error ('test-EventStudy.R:68:5'): removes the correct column when normalize < 0 ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-EventStudy.R:68:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-EventStudy.R:92:5'): removes the correct column when normalize = 0 ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-EventStudy.R:92:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-EventStudy.R:159:5'): does not create shiftvalues of differenced variable when post + overidpost - 1 < 1 ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-EventStudy.R:159:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-EventStudy.R:180:5'): does not create leads of differenced variable when pre + overidpre < 1 ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-EventStudy.R:180:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-EventStudy.R:201:5'): removes the correct column when normalize > 0 ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-EventStudy.R:201:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-EventStudy.R:223:5'): removes the correct column when normalize = - (pre + overidpre + 1) ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-EventStudy.R:223:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-EventStudy.R:244:5'): removes the correct column when normalize = post + overidpost ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-EventStudy.R:244:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-EventStudy.R:264:5'): subtraction is peformed on the correct column ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 5/5 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr:::ComputeFirstDifferences(...) at test-EventStudy.R:264:5 2. ├─...[] 3. └─data.table:::`[.data.table`(...) ── Error ('test-EventStudy.R:302:5'): correctly creates highest order leads and shiftvalues ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. ├─base::suppressWarnings(...) at test-EventStudy.R:302:5 2. │ └─base::withCallingHandlers(...) 3. └─eventstudyr::EventStudy(...) 4. └─eventstudyr:::ComputeFirstDifferences(...) 5. ├─...[] 6. └─data.table:::`[.data.table`(...) ── Error ('test-EventStudy.R:359:5'): removes the correct column when normalize < 0 ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-EventStudy.R:359:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-EventStudy.R:383:5'): removes the correct column when normalize = 0 ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-EventStudy.R:383:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-EventStudy.R:423:5'): removes the correct column when normalize > 0 ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-EventStudy.R:423:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-EventStudy.R:445:5'): removes the correct column when normalize = - (pre + overidpre + 1) ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-EventStudy.R:445:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-EventStudy.R:466:5'): removes the correct column when normalize = post + overidpost ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-EventStudy.R:466:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-EventStudy.R:481:5'): proxyIV selection works ────────────────── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. ├─testthat::expect_message(...) at test-EventStudy.R:481:5 2. │ └─testthat:::expect_condition_matching_(...) 3. │ └─testthat:::quasi_capture(...) 4. │ ├─testthat (local) .capture(...) 5. │ │ └─base::withCallingHandlers(...) 6. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo)) 7. ├─base::suppressWarnings(...) 8. │ └─base::withCallingHandlers(...) 9. └─eventstudyr::EventStudy(...) 10. └─eventstudyr:::ComputeFirstDifferences(...) 11. ├─...[] 12. └─data.table:::`[.data.table`(...) ── Error ('test-EventStudy.R:511:5'): warning with correct normalize and pre is thrown when anticpation effects are allowed and anticipation_effects_normalization is TRUE ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. ├─testthat::expect_warning(...) at test-EventStudy.R:511:5 2. │ └─testthat:::expect_condition_matching_(...) 3. │ └─testthat:::quasi_capture(...) 4. │ ├─testthat (local) .capture(...) 5. │ │ └─base::withCallingHandlers(...) 6. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo)) 7. └─eventstudyr::EventStudy(...) 8. └─eventstudyr:::ComputeFirstDifferences(...) 9. ├─...[] 10. └─data.table:::`[.data.table`(...) ── Error ('test-EventStudyPlot.R:9:5'): Dimension of OLS and FHS estimation output is the same ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-EventStudyPlot.R:9:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-EventStudyPlot.R:36:5'): correctly changes x-axis and y-axis labels ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-EventStudyPlot.R:36:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-EventStudyPlot.R:53:5'): x- and y-axis breaks and limits are correct ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-EventStudyPlot.R:53:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-EventStudyPlot.R:79:5'): correctly adds mean of outcome var ──── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-EventStudyPlot.R:79:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-EventStudyPlot.R:104:5'): sup-t bands are appropriately present or absent ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-EventStudyPlot.R:104:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-EventStudyPlot.R:123:5'): confidence intervals are appropriately present or absent ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-EventStudyPlot.R:123:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-EventStudyPlot.R:141:5'): Preevent Coeffs and Postevent Coeffs are appropriately present or absent ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-EventStudyPlot.R:141:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-EventStudyPlot.R:200:5'): Sup-t bands are wider than confidence intervals ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-EventStudyPlot.R:200:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-EventStudyPlot.R:223:5'): computed smoothest path for examples is within expectations ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-EventStudyPlot.R:223:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-EventStudyPlot.R:258:5'): computed smoothest path for FHS has at least two coefficients almost equal to zero ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-EventStudyPlot.R:258:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-PreparePlottingData.R:7:5'): labels are unique ───────────────── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-PreparePlottingData.R:7:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-PreparePlottingData.R:35:5'): the correct labels are created ─── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-PreparePlottingData.R:35:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-PreparePlottingData.R:62:5'): the labels are ordered correctly ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-PreparePlottingData.R:62:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-PreparePlottingData.R:89:5'): the control variable is removed ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-PreparePlottingData.R:89:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-PreparePlottingData.R:116:5'): the largest lag label is correctly created ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-PreparePlottingData.R:116:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-PreparePlottingData.R:145:5'): the largest lead label is correctly created ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-PreparePlottingData.R:145:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-PreparePlottingData.R:174:5'): all columns besides 'term' and 'label' are 0 for the normalization column ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-PreparePlottingData.R:174:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-PreparePlottingData.R:209:5'): all columns besides 'term' and 'label' are 0 for the proxyIV column ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-PreparePlottingData.R:209:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-TestLinear.R:2:5'): correctly recognizes wrong variable type for estimate argument ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-TestLinear.R:2:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-TestLinear.R:17:5'): correctly recognizes wrong variable type for pretrends ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-TestLinear.R:17:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-TestLinear.R:27:5'): correctly recognizes wrong variable type for leveling_off ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-TestLinear.R:27:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-TestLinear.R:37:5'): produces only functions that are specified ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-TestLinear.R:37:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-TestLinear.R:82:5'): checks equality with STATA ──────────────── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. ├─base::suppressWarnings(...) at test-TestLinear.R:82:5 2. │ └─base::withCallingHandlers(...) 3. └─eventstudyr::EventStudy(...) 4. └─eventstudyr:::ComputeFirstDifferences(...) 5. ├─...[] 6. └─data.table:::`[.data.table`(...) [ FAIL 57 | WARN 0 | SKIP 0 | PASS 117 ] Error: ! Test failures. Execution halted Flavor: r-devel-linux-x86_64-fedora-clang

Version: 1.1.4
Check: re-building of vignette outputs
Result: ERROR Error(s) in re-building vignettes: --- re-building ‘documentation.Rmd’ using rmarkdown Quitting from documentation.Rmd:61-70 [Basic Eventstudy Example - Run Code] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ <error/rlang_error> Error in `[.data.table`: ! attempt access index 12/12 in VECTOR_ELT --- Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Error: processing vignette 'documentation.Rmd' failed with diagnostics: attempt access index 12/12 in VECTOR_ELT --- failed re-building ‘documentation.Rmd’ SUMMARY: processing the following file failed: ‘documentation.Rmd’ Error: Vignette re-building failed. Execution halted Flavors: r-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc

Version: 1.1.4
Check: tests
Result: ERROR Running ‘testthat.R’ [23s/50s] Running the tests in ‘tests/testthat.R’ failed. Complete output: > library(testthat) > library(eventstudyr) > > test_check("eventstudyr") Saving _problems/test-AddCIs-22.R Saving _problems/test-AddCIs-34.R Saving _problems/test-AddCIs-53.R Saving _problems/test-AddCIs-70.R Saving _problems/test-AddCIs-81.R Saving _problems/test-AddCIs-100.R Saving _problems/test-AddMeans-8.R Saving _problems/test-AddMeans-28.R Saving _problems/test-AddSuptBand-10.R Saving _problems/test-AddSuptBand-30.R Saving _problems/test-ComputeFirstDifferences-16.R Saving _problems/test-ComputeFirstDifferences-29.R Saving _problems/test-ComputeFirstDifferences-43.R Saving _problems/test-ComputeShifts-33.R Saving _problems/test-ComputeShifts-55.R Saving _problems/test-ComputeShifts-83.R Saving _problems/test-ComputeShifts-104.R Saving _problems/test-EventStudy-16.R Saving _problems/test-EventStudy-72.R Saving _problems/test-EventStudy-96.R post, overidpost, pre, and overidpre are set to 0. A static model will be estimated. post, overidpost, pre, and overidpre are set to 0. A static model will be estimated. Saving _problems/test-EventStudy-163.R Saving _problems/test-EventStudy-184.R Saving _problems/test-EventStudy-205.R Saving _problems/test-EventStudy-227.R Saving _problems/test-EventStudy-248.R Saving _problems/test-EventStudy-264.R Saving _problems/test-EventStudy-307.R Saving _problems/test-EventStudy-363.R Saving _problems/test-EventStudy-387.R Saving _problems/test-EventStudy-427.R Saving _problems/test-EventStudy-449.R Saving _problems/test-EventStudy-470.R Saving _problems/test-EventStudy-488.R Saving _problems/test-EventStudy-518.R Saving _problems/test-EventStudyPlot-11.R Saving _problems/test-EventStudyPlot-38.R Saving _problems/test-EventStudyPlot-55.R Saving _problems/test-EventStudyPlot-81.R Saving _problems/test-EventStudyPlot-106.R Saving _problems/test-EventStudyPlot-125.R Saving _problems/test-EventStudyPlot-143.R Saving _problems/test-EventStudyPlot-202.R Saving _problems/test-EventStudyPlot-225.R Saving _problems/test-EventStudyPlot-260.R Saving _problems/test-PreparePlottingData-10.R Saving _problems/test-PreparePlottingData-38.R Saving _problems/test-PreparePlottingData-65.R Saving _problems/test-PreparePlottingData-92.R Saving _problems/test-PreparePlottingData-119.R Saving _problems/test-PreparePlottingData-148.R Saving _problems/test-PreparePlottingData-177.R Saving _problems/test-PreparePlottingData-212.R Saving _problems/test-TestLinear-5.R Saving _problems/test-TestLinear-20.R Saving _problems/test-TestLinear-30.R Saving _problems/test-TestLinear-40.R Saving _problems/test-TestLinear-89.R [ FAIL 57 | WARN 0 | SKIP 0 | PASS 117 ] ══ Failed tests ════════════════════════════════════════════════════════════════ ── Error ('test-AddCIs.R:19:5'): correctly recognizes wrong class for estimate argument ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-AddCIs.R:19:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-AddCIs.R:31:5'): correctly recognizes missing columns in estimates argument ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-AddCIs.R:31:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-AddCIs.R:50:5'): correctly recognizes wrong inputs for conf_level argument ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-AddCIs.R:50:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-AddCIs.R:68:5'): correctly recognizes wrong class for estimate argument ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 6/6 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-AddCIs.R:68:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-AddCIs.R:79:5'): correctly recognizes missing columns in estimates argument ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 6/6 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-AddCIs.R:79:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-AddCIs.R:98:5'): correctly recognizes wrong inputs for conf_level argument ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 6/6 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-AddCIs.R:98:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-AddMeans.R:2:5'): means are computed correctly when a first differenced variable is normalized ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. ├─base::suppressWarnings(...) at test-AddMeans.R:2:5 2. │ └─base::withCallingHandlers(...) 3. └─eventstudyr::EventStudy(...) 4. └─eventstudyr:::ComputeFirstDifferences(...) 5. ├─...[] 6. └─data.table:::`[.data.table`(...) ── Error ('test-AddMeans.R:24:5'): means are computed correctly when the furthest lead is normalized ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-AddMeans.R:24:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-AddSuptBand.R:4:5'): check that the correct part of vcov matrix is used ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. ├─base::suppressWarnings(...) at test-AddSuptBand.R:4:5 2. │ └─base::withCallingHandlers(...) 3. └─eventstudyr::EventStudy(...) 4. └─eventstudyr:::ComputeFirstDifferences(...) 5. ├─...[] 6. └─data.table:::`[.data.table`(...) ── Error ('test-AddSuptBand.R:26:5'): check that the correct part of vcov matrix is used ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 6/6 in VECTOR_ELT Backtrace: ▆ 1. ├─base::suppressWarnings(...) at test-AddSuptBand.R:26:5 2. │ └─base::withCallingHandlers(...) 3. └─eventstudyr::EventStudy(...) 4. └─eventstudyr:::ComputeFirstDifferences(...) 5. ├─...[] 6. └─data.table:::`[.data.table`(...) ── Error ('test-ComputeFirstDifferences.R:16:5'): a column with _fd suffix is added ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 3/3 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr:::ComputeFirstDifferences(...) at test-ComputeFirstDifferences.R:16:5 2. ├─...[] 3. └─data.table:::`[.data.table`(...) ── Error ('test-ComputeFirstDifferences.R:29:5'): correctly computes differences with a balanced dataset ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 4/4 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr:::ComputeFirstDifferences(...) at test-ComputeFirstDifferences.R:29:5 2. ├─...[] 3. └─data.table:::`[.data.table`(...) ── Error ('test-ComputeFirstDifferences.R:42:5'): correctly computes differences with a dataset that has holes in time var ── Error in ``[.data.table`(df_all, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 4/4 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr:::ComputeFirstDifferences(...) at test-ComputeFirstDifferences.R:42:5 2. ├─...[] 3. └─data.table:::`[.data.table`(...) ── Error ('test-ComputeShifts.R:30:5'): correctly adds the desired number of shifts ── Error in ``[.data.table`(dat, , `:=`(paste0(shiftvar, "_lag", lags), data.table::shift(get(shiftvar), lags, type = "lag")), by = c(idvar))`: attempt access index 3/3 in VECTOR_ELT Backtrace: ▆ 1. ├─testthat::expect_equal(...) at test-ComputeShifts.R:30:5 2. │ └─testthat::quasi_label(enquo(object), label) 3. │ └─rlang::eval_bare(expr, quo_get_env(quo)) 4. ├─base::ncol(...) 5. └─eventstudyr:::ComputeShifts(...) 6. └─eventstudyr (local) compute_shifts(df, idvar, shiftvar, shiftvalues, lags, leads) 7. ├─...[] 8. └─data.table:::`[.data.table`(...) ── Error ('test-ComputeShifts.R:53:5'): the columns added have correct suffixes ── Error in ``[.data.table`(dat, , `:=`(paste0(shiftvar, "_lag", lags), data.table::shift(get(shiftvar), lags, type = "lag")), by = c(idvar))`: attempt access index 3/3 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr:::ComputeShifts(...) at test-ComputeShifts.R:53:5 2. └─eventstudyr (local) compute_shifts(df, idvar, shiftvar, shiftvalues, lags, leads) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-ComputeShifts.R:79:5'): correctly shifts variable when there are no holes in timevar ── Error in ``[.data.table`(dat, , `:=`(paste0(shiftvar, "_lag", lags), data.table::shift(get(shiftvar), lags, type = "lag")), by = c(idvar))`: attempt access index 3/3 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr:::ComputeShifts(...) at test-ComputeShifts.R:79:5 2. └─eventstudyr (local) compute_shifts(df, idvar, shiftvar, shiftvalues, lags, leads) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-ComputeShifts.R:100:5'): correctly shifts variable when there are holes in timevar ── Error in ``[.data.table`(dat, , `:=`(paste0(shiftvar, "_lag", lags), data.table::shift(get(shiftvar), lags, type = "lag")), by = c(idvar))`: attempt access index 3/3 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr:::ComputeShifts(...) at test-ComputeShifts.R:100:5 2. └─eventstudyr (local) compute_shifts(df_all, idvar, shiftvar, shiftvalues, lags, leads) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-EventStudy.R:11:5'): correctly creates highest order shiftvalues ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. ├─base::suppressWarnings(...) at test-EventStudy.R:11:5 2. │ └─base::withCallingHandlers(...) 3. └─eventstudyr::EventStudy(...) 4. └─eventstudyr:::ComputeFirstDifferences(...) 5. ├─...[] 6. └─data.table:::`[.data.table`(...) ── Error ('test-EventStudy.R:68:5'): removes the correct column when normalize < 0 ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-EventStudy.R:68:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-EventStudy.R:92:5'): removes the correct column when normalize = 0 ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-EventStudy.R:92:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-EventStudy.R:159:5'): does not create shiftvalues of differenced variable when post + overidpost - 1 < 1 ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-EventStudy.R:159:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-EventStudy.R:180:5'): does not create leads of differenced variable when pre + overidpre < 1 ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-EventStudy.R:180:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-EventStudy.R:201:5'): removes the correct column when normalize > 0 ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-EventStudy.R:201:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-EventStudy.R:223:5'): removes the correct column when normalize = - (pre + overidpre + 1) ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-EventStudy.R:223:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-EventStudy.R:244:5'): removes the correct column when normalize = post + overidpost ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-EventStudy.R:244:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-EventStudy.R:264:5'): subtraction is peformed on the correct column ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 5/5 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr:::ComputeFirstDifferences(...) at test-EventStudy.R:264:5 2. ├─...[] 3. └─data.table:::`[.data.table`(...) ── Error ('test-EventStudy.R:302:5'): correctly creates highest order leads and shiftvalues ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. ├─base::suppressWarnings(...) at test-EventStudy.R:302:5 2. │ └─base::withCallingHandlers(...) 3. └─eventstudyr::EventStudy(...) 4. └─eventstudyr:::ComputeFirstDifferences(...) 5. ├─...[] 6. └─data.table:::`[.data.table`(...) ── Error ('test-EventStudy.R:359:5'): removes the correct column when normalize < 0 ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-EventStudy.R:359:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-EventStudy.R:383:5'): removes the correct column when normalize = 0 ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-EventStudy.R:383:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-EventStudy.R:423:5'): removes the correct column when normalize > 0 ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-EventStudy.R:423:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-EventStudy.R:445:5'): removes the correct column when normalize = - (pre + overidpre + 1) ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-EventStudy.R:445:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-EventStudy.R:466:5'): removes the correct column when normalize = post + overidpost ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-EventStudy.R:466:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-EventStudy.R:481:5'): proxyIV selection works ────────────────── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. ├─testthat::expect_message(...) at test-EventStudy.R:481:5 2. │ └─testthat:::expect_condition_matching_(...) 3. │ └─testthat:::quasi_capture(...) 4. │ ├─testthat (local) .capture(...) 5. │ │ └─base::withCallingHandlers(...) 6. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo)) 7. ├─base::suppressWarnings(...) 8. │ └─base::withCallingHandlers(...) 9. └─eventstudyr::EventStudy(...) 10. └─eventstudyr:::ComputeFirstDifferences(...) 11. ├─...[] 12. └─data.table:::`[.data.table`(...) ── Error ('test-EventStudy.R:511:5'): warning with correct normalize and pre is thrown when anticpation effects are allowed and anticipation_effects_normalization is TRUE ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. ├─testthat::expect_warning(...) at test-EventStudy.R:511:5 2. │ └─testthat:::expect_condition_matching_(...) 3. │ └─testthat:::quasi_capture(...) 4. │ ├─testthat (local) .capture(...) 5. │ │ └─base::withCallingHandlers(...) 6. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo)) 7. └─eventstudyr::EventStudy(...) 8. └─eventstudyr:::ComputeFirstDifferences(...) 9. ├─...[] 10. └─data.table:::`[.data.table`(...) ── Error ('test-EventStudyPlot.R:9:5'): Dimension of OLS and FHS estimation output is the same ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-EventStudyPlot.R:9:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-EventStudyPlot.R:36:5'): correctly changes x-axis and y-axis labels ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-EventStudyPlot.R:36:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-EventStudyPlot.R:53:5'): x- and y-axis breaks and limits are correct ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-EventStudyPlot.R:53:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-EventStudyPlot.R:79:5'): correctly adds mean of outcome var ──── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-EventStudyPlot.R:79:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-EventStudyPlot.R:104:5'): sup-t bands are appropriately present or absent ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-EventStudyPlot.R:104:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-EventStudyPlot.R:123:5'): confidence intervals are appropriately present or absent ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-EventStudyPlot.R:123:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-EventStudyPlot.R:141:5'): Preevent Coeffs and Postevent Coeffs are appropriately present or absent ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-EventStudyPlot.R:141:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-EventStudyPlot.R:200:5'): Sup-t bands are wider than confidence intervals ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-EventStudyPlot.R:200:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-EventStudyPlot.R:223:5'): computed smoothest path for examples is within expectations ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-EventStudyPlot.R:223:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-EventStudyPlot.R:258:5'): computed smoothest path for FHS has at least two coefficients almost equal to zero ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-EventStudyPlot.R:258:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-PreparePlottingData.R:7:5'): labels are unique ───────────────── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-PreparePlottingData.R:7:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-PreparePlottingData.R:35:5'): the correct labels are created ─── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-PreparePlottingData.R:35:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-PreparePlottingData.R:62:5'): the labels are ordered correctly ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-PreparePlottingData.R:62:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-PreparePlottingData.R:89:5'): the control variable is removed ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-PreparePlottingData.R:89:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-PreparePlottingData.R:116:5'): the largest lag label is correctly created ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-PreparePlottingData.R:116:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-PreparePlottingData.R:145:5'): the largest lead label is correctly created ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-PreparePlottingData.R:145:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-PreparePlottingData.R:174:5'): all columns besides 'term' and 'label' are 0 for the normalization column ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-PreparePlottingData.R:174:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-PreparePlottingData.R:209:5'): all columns besides 'term' and 'label' are 0 for the proxyIV column ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-PreparePlottingData.R:209:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-TestLinear.R:2:5'): correctly recognizes wrong variable type for estimate argument ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-TestLinear.R:2:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-TestLinear.R:17:5'): correctly recognizes wrong variable type for pretrends ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-TestLinear.R:17:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-TestLinear.R:27:5'): correctly recognizes wrong variable type for leveling_off ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-TestLinear.R:27:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-TestLinear.R:37:5'): produces only functions that are specified ── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. └─eventstudyr::EventStudy(...) at test-TestLinear.R:37:5 2. └─eventstudyr:::ComputeFirstDifferences(...) 3. ├─...[] 4. └─data.table:::`[.data.table`(...) ── Error ('test-TestLinear.R:82:5'): checks equality with STATA ──────────────── Error in ``[.data.table`(df, , `:=`(paste0(diffvar, "_fd"), get(diffvar) - shift((get(diffvar)))), by = idvar)`: attempt access index 12/12 in VECTOR_ELT Backtrace: ▆ 1. ├─base::suppressWarnings(...) at test-TestLinear.R:82:5 2. │ └─base::withCallingHandlers(...) 3. └─eventstudyr::EventStudy(...) 4. └─eventstudyr:::ComputeFirstDifferences(...) 5. ├─...[] 6. └─data.table:::`[.data.table`(...) [ FAIL 57 | WARN 0 | SKIP 0 | PASS 117 ] Error: ! Test failures. Execution halted Flavor: r-devel-linux-x86_64-fedora-gcc