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. All you need to is add the option robust to you regression command. That is:

regress y x, robust

Below you find a working example that shows you how the option works

clear all import excel using "",first 

*create an interaction term 
gen interaction = lag_calories*lag_cycling 
*OLS with heteroscedasticity consistent standard errors 
regress weight lag_calories lag_cycling interaction, robust


4 thoughts on “Robust Standard Errors in STATA”

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.