IDEAS home Printed from https://ideas.repec.org/p/arx/papers/2603.03997.html

Bandwidth Selection for Spatial HAC Standard Errors

Author

Listed:
  • Alexander Lehner

Abstract

Spatial autocorrelation in regression models can lead to downward biased standard errors and thus incorrect inference. The most common correction in applied economics is the spatial heteroskedasticity and autocorrelation consistent (HAC) standard error estimator introduced by Conley (1999). A critical input is the kernel bandwidth: the distance within which residuals are allowed to be correlated. However, this is still an unresolved problem and there is no formal guidance in the literature. In this paper, I first document that the relationship between the bandwidth and the magnitude of spatial HAC standard errors is inverse-U shaped. This implies that both too narrow and too wide bandwidths lead to underestimated standard errors, contradicting the conventional wisdom that wider bandwidths yield more conservative inference. I then propose a simple, non-parametric, data-driven bandwidth selector based on the empirical covariogram of regression residuals. In extensive Monte Carlo experiments calibrated to empirically relevant spatial correlation structures across the contiguous United States, I show that the proposed method controls the false positive rate at or near the nominal 5% level across a wide range of spatial correlation intensities and sample configurations. I compare six kernel functions and find that the Bartlett and Epanechnikov kernels deliver the best size control. An empirical application using U.S. county-level data illustrates the practical relevance of the method. The R package SpatialInference implements the proposed bandwidth selection method.

Suggested Citation

  • Alexander Lehner, 2026. "Bandwidth Selection for Spatial HAC Standard Errors," Papers 2603.03997, arXiv.org.
  • Handle: RePEc:arx:papers:2603.03997
    as

    Download full text from publisher

    File URL: http://arxiv.org/pdf/2603.03997
    File Function: Latest version
    Download Restriction: no
    ---><---

    References listed on IDEAS

    as
    1. Whitney Newey & Kenneth West, 2014. "A simple, positive semi-definite, heteroscedasticity and autocorrelation consistent covariance matrix," Applied Econometrics, Russian Presidential Academy of National Economy and Public Administration (RANEPA), vol. 33(1), pages 125-132.
    2. Bester, C. Alan & Conley, Timothy G. & Hansen, Christian B. & Vogelsang, Timothy J., 2016. "FIXED-b ASYMPTOTICS FOR SPATIALLY DEPENDENT ROBUST NONPARAMETRIC COVARIANCE MATRIX ESTIMATORS," Econometric Theory, Cambridge University Press, vol. 32(1), pages 154-186, February.
    3. Nicholas M. Kiefer & Timothy J. Vogelsang & Helle Bunzel, 2000. "Simple Robust Testing of Regression Hypotheses," Econometrica, Econometric Society, vol. 68(3), pages 695-714, May.
    4. Stefano DellaVigna & Guido Imbens & Woojin Kim & David M. Ritzwoller, 2025. "Using Multiple Outcomes to Adjust Standard Errors for Spatial Correlation," NBER Working Papers 33716, National Bureau of Economic Research, Inc.
    5. Yixiao Sun & Peter C. B. Phillips & Sainan Jin, 2008. "Optimal Bandwidth Selection in Heteroskedasticity-Autocorrelation Robust Testing," Econometrica, Econometric Society, vol. 76(1), pages 175-194, January.
    6. Andrews, Donald W K, 1991. "Heteroskedasticity and Autocorrelation Consistent Covariance Matrix Estimation," Econometrica, Econometric Society, vol. 59(3), pages 817-858, May.
    7. Marianne Bertrand & Esther Duflo & Sendhil Mullainathan, 2004. "How Much Should We Trust Differences-In-Differences Estimates?," The Quarterly Journal of Economics, President and Fellows of Harvard College, vol. 119(1), pages 249-275.
    8. Moulton, Brent R., 1986. "Random group effects and the precision of regression estimates," Journal of Econometrics, Elsevier, vol. 32(3), pages 385-397, August.
    9. Ulrich K. Müller & Mark W. Watson, 2024. "Spatial Unit Roots and Spurious Regression," Econometrica, Econometric Society, vol. 92(5), pages 1661-1695, September.
    10. Ulrich K. Müller & Mark W. Watson, 2023. "Spatial Correlation Robust Inference in Linear Regression and Panel Models," Journal of Business & Economic Statistics, Taylor & Francis Journals, vol. 41(4), pages 1050-1064, October.
    11. Bester, C. Alan & Conley, Timothy G. & Hansen, Christian B., 2011. "Inference with dependent data using cluster covariance estimators," Journal of Econometrics, Elsevier, vol. 165(2), pages 137-151.
    Full references (including those not matched with items on IDEAS)

    Most related items

    These are the items that most often cite the same works as this one and are cited by the same works as this one.
    1. Kim, Min Seong & Sun, Yixiao, 2013. "Heteroskedasticity and spatiotemporal dependence robust inference for linear panel models with fixed effects," Journal of Econometrics, Elsevier, vol. 177(1), pages 85-108.
    2. Ulrich Hounyo & Min Seong Kim, 2025. "Robust Two-Sample Mean Inference under Serial Dependence," Papers 2512.11259, arXiv.org, revised Dec 2025.
    3. Chen, Kaicheng & Vogelsang, Timothy J., 2024. "Fixed-b asymptotics for panel models with two-way clustering," Journal of Econometrics, Elsevier, vol. 244(1).
    4. Vogelsang, Timothy J., 2012. "Heteroskedasticity, autocorrelation, and spatial correlation robust inference in linear panel models with fixed-effects," Journal of Econometrics, Elsevier, vol. 166(2), pages 303-319.
    5. Stefano DellaVigna & Guido Imbens & Woojin Kim & David M. Ritzwoller, 2025. "Using Multiple Outcomes to Adjust Standard Errors for Spatial Correlation," NBER Working Papers 33716, National Bureau of Economic Research, Inc.
    6. Kim, Min Seong & Sun, Yixiao & Yang, Jingjing, 2017. "A fixed-bandwidth view of the pre-asymptotic inference for kernel smoothing with time series data," Journal of Econometrics, Elsevier, vol. 197(2), pages 298-322.
    7. Kaicheng Chen & Timothy J. Vogelsang, 2023. "Fixed-b Asymptotics for Panel Models with Two-Way Clustering," Papers 2309.08707, arXiv.org, revised Aug 2024.
    8. Hwang, Jungbin & Sun, Yixiao, 2018. "Should we go one step further? An accurate comparison of one-step and two-step procedures in a generalized method of moments framework," Journal of Econometrics, Elsevier, vol. 207(2), pages 381-405.
    9. Ulrich K. Muller & Mark W. Watson, 2021. "Spatial Correlation Robust Inference," Papers 2102.09353, arXiv.org.
    10. Demetrescu, Matei & Hanck, Christoph & Kruse-Becher, Robinson, 2026. "Robust Fixed-b Inference in the Presence of Time-Varying Volatility," Econometrics and Statistics, Elsevier, vol. 37(C), pages 154-173.
    11. Matei Demetrescu & Christoph Hanck & Robinson Kruse, 2016. "Fixed-b Inference in the Presence of Time-Varying Volatility," CREATES Research Papers 2016-01, Department of Economics and Business Economics, Aarhus University.
    12. Sun, Yixiao, 2014. "Let’s fix it: Fixed-b asymptotics versus small-b asymptotics in heteroskedasticity and autocorrelation robust inference," Journal of Econometrics, Elsevier, vol. 178(P3), pages 659-677.
    13. Gupta, Abhimanyu, 2018. "Autoregressive spatial spectral estimates," Journal of Econometrics, Elsevier, vol. 203(1), pages 80-95.
    14. Hirukawa, Masayuki, 2023. "Robust Covariance Matrix Estimation in Time Series: A Review," Econometrics and Statistics, Elsevier, vol. 27(C), pages 36-61.
    15. Casini, Alessandro, 2023. "Theory of evolutionary spectra for heteroskedasticity and autocorrelation robust inference in possibly misspecified and nonstationary models," Journal of Econometrics, Elsevier, vol. 235(2), pages 372-392.
    16. Rho, Seunghwa & Vogelsang, Timothy J., 2021. "Inference in time series models using smoothed-clustered standard errors," Journal of Econometrics, Elsevier, vol. 224(1), pages 113-133.
    17. Ulrich K. Müller, 2014. "HAC Corrections for Strongly Autocorrelated Time Series," Journal of Business & Economic Statistics, Taylor & Francis Journals, vol. 32(3), pages 311-322, July.
    18. Pötscher, Benedikt M. & Preinerstorfer, David, 2018. "Controlling the size of autocorrelation robust tests," Journal of Econometrics, Elsevier, vol. 207(2), pages 406-431.
    19. Sun, Yixiao, 2013. "Fixed-smoothing Asymptotics in a Two-step GMM Framework," University of California at San Diego, Economics Working Paper Series qt64x4z265, Department of Economics, UC San Diego.
    20. Yang, Jingjing & Vogelsang, Timothy J., 2018. "Finite sample performance of a long run variance estimator based on exactly (almost) unbiased autocovariance estimators," Economics Letters, Elsevier, vol. 165(C), pages 21-27.

    More about this item

    NEP fields

    This paper has been announced in the following NEP Reports:

    Statistics

    Access and download statistics

    Corrections

    All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:arx:papers:2603.03997. See general information about how to correct material in RePEc.

    If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.

    If CitEc recognized a bibliographic reference but did not link an item in RePEc to it, you can help with this form .

    If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: arXiv administrators (email available below). General contact details of provider: http://arxiv.org/ .

    Please note that corrections may take a couple of weeks to filter through the various RePEc services.

    IDEAS is a RePEc service. RePEc uses bibliographic data supplied by the respective publishers.