mat_tidy_robust: Use tidy() with robust vcov directly

mat_tidy_robustR Documentation

Use tidy() with robust vcov directly

Description

Use tidy() with robust vcov directly

Usage

mat_tidy_robust(
  x,
  vcov. = NULL,
  conf.int = TRUE,
  df = NULL,
  parm = NULL,
  level = 0.95,
  ...
)

Arguments

x

object for which hopfully there is a coeftst/vcov method

conf.int

return confindence interval? Determined by level

df, parm, level, vcov.

arguments to coeftest

...

passed to vcov (well to coeftest who does the jo)

Examples

library(sandwich)
reg <-  lm(freeny)
standard_me <- mat_tidy_robust(reg)
standard_br <- broom::tidy(reg, conf.int = TRUE)
all.equal(as.data.frame(standard_me), as.data.frame(standard_br))
mat_tidy_robust(reg, vcov. = vcovHC(reg))
mat_tidy_robust(reg, vcov. = vcovHC)

MatthieuStigler/matPkg documentation built on Sept. 19, 2024, 5:19 a.m.