| lmFilter | R Documentation |
This function implements the eigenvector-based semiparametric spatial filtering approach in a linear regression framework using ordinary least squares (OLS). Eigenvectors are selected by an unsupervised stepwise regression technique. Supported selection criteria are the minimization of residual autocorrelation, maximization of model fit, significance of residual autocorrelation, and the statistical significance of eigenvectors. Alternatively, all eigenvectors in the candidate set can be included as well.
lmFilter(
y,
x = NULL,
W,
objfn = "MI",
MX = NULL,
sig = 0.05,
bonferroni = TRUE,
positive = TRUE,
ideal.setsize = FALSE,
alpha = 0.25,
tol = 0.1,
boot.MI = NULL,
na.rm = TRUE
)
## S3 method for class 'spfilter'
summary(object, EV = FALSE, ...)
y |
response variable |
x |
vector/ matrix of regressors (default = NULL) |
W |
spatial connectivity matrix |
objfn |
the objective function to be used for eigenvector selection. Possible criteria are: the maximization of the adjusted R-squared ('R2'), minimization of residual autocorrelation ('MI'), significance level of candidate eigenvectors ('p'), significance of residual spatial autocorrelation ('pMI') or all eigenvectors in the candidate set ('all') |
MX |
covariates used to construct the projection matrix (default = NULL) - see Details |
sig |
significance level to be used for eigenvector selection
if |
bonferroni |
Bonferroni adjustment for the significance level
(TRUE/ FALSE) if |
positive |
restrict search to eigenvectors associated with positive levels of spatial autocorrelation (TRUE/ FALSE) |
ideal.setsize |
if |
alpha |
a value in (0,1] indicating the range of candidate eigenvectors according to their associated level of spatial autocorrelation, see e.g., Griffith (2003) |
tol |
if |
boot.MI |
number of iterations used to estimate the variance of Moran's I.
If |
na.rm |
listwise deletion of observations with missing values (TRUE/ FALSE) |
object |
an object of class |
EV |
display summary statistics for selected eigenvectors (TRUE/ FALSE) |
... |
additional arguments |
If W is not symmetric, it gets symmetrized by 1/2 * (W + W') before the decomposition.
If covariates are supplied to MX, the function uses these regressors
to construct the following projection matrix:
M = I - X (X'X)^-1X'
Eigenvectors from MWM using this specification of
M are not only mutually uncorrelated but also orthogonal
to the regressors specified in MX. Alternatively, if MX = NULL, the
projection matrix becomes M = I - 11'/*n*,
where 1 is a vector of ones and *n* represents the number of
observations. Griffith and Tiefelsdorf (2007) show how the choice of the appropriate
M depends on the underlying process that generates the spatial
dependence.
The Bonferroni correction is only possible if eigenvector selection is based on
the significance level of the eigenvectors (objfn = 'p'). It is set to
FALSE if eigenvectors are added to the model until the residuals exhibit no
significant level of spatial autocorrelation (objfn = 'pMI').
An object of class spfilter containing the following
information:
estimatessummary statistics of the parameter estimates
varcovarestimated variance-covariance matrix
EVa matrix containing the summary statistics of selected eigenvectors
selvecsvector/ matrix of selected eigenvectors
evMIMoran coefficient of eigenvectors
moranresidual autocorrelation in the initial and the filtered model
fitadjusted R-squared of the initial and the filtered model
residualsinitial and filtered model residuals
othera list providing supplementary information:
ncandidatesnumber of candidate eigenvectors considered
nevnumber of selected eigenvectors
sel_idID of selected eigenvectors
sfvector representing the spatial filter
sfMIMoran coefficient of the spatial filter
modeltype of the fitted regression model
dependencefiltered for positive or negative spatial dependence
objfnselection criterion specified in the objective function of the stepwise regression procedure
bonferroniTRUE/ FALSE: Bonferroni-adjusted significance level
(if objfn = 'p')
siglevelif objfn = 'p' or objfn = 'pMI': actual
(unadjusted/ adjusted) significance level
Tiefelsdorf, Michael and Daniel A. Griffith (2007): Semiparametric filtering of spatial autocorrelation: the eigenvector approach. Environment and Planning A: Economy and Space, 39 (5): pp. 1193 - 1221.
Griffith, Daniel A. (2003): Spatial Autocorrelation and Spatial Filtering: Gaining Understanding Through Theory and Scientific Visualization. Berlin/ Heidelberg, Springer.
Chun, Yongwan, Daniel A. Griffith, Monghyeon Lee, Parmanand Sinha (2016): Eigenvector selection with stepwise regression techniques to construct eigenvector spatial filters. Journal of Geographical Systems, 18, pp. 67 – 85.
Le Gallo, Julie and Antonio Páez (2013): Using synthetic variables in instrumental variable estimation of spatial series models. Environment and Planning A: Economy and Space, 45 (9): pp. 2227 - 2242.
Tiefelsdorf, Michael and Barry Boots (1995): The Exact Distribution of Moran's I. Environment and Planning A: Economy and Space, 27 (6): pp. 985 - 999.
glmFilter, getEVs, MI.resid
data(fakedata)
y <- fakedataset$x1
X <- cbind(fakedataset$x2, fakedataset$x3, fakedataset$x4)
res <- lmFilter(y = y, x = X, W = W, objfn = 'MI', positive = FALSE)
print(res)
summary(res, EV = TRUE)
E <- res$selvecs
(ols <- coef(lm(y ~ X + E)))
coef(res)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.