SpatialFiltering            package:spdep            R Documentation

_S_e_m_i-_p_a_r_a_m_e_t_r_i_c _s_p_a_t_i_a_l _f_i_l_t_e_r_i_n_g

_D_e_s_c_r_i_p_t_i_o_n:

     The function selects eigenvectors in a semi-parametric spatial
     filtering approach to removing spatial dependence from linear
     models. Selection is by brute force by finding the single
     eigenvector reducing the standard variate of Moran's I for
     regression residuals most, and continuing until no candidate
     eigenvector reduces the value by more than 'tol'. It returns a
     summary table from the selection process and a matrix of selected
     eigenvectors for the specified model.

_U_s_a_g_e:

     SpatialFiltering(formula, lagformula, data, nb, glist = NULL, style = "C",
      zero.policy = FALSE, tol = 0.1, zerovalue = 1e-04, ExactEV = FALSE,
      symmetric = TRUE, alpha=NULL, alternative="two.sided", verbose=TRUE)

_A_r_g_u_m_e_n_t_s:

 formula: a symbolic description of the model to be fit, assuming a
          spatial error representation; when lagformula is given, it
          should include only the response and the intercept term

lagformula: An extra one-sided formula to be used when a spatial lag
          representation is desired; the intercept is excluded within
          the function if present because it is part of the formula
          argument, but excluding it explicitly in the lagformula
          argument in the presence of factors generates a collinear
          model matrix

    data: an optional data frame containing the variables in the model

      nb: an object of class 'nb'

   glist: list of general weights corresponding to neighbours

   style: 'style' can take values W, B, C, U, and S

zero.policy: If FALSE stop with error for any empty neighbour sets, if
          TRUE permit the weights list to be formed with zero-length
          weights vectors

     tol: tolerance value for convergence of spatial filtering

zerovalue: eigenvectors with eigenvalues of an absolute value smaller
          than zerovalue will be excluded in eigenvector search

 ExactEV: Set ExactEV=TRUE to use exact expectations and variances
          rather than the expectation and variance of Moran's I from
          the previous iteration, default FALSE

symmetric: Should the spatial weights matrix be forced to symmetry,
          default TRUE

   alpha: if not NULL, used instead of the tol= argument as a stopping
          rule to choose all eigenvectors up to and including the one
          with a probability value exceeding alpha.

alternative: a character string specifying the alternative hypothesis,
          must be one of greater, less or two.sided (default).

 verbose: if TRUE report eigenvectors selected

_V_a_l_u_e:

     An 'SFResult' object, with: 

selection: a matrix summarising the selection of eigenvectors for
          inclusion, with columns:

          _S_t_e_p Step counter of the selection procedure

          _S_e_l_E_v_e_c number of selected eigenvector (sorted descending)

          _E_v_a_l its associated eigenvalue

          _M_i_n_M_i value Moran's I for residual autocorrelation

          _Z_M_i_n_M_i standardized value of Moran's I assuming a normal
               approximation

          _p_r(_Z_I) probability value of the permutation-based
               standardized deviate for the given value of the
               alternative argument

          _R_2 R\^2 of the model including exogenous variables and
               eigenvectors

          _g_a_m_m_a regression coefficient of selected eigenvector in fit

          The first row is the value at the start of the search 

 dataset: a matrix of the selected eigenvectors in order of selection

_A_u_t_h_o_r(_s):

     Yongwan Chun, Michael Tiefelsdorf, Roger Bivand

_R_e_f_e_r_e_n_c_e_s:

     Tiefelsdorf M, Griffith DA. (2007) Semiparametric Filtering of
     Spatial Autocorrelation: The Eigenvector Approach. Environment and
     Planning A, 39 (5) 1193 - 1221. <URL:
     http://www.spatialfiltering.com>

_S_e_e _A_l_s_o:

     'lm', 'eigen', 'nb2listw', 'listw2U'

_E_x_a_m_p_l_e_s:

     example(columbus)
     lmbase <- lm(CRIME ~ INC + HOVAL, data=columbus)
     sarcol <- SpatialFiltering(CRIME ~ INC + HOVAL, data=columbus,
      nb=col.gal.nb, style="W", ExactEV=TRUE)
     sarcol
     lmsar <- lm(CRIME ~ INC + HOVAL + fitted(sarcol), data=columbus)
     lmsar
     anova(lmbase, lmsar)
     lm.morantest(lmsar, nb2listw(col.gal.nb))
     lagcol <- SpatialFiltering(CRIME ~ 1, ~ INC + HOVAL - 1, data=columbus,
      nb=col.gal.nb, style="W")
     lagcol
     lmlag <- lm(CRIME ~ INC + HOVAL + fitted(lagcol), data=columbus)
     lmlag
     anova(lmbase, lmlag)
     lm.morantest(lmlag, nb2listw(col.gal.nb))

