\(y = X\beta + WX_*\theta + e\) (X_* the non-constant columns) by OLS
as spatialreg::lmSLX; \(\sigma^2 = e'e/(n-k)\). Impacts of
covariate r: direct \(\beta_r\), indirect \(\theta_r\), total
\(\beta_r + \theta_r\) (LeSage and Pace 2009; Halleck Vega and Elhorst
2015) with OLS standard errors; Wald \(\theta' V_\theta^{-1} \theta\)
against chi-square.
Arguments
- y
Response.
- X
Design matrix including any intercept column.
- W
Spatial weights matrix.
Value
List with coefficients, se, cov,
sigma2, residuals, impacts (data frame),
wald, wald_p, lagged_columns.
References
Halleck Vega, S. and Elhorst, J. P. (2015). The SLX model.
Journal of Regional Science 55, 339-363.
LeSage, J. and Pace, R. K. (2009). Introduction to Spatial
Econometrics. CRC Press, Boca Raton.
Examples
W <- 1 * (abs(outer(1:8, 1:8, "-")) == 1)
W <- W / rowSums(W)
X <- cbind(1, c(.1, .6, .2, .9, .3, .5, .8, .4))
SLXRegression(c(1, 2.2, 1.4, 3.1, .9, 2, 2.6, 1.1), X, W)$coefficients
#> [1] 1.2877164 2.1164928 -0.9516244