/vcovConley

R package to calculate Conley's spatially weighted variance-covariance matrix

Primary LanguageRMIT LicenseMIT

ConleySE

An R package to account for spatial correlation as in Conley (1999) in R. ConleySE currently works with model objects generated by lm() and lfe::felm(), or can be used manually for other model objects.

The package is based on and uses cpp code from to provide fast calculate of the distance matrix and spatial correlation.

Acknowledgements

This package is essentially a set of R wrappers around cpp functions written by Darin Christensen and Thiemo Fetzer in the conley-se github repository. That code calculates Conley-adjusted standard errors for lfe::felm() models. This package extends that to work with lm() and plm().

The original stata code was written by Solomon Hsiang. Jordan Adamson found an error that was transcribed by Christensen and Fetzer and has since been fixed, as described in this blog post.

The procedure is from Conley (1999) and Conley and Molinari (2007).

Installation

Install using devtools:

install.packages("devtools")
devtools::install_github("potterzot/ConleySE")

Usage

To be done.

References

  • Conley, Timothy G. "GMM estimation with cross sectional dependence." Journal of econometrics 92.1 (1999): 1-45.
  • Conley, Timothy G., and Francesca Molinari. "Spatial correlation robust inference with errors in location or distance." Journal of Econometrics 140.1 (2007): 76-96.