Front ends for the spatial error model \(y = X\beta + u\),
\(u = \lambda W u + e\); R arm of the Python modules
morie.fn.sem*. Semjac: \(\log|I - \lambda W|\) by LU.
Semconv: is \(\lambda\) inside \((1/e_{min}, 1/e_{max})\)
(real parts of the eigenvalues of W)? Semlrt: likelihood ratio
against OLS. Semwald: \((\lambda/se)^2\). Semflt: the
spatial Cochrane-Orcutt filter \((I - \lambda W)y\). Semres:
Moran's I of the filtered residuals \((I - \lambda W)e\), exact test
when the (filtered) design is given. Semlm, Semsc: LM
(score) test of \(\lambda = 0\) from OLS residuals,
\((n e'We/e'e)^2 / tr(W'W + WW)\). Semspec: Wald test of the
common-factor restriction \(\theta = -\lambda\beta\) in the spatial
Durbin model. Semvar: inverse analytic information matrix of
\((\beta, \lambda, \sigma^2)\). Semboot: residual-bootstrap
percentile interval for \(\lambda\).
Usage
Semjac(W, lam)
Semconv(W, lam)
Semlrt(ll_sem, ll_ols, df = 1)
Semwald(lam, se_lam)
Semflt(y, W, lam = 0.3)
Semres(resid, W, lam = 0.3, X = NULL)
Semlm(resid, W)
Semsc(resid, W)
Semspec(beta, theta, vcov, lam)
Semvar(X, W, lam, sigma2)
Semboot(y, X, W, B = 99, seed = 0, level = 0.95)Arguments
- W
Spatial weights matrix.
- lam
Spatial error parameter.
- ll_sem, ll_ols
Log-likelihoods of the SEM and the OLS model.
- df
Degrees of freedom.
- se_lam
Standard error of
lam.- y
Response (or series to filter).
- resid
Model residuals.
- X
Design matrix including any intercept column (optional for
Semres).- beta
Spatial Durbin slopes of the lagged regressors.
- theta
Coefficients of \(WX\).
- vcov
Covariance of
c(lam, beta, theta).- sigma2
Error variance.
- B
Bootstrap replicates.
- seed
Philox seed.
- level
Confidence level.
Value
A list whose statistic is the headline value, with the
components of the Python result's extra.
References
Anselin, L. (1988). Spatial Econometrics: Methods and Models. Kluwer, Dordrecht.
Burridge, P. (1980). On the Cliff-Ord test for spatial correlation. Journal of the Royal Statistical Society B 42, 107-108.
Burridge, P. (1981). Testing for a common factor in a spatial autoregression model. Environment and Planning A 13, 795-800.
Ord, K. (1975). Estimation methods for models of spatial interaction. Journal of the American Statistical Association 70, 120-126.
