Hi friends ,
am having an issue running the Sandwich Package is not working properly :
all methods are giving the same results :
1.Regular standard error ,
2 Robust (HC1)Standard
3 One way Clustered
4 Two way Clustered
you may try the below code :
# Load data
library(pacman)
p_load(data.table, fixest, magrittr, sandwich)
set.seed(1)
data(airquality)
aq = airquality
view(aq)
## Run regressions -----------------------------------------------------------
est_c0 = feols(Ozone ~ Solar.R, data = aq)
est_c1 = feols(Ozone ~ Solar.R + Wind, data = aq)
## Standard errors (just using fixest)------------------------------------------
etable(est_c0, est_c1, se = "standard") # Regular Standard Errors
etable(est_c0, est_c1, se = "hetero") # Robust (HC1) Standard Errors
etable(est_c0, est_c1, se = "cluster", # One way Clustered
cluster = c("Month"))
etable(est_c0, est_c1, se = "twoway", # Two way Clustered
cluster = c("Month", "Day"))
all the methods are giving the same results , even if you run a normal regression lm with summary you will get the same result .
is their an issue with the Sandwich package . ?
any alternative method to implement them
Thank you