Stata code for Conley (spatial) standard errors in OLS and 2SLS:
https://github.com/erikylewis/spatial_regression