The R Journal: accepted article

This article will be copy edited and may be changed before publication.

spfilteR: An R Package for Semiparametric Spatial Filtering with Eigenvectors in (Generalized) Linear Models PDF download
Sebastian Juhl

Abstract Eigenvector-based spatial filtering constitutes a highly flexible semiparametric approach to account for spatial autocorrelation in a regression framework. It combines judiciously selected eigenvectors from a transformed connectivity matrix to construct a synthetic spatial filter and remove spatial patterns from model residuals. This article introduces the spfilteR package that provides several useful and flexible tools to estimate spatially filtered linear and generalized linear models in R. While the package features functions to identify relevant eigenvectors based on different selection criteria in an unsupervised fashion, it also helps users to perform supervised spatial filtering and to select eigenvectors based on alternative user-defined criteria. After a brief discussion of the eigenvector based spatial filtering approach, this article presents the main functions of the package and illustrates their usage. A comparison to alternative implementations in other R packages highlights the added value of the spfilteR package.

Received: 2021-01-15; online 2021-09-20, supplementary material, (1.5 Kb)
CRAN packages: spfilteR, spatialreg, spmoran, adespatial, vegan
CRAN Task Views implied by cited CRAN packages: Spatial, Econometrics, Environmetrics, Multivariate, Phylogenetics, Psychometrics

CC BY 4.0
This article and supplementary materials are licensed under a Creative Commons Attribution 4.0 International license.

  author = {Sebastian Juhl},
  title = {{spfilteR: An R Package for Semiparametric Spatial Filtering
          with Eigenvectors in (Generalized) Linear Models}},
  year = {2021},
  journal = {{The R Journal}},
  doi = {10.32614/RJ-2021-085},
  url = {}