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 "https://economictheoryblog.files.wordpress.com/2016/08/data.xlsx",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

Advertisements

3 thoughts on “Robust Standard Errors in STATA”

Leave a Reply

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

WordPress.com Logo

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

Google+ photo

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

Twitter picture

You are commenting using your Twitter 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.