Robust Standard Error -

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

I have run the code and it works fine. It seems that the issue may be related to the 'sandwich' package. One possible solution could be to try updating the package by running 'update.packages("sandwich")' in R. Additionally, it may be worth checking to make sure that all necessary dependencies are also installed and updated. If the issue persists, try installing the package again using 'install.packages("sandwich")'.

Dear Talha

did you compare the result ,
my question was about the results , when you compare the results between the 4 methods , you are getting the same results .

Oh, yes I just noticed that all the results are giving the same results. I will look into it and get back to you.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.