Skip to contents

SdemML: spatial Durbin error model \(y = X\beta + WX_*\theta + u\), \(u = \lambda Wu + e\), fitted as the error model on the columns of \(X\) and \(WX_*\) (spatialreg::errorsarlm(Durbin = TRUE)), with covariance \(\sigma^2(Z_*^\top Z_*)^{-1}\) and impacts (direct \(\beta\), indirect \(\theta\), total) with standard errors. GnsML: general nesting model, the SAC model on the columns of \(X\) and \(WX_*\) (sacsarlm(Durbin = TRUE)), with SpatialImpacts. CarML: CAR regression (spautolm(family = "CAR")) by profile likelihood over \((1/e_{min}, 1/e_{max})\), with the LR test of \(\lambda = 0\). SpatialLrTest and SpatialWaldTest: chi-square tests. ResidualMoran: Moran's I of OLS residuals with exact moments (spdep::lm.morantest). LogJacobian: \(\log|I - \rho W| + \log|I - \lambda W|\). Identical to the Python arm morie.fn.spdurbin.

Usage

SdemML(y, X, W, interval = c(-0.999, 0.999))

GnsML(y, X, W, interval = c(-0.999, 0.999))

CarML(y, X, W, interval = NULL)

SpatialLrTest(ll_full, ll_restricted, df)

SpatialWaldTest(estimate, vcov)

ResidualMoran(y, X, W)

LogJacobian(W, rho, lam = 0)

Arguments

y

Response.

X

Design matrix including any intercept column.

W

Spatial weights matrix (symmetric for CarML).

interval

Search interval for the spatial parameter(s).

ll_full, ll_restricted

Log-likelihoods.

df

Degrees of freedom.

estimate

Estimates tested against zero.

vcov

Their covariance matrix.

rho, lam

Autoregressive parameters.

Value

List.

References

LeSage, J. and Pace, R. K. (2009). Introduction to Spatial Econometrics. CRC Press.

Elhorst, J. P. (2014). Spatial Econometrics: From Cross-Sectional Data to Spatial Panels. Springer.

Besag, J. (1974). Spatial interaction and the statistical analysis of lattice systems. Journal of the Royal Statistical Society B 36, 192-236.

Cliff, A. D. and Ord, J. K. (1981). Spatial Processes: Models and Applications. Pion.

Examples

SpatialLrTest(-10, -12.5, 1)$pvalue
#> [1] 0.02534732
LogJacobian(matrix(c(0, 1, 1, 0), 2), 0.5)
#> [1] -0.2876821