Learn R Programming

spmoran (version 0.1.5)

resf: Spatial regression with random effects eigenvector spatial filtering

Description

This function estimates the random effects eigenvector spatial filtering (RE-ESF) model.

Usage

resf( y, x = NULL, meig, method = "reml" )

Arguments

y

Vector of explained variables (\(N\) x 1)

x

Matrix of explanatory variables (\(N\) x K). Default is NULL

meig

Moran's eigenvectors and eigenvalues. Output from meigen or meigen_f

method

Estimation method. Restricted maximum likelihood method ("reml") and maximum likelihood method ("ml") are available. Default is "reml"

Value

b

Matrix with columns for the estimated coefficients on \(x\), their standard errors, t-values, and p-values (\(K\) x 4)

s

Vector of estimated shrinkage parameters (2 x 1). The first and the second elements denote the standard error and the spatial scale of the estimated spatial dependent component, respectively (see Murakami and Griffith, 2015)

e

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)

r

Vector of estimated random coefficients on Moran's eigenvectors (\(L\) x 1)

sf

Vector of estimated spatial dependent component (\(N\) x 1)

pred

Vector of predicted values (\(N\) x 1)

resid

Vector of residuals (\(N\) x 1)

other

List of other outcomes, which are internally used

References

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.

See Also

meigen, meigen_f

Examples

Run this code
# NOT RUN {
require(spdep)
data(boston)
y	<- boston.c[, "CMEDV" ]
x	<- boston.c[,c("CRIM","ZN","INDUS", "CHAS", "NOX","RM", "AGE",
                       "DIS" ,"RAD", "TAX", "PTRATIO", "B", "LSTAT")]
coords  <- boston.c[,c("LAT","LON")]
meig 	<- meigen(coords=coords)
res	<- resf(y=y,x=x,meig=meig)
res$b
res$s
res$e

#########Fast approximation
meig_f	<- meigen_f(coords=coords)
res  <- resf(y=y,x=x,meig=meig_f)
# }

Run the code above in your browser using DataLab