Skip to content
Prev 26383 / 29559 Next

predict for spatial filtering in spdep

Dear all,


In the spdep  package, there is an eigenvector spatial filtering function (SpatialFiltering).

In the package document, it can be used with Linear regression (lm) to remove

spatial autocorrelation by adding it to the lm formula as a covariate.


The example does not provide though, how to apply this Spatial filtering regression (sfr) on

unseen (hold-out) sample data. I'd like to predict on 'test' data using the fitted sfr model.

Any insight is welcome.


chris