Does anyone know how to replicate standard errors generated from the 'robust' option in STATA using SAS?
I have a co-author that used STATA and did xtreg with the "fe" and "robust" options. I'm using SAS and doing proc panel with the 'fixone' option. How do I replicate the "robust" standard errors from STATA? HCCME=0? HCCME=3? Use the cluster option by itself or with one of the HCCME options? I've tried all kinds of combinations, but can't replicate it, and I don't know what STATA is doing when 'robust' is chosen.
I also have a customer using robust standard errors in STATA that wants to know if there is an equivalent in SAS Viya.
@bssturgi wrote:
Does anyone know how to replicate standard errors generated from the 'robust' option in STATA using SAS?
I don't know what STATA is doing when 'robust' is chosen.
We don't know what STATA is doing either, and so its hard to determine how to match this in SAS. You really need to find the documentation on what STATA is doing to make progress here.
Thanks Paige, great point.
I did a quick search and found this summary on the web. I don't have a background in this field.
Robust Standard Errors in STATA. ”Robust” standard errors is a technique to obtain unbiased standard errors of OLS coefficients under heteroscedasticity. In contrary to other statistical software, such as R for instance, it is rather simple to calculate robust standard errors in STATA.
Well, I don't have SAS Viya, but PROC ROBUSTREG ought to be available and it will produce robust estimates of the coefficients and robust standard errors. There are four methods in PROC ROBUSTREG, please see the documentation, and I couldn't say which of these four (if any) is what STATA does.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn how to run multiple linear regression models with and without interactions, presented by SAS user Alex Chaplin.
Find more tutorials on the SAS Users YouTube channel.