
This function estimates the random effects eigenvector spatial filtering (RE-ESF) model.
resf( y, x = NULL, xgroup = NULL, meig, method = "reml" )
Vector of explained variables (N x 1)
Matrix of explanatory variables (N x K). Default is NULL
Matrix of group indexes. The indeces may be group IDs (numbers) or group names (N x K_group). Default is NULL
Estimation method. Restricted maximum likelihood method ("reml") and maximum likelihood method ("ml") are available. Default is "reml"
Matrix with columns for the estimated coefficients on x, their standard errors, t-values, and p-values (K x 4)
List of K_group matrices with columns for the estimated group effects, their standard errors, and t-values
Vector of estimated variance parameters (2 x 1). The first and the second elements denote the standard error and the Moran's I value of the estimated spatially dependent component, respectively. The Moran's I value is scaled to take a value between 0 (no spatial dependence) and 1 (the maximum possible spatial dependence). Based on Griffith (2003), the scaled Moran'I value is interpretable as follows: 0.25-0.50:weak; 0.50-0.70:moderate; 0.70-0.90:strong; 0.90-1.00:marked
Vector of estimated standard errors of the group effects
Vector whose elements are residual standard error (resid_SE), adjusted conditional R2 (adjR2(cond)), restricted log-likelihood (rlogLik), Akaike information criterion (AIC), and Bayesian information criterion (BIC). When method = "ml", restricted log-likelihood (rlogLik) is replaced with log-likelihood (logLik)
Vector of estimated random coefficients on Moran's eigenvectors (L x 1)
Vector of estimated spatial dependent component (N x 1)
Vector of predicted values (N x 1)
Vector of residuals (N x 1)
List of other outcomes, which are internally used
Murakami, D. and Griffith, D.A. (2015) Random effects specifications in eigenvector spatial filtering: a simulation study. Journal of Geographical Systems, 17 (4), 311-331.
Griffith, D. A. (2003). Spatial autocorrelation and spatial filtering: gaining understanding through theory and scientific visualization. Springer Science & Business Media.
# NOT RUN {
require(spdep);require(Matrix)
data(boston)
y <- boston.c[, "CMEDV" ]
x <- boston.c[,c("CRIM","ZN","INDUS", "CHAS", "NOX","RM", "AGE",
"DIS" ,"RAD", "TAX", "PTRATIO", "B", "LSTAT")]
xgroup<- boston.c[,"TOWN"]
coords<- boston.c[,c("LAT","LON")]
meig <- meigen(coords=coords)
res <- resf(y = y, x = x, xgroup = xgroup, meig = meig)
res$b
res$b_g
res$s
res$s_g
res$e
#########Fast approximation
meig_f <- meigen_f(coords=coords)
res2 <- resf(y=y,x=x, xgroup = xgroup,meig=meig_f)
# }
Run the code above in your browser using DataLab