mat_tidy_robust: Use tidy() with robust vcov directly

Description Usage Arguments Examples

Description

Use tidy() with robust vcov directly

Usage

1
2
3
4
5
6
7
8
9
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

1
2
3
4
5
6
7
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 Aug. 10, 2021, 11:01 a.m.