CRAN Package Check Results for Package estimatr

Last updated on 2018-08-18 12:50:03 CEST.

Flavor Version Tinstall Tcheck Ttotal Status Flags
r-devel-linux-x86_64-debian-clang 0.10.0 77.14 72.94 150.08 ERROR
r-devel-linux-x86_64-debian-gcc 0.10.0 79.34 58.99 138.33 ERROR
r-devel-linux-x86_64-fedora-clang 0.10.0 208.58 NOTE
r-devel-linux-x86_64-fedora-gcc 0.10.0 210.52 OK
r-devel-windows-ix86+x86_64 0.10.0 175.00 176.00 351.00 OK
r-patched-linux-x86_64 0.10.0 86.93 70.69 157.62 ERROR
r-patched-solaris-x86 0.10.0 177.40 ERROR
r-release-linux-x86_64 0.10.0 91.27 70.84 162.11 ERROR
r-release-windows-ix86+x86_64 0.10.0 180.00 170.00 350.00 OK
r-release-osx-x86_64 0.10.0 NOTE
r-oldrel-windows-ix86+x86_64 0.10.0 139.00 156.00 295.00 OK
r-oldrel-osx-x86_64 0.10.0 NOTE

Check Details

Version: 0.10.0
Check: examples
Result: ERROR
    Running examples in ‘estimatr-Ex.R’ failed
    The error most likely occurred in:
    
    > base::assign(".ptime", proc.time(), pos = "CheckExEnv")
    > ### Name: commarobust
    > ### Title: Build lm_robust object from lm fit
    > ### Aliases: commarobust
    >
    > ### ** Examples
    >
    > lmo <- lm(mpg ~ hp, data = mtcars)
    >
    > # Default HC2
    > commarobust(lmo)
    Error in NextMethod("model.matrix", data = data, contrasts.arg = object$contrasts) :
     no method to invoke
    Calls: commarobust -> model.matrix.lm -> NextMethod
    Execution halted
Flavors: r-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc, r-patched-linux-x86_64, r-release-linux-x86_64

Version: 0.10.0
Check: tests
Result: ERROR
     Running ‘sleep.R’ [1s/1s]
     Comparing ‘sleep.Rout’ to ‘sleep.Rout.save’ ... OK
     Running ‘testthat.R’ [29s/31s]
    Running the tests in ‘tests/testthat.R’ failed.
    Complete output:
     > library(testthat)
     > library(estimatr)
     >
     > test_check("estimatr")
     ── 1. Error: starprep works (@test-starprep.R#11) ─────────────────────────────
     no method to invoke
     1: expect_output(stargazer::stargazer(fit_1, fit_2, type = "text", se = starprep(fit_1_r,
     fit_2), p = starprep(fit_1_r, fit_2, stat = "p.value")), "\\(0\\.015\\)\\s+\\(0\\.015\\)") at testthat/test-starprep.R:11
     2: quasi_capture(enquo(object), capture_output, label = label)
     3: capture(act$val <- eval_bare(get_expr(quo), get_env(quo)))
     4: capture_output_lines(code, print, width = width)
     5: eval_with_output(code, print = print, width = width)
     6: withr::with_output_sink(temp, withVisible(code))
     7: force(code)
     8: withVisible(code)
     9: eval_bare(get_expr(quo), get_env(quo))
     10: stargazer::stargazer(fit_1, fit_2, type = "text", se = starprep(fit_1_r, fit_2),
     p = starprep(fit_1_r, fit_2, stat = "p.value"))
     11: .stargazer.wrap(..., type = type, title = title, style = style, summary = summary,
     out = out, out.header = out.header, column.labels = column.labels, column.separate = column.separate,
     covariate.labels = covariate.labels, dep.var.caption = dep.var.caption, dep.var.labels = dep.var.labels,
     dep.var.labels.include = dep.var.labels.include, align = align, coef = coef,
     se = se, t = t, p = p, t.auto = t.auto, p.auto = p.auto, ci = ci, ci.custom = ci.custom,
     ci.level = ci.level, ci.separator = ci.separator, add.lines = add.lines, apply.coef = apply.coef,
     apply.se = apply.se, apply.t = apply.t, apply.p = apply.p, apply.ci = apply.ci,
     colnames = colnames, column.sep.width = column.sep.width, decimal.mark = decimal.mark,
     df = df, digit.separate = digit.separate, digit.separator = digit.separator,
     digits = digits, digits.extra = digits.extra, flip = flip, float = float, float.env = float.env,
     font.size = font.size, header = header, initial.zero = initial.zero, intercept.bottom = intercept.bottom,
     intercept.top = intercept.top, keep = keep, keep.stat = keep.stat, label = label,
     model.names = model.names, model.numbers = model.numbers, multicolumn = multicolumn,
     no.space = no.space, notes = notes, notes.align = notes.align, notes.append = notes.append,
     notes.label = notes.label, object.names = object.names, omit = omit, omit.labels = omit.labels,
     omit.stat = omit.stat, omit.summary.stat = omit.summary.stat, omit.table.layout = omit.table.layout,
     omit.yes.no = omit.yes.no, order = order, ord.intercepts = ord.intercepts, perl = perl,
     report = report, rownames = rownames, rq.se = rq.se, selection.equation = selection.equation,
     single.row = single.row, star.char = star.char, star.cutoffs = star.cutoffs,
     suppress.errors = suppress.errors, table.layout = table.layout, table.placement = table.placement,
     zero.component = zero.component, summary.logical = summary.logical, summary.stat = summary.stat,
     nobs = nobs, mean.sd = mean.sd, min.max = min.max, median = median, iqr = iqr,
     warn = save.warn.option)
     12: .turn.into.list(se)
     13: starprep(fit_1_r, fit_2)
     14: lapply(list(...), function(x) {
     if (class(x)[1] == "lm")
     commarobust(x, se_type = se_type, clusters = clusters, alpha = alpha)
     else x
     })
     15: FUN(X[[i]], ...)
     16: commarobust(x, se_type = se_type, clusters = clusters, alpha = alpha)
     17: model.matrix.lm(model)
     18: NextMethod("model.matrix", data = data, contrasts.arg = object$contrasts)
    
     ── 2. Failure: commarobust works with regular lm (@test-starprep.R#51) ────────
     `clo <- commarobust(lo, clusters = datmiss$cl, se_type = "CR0")` threw an error with unexpected message.
     Expected match: "`clusters` must be the same length as the model data."
     Actual message: "no method to invoke"
    
     ── 3. Error: commarobust works with regular lm (@test-starprep.R#59) ──────────
     no method to invoke
     1: commarobust(lo, se_type = "classical") at testthat/test-starprep.R:59
     2: model.matrix.lm(model)
     3: NextMethod("model.matrix", data = data, contrasts.arg = object$contrasts)
    
     ── 4. Error: commarobust works with weighted lm (@test-starprep.R#259) ────────
     no method to invoke
     1: commarobust(lo, se_type = "classical") at testthat/test-starprep.R:259
     2: model.matrix.lm(model)
     3: NextMethod("model.matrix", data = data, contrasts.arg = object$contrasts)
    
     ── 5. Error: commarobust works with dependency, weighted lm (@test-starprep.R#42
     no method to invoke
     1: commarobust(lo, se_type = "classical") at testthat/test-starprep.R:427
     2: model.matrix.lm(model)
     3: NextMethod("model.matrix", data = data, contrasts.arg = object$contrasts)
    
     ══ testthat results ═══════════════════════════════════════════════════════════
     OK: 743 SKIPPED: 0 FAILED: 5
     1. Error: starprep works (@test-starprep.R#11)
     2. Failure: commarobust works with regular lm (@test-starprep.R#51)
     3. Error: commarobust works with regular lm (@test-starprep.R#59)
     4. Error: commarobust works with weighted lm (@test-starprep.R#259)
     5. Error: commarobust works with dependency, weighted lm (@test-starprep.R#427)
    
     Error: testthat unit tests failed
     Execution halted
Flavor: r-devel-linux-x86_64-debian-clang

Version: 0.10.0
Check: tests
Result: ERROR
     Running ‘sleep.R’ [0s/1s]
     Comparing ‘sleep.Rout’ to ‘sleep.Rout.save’ ... OK
     Running ‘testthat.R’ [23s/32s]
    Running the tests in ‘tests/testthat.R’ failed.
    Complete output:
     > library(testthat)
     > library(estimatr)
     >
     > test_check("estimatr")
     ── 1. Failure: multiple outcomes (@test-lm-robust.R#640) ──────────────────────
     sandwich::vcovHC(lmo, type = "HC0") not equal to vcov(lm_robust(cbind(mpg, hp) ~ cyl, data = mtcars, se_type = "HC0")).
     8/16 mismatches (average diff: 14.6)
     [3] -16.45 - 27.902 == -44.353
     [4] 2.47 - -4.008 == 6.475
     [7] 2.47 - -4.008 == 6.475
     [8] -0.39 - 0.609 == -0.999
     [9] -16.45 - 27.902 == -44.353
     [10] 2.47 - -4.008 == 6.475
     [13] 2.47 - -4.008 == 6.475
     [14] -0.39 - 0.609 == -0.999
    
     ── 2. Failure: multiple outcomes (@test-lm-robust.R#644) ──────────────────────
     sandwich::vcovHC(lmo, type = "HC1") not equal to vcov(lm_robust(cbind(mpg, hp) ~ cyl, data = mtcars, se_type = "HC1")).
     8/16 mismatches (average diff: 15.5)
     [3] -17.547 - 29.76 == -47.31
     [4] 2.632 - -4.27 == 6.91
     [7] 2.632 - -4.27 == 6.91
     [8] -0.416 - 0.65 == -1.07
     [9] -17.547 - 29.76 == -47.31
     [10] 2.632 - -4.27 == 6.91
     [13] 2.632 - -4.27 == 6.91
     [14] -0.416 - 0.65 == -1.07
    
     ── 3. Failure: multiple outcomes (@test-lm-robust.R#648) ──────────────────────
     sandwich::vcovHC(lmo, type = "HC2") not equal to vcov(lm_robust(cbind(mpg, hp) ~ cyl, data = mtcars, se_type = "HC2")).
     8/16 mismatches (average diff: 15.8)
     [3] -17.827 - 30.220 == -48.05
     [4] 2.669 - -4.337 == 7.01
     [7] 2.669 - -4.337 == 7.01
     [8] -0.421 - 0.658 == -1.08
     [9] -17.827 - 30.220 == -48.05
     [10] 2.669 - -4.337 == 7.01
     [13] 2.669 - -4.337 == 7.01
     [14] -0.421 - 0.658 == -1.08
    
     ── 4. Failure: multiple outcomes (@test-lm-robust.R#652) ──────────────────────
     sandwich::vcovHC(lmo, type = "HC3") not equal to vcov(lm_robust(cbind(mpg, hp) ~ cyl, data = mtcars, se_type = "HC3")).
     8/16 mismatches (average diff: 17.1)
     [3] -19.319 - 32.733 == -52.05
     [4] 2.887 - -4.694 == 7.58
     [7] 2.887 - -4.694 == 7.58
     [8] -0.454 - 0.712 == -1.17
     [9] -19.319 - 32.733 == -52.05
     [10] 2.887 - -4.694 == 7.58
     [13] 2.887 - -4.694 == 7.58
     [14] -0.454 - 0.712 == -1.17
    
     ── 5. Error: starprep works (@test-starprep.R#11) ─────────────────────────────
     no method to invoke
     1: expect_output(stargazer::stargazer(fit_1, fit_2, type = "text", se = starprep(fit_1_r,
     fit_2), p = starprep(fit_1_r, fit_2, stat = "p.value")), "\\(0\\.015\\)\\s+\\(0\\.015\\)") at testthat/test-starprep.R:11
     2: quasi_capture(enquo(object), capture_output, label = label)
     3: capture(act$val <- eval_bare(get_expr(quo), get_env(quo)))
     4: capture_output_lines(code, print, width = width)
     5: eval_with_output(code, print = print, width = width)
     6: withr::with_output_sink(temp, withVisible(code))
     7: force(code)
     8: withVisible(code)
     9: eval_bare(get_expr(quo), get_env(quo))
     10: stargazer::stargazer(fit_1, fit_2, type = "text", se = starprep(fit_1_r, fit_2),
     p = starprep(fit_1_r, fit_2, stat = "p.value"))
     11: .stargazer.wrap(..., type = type, title = title, style = style, summary = summary,
     out = out, out.header = out.header, column.labels = column.labels, column.separate = column.separate,
     covariate.labels = covariate.labels, dep.var.caption = dep.var.caption, dep.var.labels = dep.var.labels,
     dep.var.labels.include = dep.var.labels.include, align = align, coef = coef,
     se = se, t = t, p = p, t.auto = t.auto, p.auto = p.auto, ci = ci, ci.custom = ci.custom,
     ci.level = ci.level, ci.separator = ci.separator, add.lines = add.lines, apply.coef = apply.coef,
     apply.se = apply.se, apply.t = apply.t, apply.p = apply.p, apply.ci = apply.ci,
     colnames = colnames, column.sep.width = column.sep.width, decimal.mark = decimal.mark,
     df = df, digit.separate = digit.separate, digit.separator = digit.separator,
     digits = digits, digits.extra = digits.extra, flip = flip, float = float, float.env = float.env,
     font.size = font.size, header = header, initial.zero = initial.zero, intercept.bottom = intercept.bottom,
     intercept.top = intercept.top, keep = keep, keep.stat = keep.stat, label = label,
     model.names = model.names, model.numbers = model.numbers, multicolumn = multicolumn,
     no.space = no.space, notes = notes, notes.align = notes.align, notes.append = notes.append,
     notes.label = notes.label, object.names = object.names, omit = omit, omit.labels = omit.labels,
     omit.stat = omit.stat, omit.summary.stat = omit.summary.stat, omit.table.layout = omit.table.layout,
     omit.yes.no = omit.yes.no, order = order, ord.intercepts = ord.intercepts, perl = perl,
     report = report, rownames = rownames, rq.se = rq.se, selection.equation = selection.equation,
     single.row = single.row, star.char = star.char, star.cutoffs = star.cutoffs,
     suppress.errors = suppress.errors, table.layout = table.layout, table.placement = table.placement,
     zero.component = zero.component, summary.logical = summary.logical, summary.stat = summary.stat,
     nobs = nobs, mean.sd = mean.sd, min.max = min.max, median = median, iqr = iqr,
     warn = save.warn.option)
     12: .turn.into.list(se)
     13: starprep(fit_1_r, fit_2)
     14: lapply(list(...), function(x) {
     if (class(x)[1] == "lm")
     commarobust(x, se_type = se_type, clusters = clusters, alpha = alpha)
     else x
     })
     15: FUN(X[[i]], ...)
     16: commarobust(x, se_type = se_type, clusters = clusters, alpha = alpha)
     17: model.matrix.lm(model)
     18: NextMethod("model.matrix", data = data, contrasts.arg = object$contrasts)
    
     ── 6. Failure: commarobust works with regular lm (@test-starprep.R#51) ────────
     `clo <- commarobust(lo, clusters = datmiss$cl, se_type = "CR0")` threw an error with unexpected message.
     Expected match: "`clusters` must be the same length as the model data."
     Actual message: "no method to invoke"
    
     ── 7. Error: commarobust works with regular lm (@test-starprep.R#59) ──────────
     no method to invoke
     1: commarobust(lo, se_type = "classical") at testthat/test-starprep.R:59
     2: model.matrix.lm(model)
     3: NextMethod("model.matrix", data = data, contrasts.arg = object$contrasts)
    
     ── 8. Error: commarobust works with weighted lm (@test-starprep.R#259) ────────
     no method to invoke
     1: commarobust(lo, se_type = "classical") at testthat/test-starprep.R:259
     2: model.matrix.lm(model)
     3: NextMethod("model.matrix", data = data, contrasts.arg = object$contrasts)
    
     ── 9. Error: commarobust works with dependency, weighted lm (@test-starprep.R#42
     no method to invoke
     1: commarobust(lo, se_type = "classical") at testthat/test-starprep.R:427
     2: model.matrix.lm(model)
     3: NextMethod("model.matrix", data = data, contrasts.arg = object$contrasts)
    
     ══ testthat results ═══════════════════════════════════════════════════════════
     OK: 739 SKIPPED: 0 FAILED: 9
     1. Failure: multiple outcomes (@test-lm-robust.R#640)
     2. Failure: multiple outcomes (@test-lm-robust.R#644)
     3. Failure: multiple outcomes (@test-lm-robust.R#648)
     4. Failure: multiple outcomes (@test-lm-robust.R#652)
     5. Error: starprep works (@test-starprep.R#11)
     6. Failure: commarobust works with regular lm (@test-starprep.R#51)
     7. Error: commarobust works with regular lm (@test-starprep.R#59)
     8. Error: commarobust works with weighted lm (@test-starprep.R#259)
     9. Error: commarobust works with dependency, weighted lm (@test-starprep.R#427)
    
     Error: testthat unit tests failed
     Execution halted
Flavor: r-devel-linux-x86_64-debian-gcc

Version: 0.10.0
Check: installed package size
Result: NOTE
     installed size is 26.6Mb
     sub-directories of 1Mb or more:
     libs 26.2Mb
Flavors: r-devel-linux-x86_64-fedora-clang, r-release-osx-x86_64, r-oldrel-osx-x86_64

Version: 0.10.0
Check: tests
Result: ERROR
     Running ‘sleep.R’ [0s/1s]
     Comparing ‘sleep.Rout’ to ‘sleep.Rout.save’ ... OK
     Running ‘testthat.R’ [29s/31s]
    Running the tests in ‘tests/testthat.R’ failed.
    Complete output:
     > library(testthat)
     > library(estimatr)
     >
     > test_check("estimatr")
     ── 1. Failure: multiple outcomes (@test-lm-robust.R#640) ──────────────────────
     sandwich::vcovHC(lmo, type = "HC0") not equal to vcov(lm_robust(cbind(mpg, hp) ~ cyl, data = mtcars, se_type = "HC0")).
     8/16 mismatches (average diff: 14.6)
     [3] -16.45 - 27.902 == -44.353
     [4] 2.47 - -4.008 == 6.475
     [7] 2.47 - -4.008 == 6.475
     [8] -0.39 - 0.609 == -0.999
     [9] -16.45 - 27.902 == -44.353
     [10] 2.47 - -4.008 == 6.475
     [13] 2.47 - -4.008 == 6.475
     [14] -0.39 - 0.609 == -0.999
    
     ── 2. Failure: multiple outcomes (@test-lm-robust.R#644) ──────────────────────
     sandwich::vcovHC(lmo, type = "HC1") not equal to vcov(lm_robust(cbind(mpg, hp) ~ cyl, data = mtcars, se_type = "HC1")).
     8/16 mismatches (average diff: 15.5)
     [3] -17.547 - 29.76 == -47.31
     [4] 2.632 - -4.27 == 6.91
     [7] 2.632 - -4.27 == 6.91
     [8] -0.416 - 0.65 == -1.07
     [9] -17.547 - 29.76 == -47.31
     [10] 2.632 - -4.27 == 6.91
     [13] 2.632 - -4.27 == 6.91
     [14] -0.416 - 0.65 == -1.07
    
     ── 3. Failure: multiple outcomes (@test-lm-robust.R#648) ──────────────────────
     sandwich::vcovHC(lmo, type = "HC2") not equal to vcov(lm_robust(cbind(mpg, hp) ~ cyl, data = mtcars, se_type = "HC2")).
     8/16 mismatches (average diff: 15.8)
     [3] -17.827 - 30.220 == -48.05
     [4] 2.669 - -4.337 == 7.01
     [7] 2.669 - -4.337 == 7.01
     [8] -0.421 - 0.658 == -1.08
     [9] -17.827 - 30.220 == -48.05
     [10] 2.669 - -4.337 == 7.01
     [13] 2.669 - -4.337 == 7.01
     [14] -0.421 - 0.658 == -1.08
    
     ── 4. Failure: multiple outcomes (@test-lm-robust.R#652) ──────────────────────
     sandwich::vcovHC(lmo, type = "HC3") not equal to vcov(lm_robust(cbind(mpg, hp) ~ cyl, data = mtcars, se_type = "HC3")).
     8/16 mismatches (average diff: 17.1)
     [3] -19.319 - 32.733 == -52.05
     [4] 2.887 - -4.694 == 7.58
     [7] 2.887 - -4.694 == 7.58
     [8] -0.454 - 0.712 == -1.17
     [9] -19.319 - 32.733 == -52.05
     [10] 2.887 - -4.694 == 7.58
     [13] 2.887 - -4.694 == 7.58
     [14] -0.454 - 0.712 == -1.17
    
     ── 5. Error: starprep works (@test-starprep.R#11) ─────────────────────────────
     no method to invoke
     1: expect_output(stargazer::stargazer(fit_1, fit_2, type = "text", se = starprep(fit_1_r,
     fit_2), p = starprep(fit_1_r, fit_2, stat = "p.value")), "\\(0\\.015\\)\\s+\\(0\\.015\\)") at testthat/test-starprep.R:11
     2: quasi_capture(enquo(object), capture_output, label = label)
     3: capture(act$val <- eval_bare(get_expr(quo), get_env(quo)))
     4: capture_output_lines(code, print, width = width)
     5: eval_with_output(code, print = print, width = width)
     6: withr::with_output_sink(temp, withVisible(code))
     7: force(code)
     8: withVisible(code)
     9: eval_bare(get_expr(quo), get_env(quo))
     10: stargazer::stargazer(fit_1, fit_2, type = "text", se = starprep(fit_1_r, fit_2),
     p = starprep(fit_1_r, fit_2, stat = "p.value"))
     11: .stargazer.wrap(..., type = type, title = title, style = style, summary = summary,
     out = out, out.header = out.header, column.labels = column.labels, column.separate = column.separate,
     covariate.labels = covariate.labels, dep.var.caption = dep.var.caption, dep.var.labels = dep.var.labels,
     dep.var.labels.include = dep.var.labels.include, align = align, coef = coef,
     se = se, t = t, p = p, t.auto = t.auto, p.auto = p.auto, ci = ci, ci.custom = ci.custom,
     ci.level = ci.level, ci.separator = ci.separator, add.lines = add.lines, apply.coef = apply.coef,
     apply.se = apply.se, apply.t = apply.t, apply.p = apply.p, apply.ci = apply.ci,
     colnames = colnames, column.sep.width = column.sep.width, decimal.mark = decimal.mark,
     df = df, digit.separate = digit.separate, digit.separator = digit.separator,
     digits = digits, digits.extra = digits.extra, flip = flip, float = float, float.env = float.env,
     font.size = font.size, header = header, initial.zero = initial.zero, intercept.bottom = intercept.bottom,
     intercept.top = intercept.top, keep = keep, keep.stat = keep.stat, label = label,
     model.names = model.names, model.numbers = model.numbers, multicolumn = multicolumn,
     no.space = no.space, notes = notes, notes.align = notes.align, notes.append = notes.append,
     notes.label = notes.label, object.names = object.names, omit = omit, omit.labels = omit.labels,
     omit.stat = omit.stat, omit.summary.stat = omit.summary.stat, omit.table.layout = omit.table.layout,
     omit.yes.no = omit.yes.no, order = order, ord.intercepts = ord.intercepts, perl = perl,
     report = report, rownames = rownames, rq.se = rq.se, selection.equation = selection.equation,
     single.row = single.row, star.char = star.char, star.cutoffs = star.cutoffs,
     suppress.errors = suppress.errors, table.layout = table.layout, table.placement = table.placement,
     zero.component = zero.component, summary.logical = summary.logical, summary.stat = summary.stat,
     nobs = nobs, mean.sd = mean.sd, min.max = min.max, median = median, iqr = iqr,
     warn = save.warn.option)
     12: .turn.into.list(se)
     13: starprep(fit_1_r, fit_2)
     14: lapply(list(...), function(x) {
     if (class(x)[1] == "lm")
     commarobust(x, se_type = se_type, clusters = clusters, alpha = alpha)
     else x
     })
     15: FUN(X[[i]], ...)
     16: commarobust(x, se_type = se_type, clusters = clusters, alpha = alpha)
     17: model.matrix.lm(model)
     18: NextMethod("model.matrix", data = data, contrasts.arg = object$contrasts)
    
     ── 6. Failure: commarobust works with regular lm (@test-starprep.R#51) ────────
     `clo <- commarobust(lo, clusters = datmiss$cl, se_type = "CR0")` threw an error with unexpected message.
     Expected match: "`clusters` must be the same length as the model data."
     Actual message: "no method to invoke"
    
     ── 7. Error: commarobust works with regular lm (@test-starprep.R#59) ──────────
     no method to invoke
     1: commarobust(lo, se_type = "classical") at testthat/test-starprep.R:59
     2: model.matrix.lm(model)
     3: NextMethod("model.matrix", data = data, contrasts.arg = object$contrasts)
    
     ── 8. Error: commarobust works with weighted lm (@test-starprep.R#259) ────────
     no method to invoke
     1: commarobust(lo, se_type = "classical") at testthat/test-starprep.R:259
     2: model.matrix.lm(model)
     3: NextMethod("model.matrix", data = data, contrasts.arg = object$contrasts)
    
     ── 9. Error: commarobust works with dependency, weighted lm (@test-starprep.R#42
     no method to invoke
     1: commarobust(lo, se_type = "classical") at testthat/test-starprep.R:427
     2: model.matrix.lm(model)
     3: NextMethod("model.matrix", data = data, contrasts.arg = object$contrasts)
    
     ══ testthat results ═══════════════════════════════════════════════════════════
     OK: 739 SKIPPED: 0 FAILED: 9
     1. Failure: multiple outcomes (@test-lm-robust.R#640)
     2. Failure: multiple outcomes (@test-lm-robust.R#644)
     3. Failure: multiple outcomes (@test-lm-robust.R#648)
     4. Failure: multiple outcomes (@test-lm-robust.R#652)
     5. Error: starprep works (@test-starprep.R#11)
     6. Failure: commarobust works with regular lm (@test-starprep.R#51)
     7. Error: commarobust works with regular lm (@test-starprep.R#59)
     8. Error: commarobust works with weighted lm (@test-starprep.R#259)
     9. Error: commarobust works with dependency, weighted lm (@test-starprep.R#427)
    
     Error: testthat unit tests failed
     Execution halted
Flavor: r-patched-linux-x86_64

Version: 0.10.0
Check: examples
Result: ERROR
    Running examples in ‘estimatr-Ex.R’ failed
    The error most likely occurred in:
    
    > ### Name: iv_robust
    > ### Title: Two-Stage Least Squares Instrumental Variables Regression
    > ### Aliases: iv_robust
    >
    > ### ** Examples
    >
    > library(fabricatr)
    > dat <- fabricate(
    + N = 40,
    + Y = rpois(N, lambda = 4),
    + Z = rbinom(N, 1, prob = 0.4),
    + D = Z * rbinom(N, 1, prob = 0.8),
    + X = rnorm(N),
    + G = sample(letters[1:4], N, replace = TRUE)
    + )
    >
    > # Instrument for treatment `D` with encouragement `Z`
    > tidy(iv_robust(Y ~ D + X | Z + X, data = dat))
     term estimate std.error statistic p.value conf.low conf.high
    1 (Intercept) 4.1844199 0.4737009 8.8334635 1.204381e-10 3.224611 5.1442292
    2 D -0.1806666 0.6563979 -0.2752394 7.846636e-01 -1.510655 1.1493219
    3 X -0.3353374 0.3159417 -1.0613901 2.953919e-01 -0.975496 0.3048213
     df outcome
    1 37 Y
    2 37 Y
    3 37 Y
    >
    > # Instrument with Stata's `ivregress 2sls , small rob` HC1 variance
    > tidy(iv_robust(Y ~ D | Z, data = dat, se_type = "stata"))
     term estimate std.error statistic p.value conf.low conf.high
    1 (Intercept) 4.1739130 0.4663684 8.9498203 6.786988e-11 3.229800 5.118026
    2 D -0.2472826 0.6576307 -0.3760205 7.089929e-01 -1.578586 1.084021
     df outcome
    1 38 Y
    2 38 Y
    >
    > # With clusters, we use CR2 errors by default
    > dat$cl <- rep(letters[1:5], length.out = nrow(dat))
    > tidy(iv_robust(Y ~ D | Z, data = dat, clusters = cl))
     term estimate std.error statistic p.value conf.low conf.high
    1 (Intercept) 4.1739130 0.3799258 10.9861279 0.0004679073 3.104427 5.243399
    2 D -0.2472826 0.8908011 -0.2775958 0.7951441307 -2.725386 2.230820
     df outcome
    1 3.865421 Y
    2 3.980269 Y
    >
    > # Again, easy to replicate Stata (again with `small` correction in Stata)
    > tidy(iv_robust(Y ~ D | Z, data = dat, clusters = cl, se_type = "stata"))
     term estimate std.error statistic p.value conf.low conf.high
    1 (Intercept) 4.1739130 0.3778202 11.0473522 0.0003817331 3.124916 5.222910
    2 D -0.2472826 0.8893636 -0.2780444 0.7947585341 -2.716552 2.221987
     df outcome
    1 4 Y
    2 4 Y
    >
    > # We can also specify fixed effects, that will be taken as exogenous regressors
    > # Speed gains with fixed effects are greatests with "stata" or "HC1" std.errors
    > tidy(iv_robust(Y ~ D | Z, data = dat, fixed_effects = ~ G, se_type = "HC1"))
    
     *** caught segfault ***
    address fd18bbf9, cause 'memory not mapped'
    
    Traceback:
     1: demeanMat(Y = as.matrix(model_data[["outcome"]]), X = model_data[["design_matrix"]], Zmat = model_data[["instrument_matrix"]], fes = model_data[["fixed_effects"]], weights = if (is.numeric(model_data[["weights"]])) model_data[["weights"]] else rep(1, nrow(model_data[["design_matrix"]])), has_int = attr(model_data$terms, "intercept"), eps = 1e-08)
     2: demean_fes(model_data)
     3: iv_robust(Y ~ D | Z, data = dat, fixed_effects = ~G, se_type = "HC1")
     4: tidy(iv_robust(Y ~ D | Z, data = dat, fixed_effects = ~G, se_type = "HC1"))
    An irrecoverable exception occurred. R is aborting now ...
Flavor: r-patched-solaris-x86

Version: 0.10.0
Check: tests
Result: ERROR
     Running ‘sleep.R’
     Comparing ‘sleep.Rout’ to ‘sleep.Rout.save’ ... OK
     Running ‘testthat.R’ [20s/33s]
    Running the tests in ‘tests/testthat.R’ failed.
    Complete output:
     > library(testthat)
     > library(estimatr)
     >
     > test_check("estimatr")
    
     *** caught segfault ***
     address fcb7bbf9, cause 'memory not mapped'
    
     Traceback:
     1: demeanMat(Y = as.matrix(model_data[["outcome"]]), X = model_data[["design_matrix"]], Zmat = model_data[["instrument_matrix"]], fes = model_data[["fixed_effects"]], weights = if (is.numeric(model_data[["weights"]])) model_data[["weights"]] else rep(1, nrow(model_data[["design_matrix"]])), has_int = attr(model_data$terms, "intercept"), eps = 1e-08)
     2: demean_fes(model_data)
     3: iv_robust(Y ~ X1 + X2 | Z + X2, fixed_effects = ~B + B2, data = dat, se_type = "classical")
     4: eval(code, test_env)
     5: eval(code, test_env)
     6: withCallingHandlers({ eval(code, test_env) if (!handled && !is.null(test)) { skip_empty() }}, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error)
     7: doTryCatch(return(expr), name, parentenv, handler)
     8: tryCatchOne(expr, names, parentenv, handlers[[1L]])
     9: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
     10: doTryCatch(return(expr), name, parentenv, handler)
     11: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), names[nh], parentenv, handlers[[nh]])
     12: tryCatchList(expr, classes, parentenv, handlers)
     13: tryCatch(withCallingHandlers({ eval(code, test_env) if (!handled && !is.null(test)) { skip_empty() }}, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error), error = handle_fatal, skip = function(e) { })
     14: test_code(desc, code, env = parent.frame())
     15: test_that("FE matches with multiple FEs and covars", { ro <- iv_robust(Y ~ X1 + X2 + factor(B) + factor(B2) | Z + X2 + factor(B) + factor(B2), data = dat, se_type = "classical") rfo <- iv_robust(Y ~ X1 + X2 | Z + X2, fixed_effects = ~B + B2, data = dat, se_type = "classical") expect_equivalent(tidy(ro)[ro$term %in% c("X1", "X2"), ], tidy(rfo)[rfo$term %in% c("X1", "X2"), ]) expect_equivalent(ro$fitted.values, rfo$fitted.values) expect_equal(ro[c("r.squared", "adj.r.squared")], rfo[c("r.squared", "adj.r.squared")]) ro <- iv_robust(Y ~ X1 + X2 + factor(B) + factor(B2) | Z + X2 + factor(B) + factor(B2), data = dat, se_type = "HC0") rfo <- iv_robust(Y ~ X1 + X2 | Z + X2, fixed_effects = ~B + B2, data = dat, se_type = "HC0") expect_equivalent(tidy(ro)[ro$term %in% c("X1", "X2"), ], tidy(rfo)[rfo$term %in% c("X1", "X2"), ]) expect_equivalent(ro$fitted.values, rfo$fitted.values) expect_equal(ro[c("r.squared", "adj.r.squared")], rfo[c("r.squared", "adj.r.squared")]) ro <- iv_robust(Y ~ X1 + X2 + factor(B) + factor(B2) | Z + X2 + factor(B) + factor(B2), data = dat, se_type = "HC1") rfo <- iv_robust(Y ~ X1 + X2 | Z + X2, fixed_effects = ~B + B2, data = dat, se_type = "HC1") expect_equivalent(tidy(ro)[ro$term %in% c("X1", "X2"), ], tidy(rfo)[rfo$term %in% c("X1", "X2"), ]) expect_equivalent(ro$fitted.values, rfo$fitted.values) expect_equal(ro[c("r.squared", "adj.r.squared")], rfo[c("r.squared", "adj.r.squared")]) ro <- iv_robust(Y ~ X1 + X2 + factor(B) + factor(B2) | Z + X2 + factor(B) + factor(B2), data = dat, se_type = "HC2") rfo <- iv_robust(Y ~ X1 + X2 | Z + X2, fixed_effects = ~B + B2, data = dat, se_type = "HC2") expect_equivalent(tidy(ro)[ro$term %in% c("X1", "X2"), ], tidy(rfo)[rfo$term %in% c("X1", "X2"), ]) expect_equivalent(ro$fitted.values, rfo$fitted.values) expect_equal(ro[c("r.squared", "adj.r.squared")], rfo[c("r.squared", "adj.r.squared")]) ro <- iv_robust(Y ~ X1 + X2 + factor(B) + factor(B2) | Z + X2 + factor(B) + factor(B2), data = dat, se_type = "HC3") rfo <- iv_robust(Y ~ X1 + X2 | Z + X2, fixed_effects = ~B + B2, data = dat, se_type = "HC3") expect_equivalent(tidy(ro)[ro$term %in% c("X1", "X2"), ], tidy(rfo)[rfo$term %in% c("X1", "X2"), ]) expect_equivalent(ro$fitted.values, rfo$fitted.values) expect_equal(ro[c("r.squared", "adj.r.squared")], rfo[c("r.squared", "adj.r.squared")]) ro <- iv_robust(Y ~ X1 + X2 + factor(B) + factor(B2) | Z + X2 + factor(B) + factor(B2), clusters = cl, data = dat, se_type = "CR0") rfo <- iv_robust(Y ~ X1 + X2 | Z + X2, fixed_effects = ~B + B2, clusters = cl, data = dat, se_type = "CR0") expect_equivalent(tidy(ro)[ro$term %in% c("X1", "X2"), ], tidy(rfo)[rfo$term %in% c("X1", "X2"), ]) expect_equivalent(ro$fitted.values, rfo$fitted.values) expect_equal(ro[c("r.squared", "adj.r.squared")], rfo[c("r.squared", "adj.r.squared")]) ro <- iv_robust(Y ~ X1 + X2 + factor(B) + factor(B2) | Z + X2 + factor(B) + factor(B2), clusters = cl, data = dat, se_type = "stata") rfo <- iv_robust(Y ~ X1 + X2 | Z + X2, fixed_effects = ~B + B2, clusters = cl, data = dat, se_type = "stata") expect_equivalent(tidy(ro)[ro$term %in% c("X1", "X2"), ], tidy(rfo)[rfo$term %in% c("X1", "X2"), ]) expect_equivalent(ro$fitted.values, rfo$fitted.values) expect_equal(ro[c("r.squared", "adj.r.squared")], rfo[c("r.squared", "adj.r.squared")]) ro <- iv_robust(Y ~ X1 + X2 + factor(B) + factor(B2) | Z + X2 + factor(B) + factor(B2), clusters = cl, data = dat, se_type = "CR2") rfo <- iv_robust(Y ~ X1 + X2 | Z + X2, fixed_effects = ~B + B2, clusters = cl, data = dat, se_type = "CR2") expect_equivalent(tidy(ro)[ro$term %in% c("X1", "X2"), ], tidy(rfo)[rfo$term %in% c("X1", "X2"), ]) expect_equivalent(ro$fitted.values, rfo$fitted.values) expect_equal(ro[c("r.squared", "adj.r.squared")], rfo[c("r.squared", "adj.r.squared")])})
     16: eval(code, test_env)
     17: eval(code, test_env)
     18: withCallingHandlers({ eval(code, test_env) if (!handled && !is.null(test)) { skip_empty() }}, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error)
     19: doTryCatch(return(expr), name, parentenv, handler)
     20: tryCatchOne(expr, names, parentenv, handlers[[1L]])
     21: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
     22: doTryCatch(return(expr), name, parentenv, handler)
     23: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), names[nh], parentenv, handlers[[nh]])
     24: tryCatchList(expr, classes, parentenv, handlers)
     25: tryCatch(withCallingHandlers({ eval(code, test_env) if (!handled && !is.null(test)) { skip_empty() }}, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error), error = handle_fatal, skip = function(e) { })
     26: test_code(NULL, exprs, env)
     27: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
     28: force(code)
     29: with_reporter(reporter = reporter, start_end_reporter = start_end_reporter, { lister$start_file(basename(path)) source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap) end_context() })
     30: FUN(X[[i]], ...)
     31: lapply(paths, test_file, env = env, reporter = current_reporter, start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
     32: force(code)
     33: with_reporter(reporter = current_reporter, results <- lapply(paths, test_file, env = env, reporter = current_reporter, start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap))
     34: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, wrap = wrap)
     35: test_dir(path = test_path, reporter = reporter, env = env, filter = filter, ..., stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, wrap = wrap)
     36: test_package_dir(package = package, test_path = test_path, filter = filter, reporter = reporter, ..., stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, wrap = wrap)
     37: test_check("estimatr")
     An irrecoverable exception occurred. R is aborting now ...
Flavor: r-patched-solaris-x86

Version: 0.10.0
Check: tests
Result: ERROR
     Running ‘sleep.R’ [1s/1s]
     Comparing ‘sleep.Rout’ to ‘sleep.Rout.save’ ... OK
     Running ‘testthat.R’ [30s/33s]
    Running the tests in ‘tests/testthat.R’ failed.
    Complete output:
     > library(testthat)
     > library(estimatr)
     >
     > test_check("estimatr")
     ── 1. Failure: multiple outcomes (@test-lm-robust.R#640) ──────────────────────
     sandwich::vcovHC(lmo, type = "HC0") not equal to vcov(lm_robust(cbind(mpg, hp) ~ cyl, data = mtcars, se_type = "HC0")).
     8/16 mismatches (average diff: 14.6)
     [3] -16.45 - 27.902 == -44.353
     [4] 2.47 - -4.008 == 6.475
     [7] 2.47 - -4.008 == 6.475
     [8] -0.39 - 0.609 == -0.999
     [9] -16.45 - 27.902 == -44.353
     [10] 2.47 - -4.008 == 6.475
     [13] 2.47 - -4.008 == 6.475
     [14] -0.39 - 0.609 == -0.999
    
     ── 2. Failure: multiple outcomes (@test-lm-robust.R#644) ──────────────────────
     sandwich::vcovHC(lmo, type = "HC1") not equal to vcov(lm_robust(cbind(mpg, hp) ~ cyl, data = mtcars, se_type = "HC1")).
     8/16 mismatches (average diff: 15.5)
     [3] -17.547 - 29.76 == -47.31
     [4] 2.632 - -4.27 == 6.91
     [7] 2.632 - -4.27 == 6.91
     [8] -0.416 - 0.65 == -1.07
     [9] -17.547 - 29.76 == -47.31
     [10] 2.632 - -4.27 == 6.91
     [13] 2.632 - -4.27 == 6.91
     [14] -0.416 - 0.65 == -1.07
    
     ── 3. Failure: multiple outcomes (@test-lm-robust.R#648) ──────────────────────
     sandwich::vcovHC(lmo, type = "HC2") not equal to vcov(lm_robust(cbind(mpg, hp) ~ cyl, data = mtcars, se_type = "HC2")).
     8/16 mismatches (average diff: 15.8)
     [3] -17.827 - 30.220 == -48.05
     [4] 2.669 - -4.337 == 7.01
     [7] 2.669 - -4.337 == 7.01
     [8] -0.421 - 0.658 == -1.08
     [9] -17.827 - 30.220 == -48.05
     [10] 2.669 - -4.337 == 7.01
     [13] 2.669 - -4.337 == 7.01
     [14] -0.421 - 0.658 == -1.08
    
     ── 4. Failure: multiple outcomes (@test-lm-robust.R#652) ──────────────────────
     sandwich::vcovHC(lmo, type = "HC3") not equal to vcov(lm_robust(cbind(mpg, hp) ~ cyl, data = mtcars, se_type = "HC3")).
     8/16 mismatches (average diff: 17.1)
     [3] -19.319 - 32.733 == -52.05
     [4] 2.887 - -4.694 == 7.58
     [7] 2.887 - -4.694 == 7.58
     [8] -0.454 - 0.712 == -1.17
     [9] -19.319 - 32.733 == -52.05
     [10] 2.887 - -4.694 == 7.58
     [13] 2.887 - -4.694 == 7.58
     [14] -0.454 - 0.712 == -1.17
    
     ── 5. Error: starprep works (@test-starprep.R#11) ─────────────────────────────
     no method to invoke
     1: expect_output(stargazer::stargazer(fit_1, fit_2, type = "text", se = starprep(fit_1_r,
     fit_2), p = starprep(fit_1_r, fit_2, stat = "p.value")), "\\(0\\.015\\)\\s+\\(0\\.015\\)") at testthat/test-starprep.R:11
     2: quasi_capture(enquo(object), capture_output, label = label)
     3: capture(act$val <- eval_bare(get_expr(quo), get_env(quo)))
     4: capture_output_lines(code, print, width = width)
     5: eval_with_output(code, print = print, width = width)
     6: withr::with_output_sink(temp, withVisible(code))
     7: force(code)
     8: withVisible(code)
     9: eval_bare(get_expr(quo), get_env(quo))
     10: stargazer::stargazer(fit_1, fit_2, type = "text", se = starprep(fit_1_r, fit_2),
     p = starprep(fit_1_r, fit_2, stat = "p.value"))
     11: .stargazer.wrap(..., type = type, title = title, style = style, summary = summary,
     out = out, out.header = out.header, column.labels = column.labels, column.separate = column.separate,
     covariate.labels = covariate.labels, dep.var.caption = dep.var.caption, dep.var.labels = dep.var.labels,
     dep.var.labels.include = dep.var.labels.include, align = align, coef = coef,
     se = se, t = t, p = p, t.auto = t.auto, p.auto = p.auto, ci = ci, ci.custom = ci.custom,
     ci.level = ci.level, ci.separator = ci.separator, add.lines = add.lines, apply.coef = apply.coef,
     apply.se = apply.se, apply.t = apply.t, apply.p = apply.p, apply.ci = apply.ci,
     colnames = colnames, column.sep.width = column.sep.width, decimal.mark = decimal.mark,
     df = df, digit.separate = digit.separate, digit.separator = digit.separator,
     digits = digits, digits.extra = digits.extra, flip = flip, float = float, float.env = float.env,
     font.size = font.size, header = header, initial.zero = initial.zero, intercept.bottom = intercept.bottom,
     intercept.top = intercept.top, keep = keep, keep.stat = keep.stat, label = label,
     model.names = model.names, model.numbers = model.numbers, multicolumn = multicolumn,
     no.space = no.space, notes = notes, notes.align = notes.align, notes.append = notes.append,
     notes.label = notes.label, object.names = object.names, omit = omit, omit.labels = omit.labels,
     omit.stat = omit.stat, omit.summary.stat = omit.summary.stat, omit.table.layout = omit.table.layout,
     omit.yes.no = omit.yes.no, order = order, ord.intercepts = ord.intercepts, perl = perl,
     report = report, rownames = rownames, rq.se = rq.se, selection.equation = selection.equation,
     single.row = single.row, star.char = star.char, star.cutoffs = star.cutoffs,
     suppress.errors = suppress.errors, table.layout = table.layout, table.placement = table.placement,
     zero.component = zero.component, summary.logical = summary.logical, summary.stat = summary.stat,
     nobs = nobs, mean.sd = mean.sd, min.max = min.max, median = median, iqr = iqr,
     warn = save.warn.option)
     12: .turn.into.list(se)
     13: starprep(fit_1_r, fit_2)
     14: lapply(list(...), function(x) {
     if (class(x)[1] == "lm")
     commarobust(x, se_type = se_type, clusters = clusters, alpha = alpha)
     else x
     })
     15: FUN(X[[i]], ...)
     16: commarobust(x, se_type = se_type, clusters = clusters, alpha = alpha)
     17: model.matrix.lm(model)
     18: NextMethod("model.matrix", data = data, contrasts.arg = object$contrasts)
    
     ── 6. Failure: commarobust works with regular lm (@test-starprep.R#51) ────────
     `clo <- commarobust(lo, clusters = datmiss$cl, se_type = "CR0")` threw an error with unexpected message.
     Expected match: "`clusters` must be the same length as the model data."
     Actual message: "no method to invoke"
    
     ── 7. Error: commarobust works with regular lm (@test-starprep.R#59) ──────────
     no method to invoke
     1: commarobust(lo, se_type = "classical") at testthat/test-starprep.R:59
     2: model.matrix.lm(model)
     3: NextMethod("model.matrix", data = data, contrasts.arg = object$contrasts)
    
     ── 8. Error: commarobust works with weighted lm (@test-starprep.R#259) ────────
     no method to invoke
     1: commarobust(lo, se_type = "classical") at testthat/test-starprep.R:259
     2: model.matrix.lm(model)
     3: NextMethod("model.matrix", data = data, contrasts.arg = object$contrasts)
    
     ── 9. Error: commarobust works with dependency, weighted lm (@test-starprep.R#42
     no method to invoke
     1: commarobust(lo, se_type = "classical") at testthat/test-starprep.R:427
     2: model.matrix.lm(model)
     3: NextMethod("model.matrix", data = data, contrasts.arg = object$contrasts)
    
     ══ testthat results ═══════════════════════════════════════════════════════════
     OK: 739 SKIPPED: 0 FAILED: 9
     1. Failure: multiple outcomes (@test-lm-robust.R#640)
     2. Failure: multiple outcomes (@test-lm-robust.R#644)
     3. Failure: multiple outcomes (@test-lm-robust.R#648)
     4. Failure: multiple outcomes (@test-lm-robust.R#652)
     5. Error: starprep works (@test-starprep.R#11)
     6. Failure: commarobust works with regular lm (@test-starprep.R#51)
     7. Error: commarobust works with regular lm (@test-starprep.R#59)
     8. Error: commarobust works with weighted lm (@test-starprep.R#259)
     9. Error: commarobust works with dependency, weighted lm (@test-starprep.R#427)
    
     Error: testthat unit tests failed
     Execution halted
Flavor: r-release-linux-x86_64