Front ends for the spatial Durbin model \(y = \rho W y + X\beta +
WX_*\theta + e\) (the lag model on \(Z = (X, WX_*)\), \(X_*\) the
non-constant columns); R arm of the Python modules morie.fn.sdm*,
gnsres and sdemres. Sdmdet, Sdmjac:
\(\log|I - \rho W|\). Sdmconv: is \(\rho\) inside
\((1/e_{min}, 1/e_{max})\)? Sdmlrt: likelihood ratio against the
SAR. Sdmwald: \((\rho/se)^2\). Sdmcf: Wald test of the
common-factor restriction \(\theta + \rho\beta = 0\) (delta method).
Sdmr2: Nagelkerke's R-squared. Sdmflt: \((I - \rho W)y\).
Sdmwx: \(WX_*\) with column means and correlations.
Sdmolsi: the OLS baseline (coefficients, ML variance,
log-likelihood). Sdmres, Gnsres, Sdemres: Moran's I
of residuals, exact test when the design is given. Sdmvar: inverse
analytic information matrix of \((\beta, \theta, \rho, \sigma^2)\).
Sdmboot: residual-bootstrap percentile interval for \(\rho\).
Usage
Sdmdet(W, rho)
Sdmjac(W, rho)
Sdmconv(W, rho)
Sdmlrt(ll_sdm, ll_sar, df = 2)
Sdmwald(rho, se_rho)
Sdmcf(coef, theta, vcov, rho)
Sdmr2(ll_model, ll_null, n)
Sdmflt(y, W, rho = 0.3)
Sdmwx(X, W)
Sdmolsi(y, X)
Sdmres(resid, W, X = NULL)
Gnsres(resid, W, X = NULL)
Sdemres(resid, W, X = NULL)
Sdmvar(X, WX, W, rho, sigma2, beta)
Sdmboot(y, X, W, B = 99, seed = 0, level = 0.95)Arguments
- W
Spatial weights matrix.
- rho
Spatial lag parameter.
- ll_sdm, ll_sar
Log-likelihoods of the SDM and the SAR.
- df
Degrees of freedom.
- se_rho
Standard error of
rho.- coef
SDM slopes of the lagged regressors (no intercept).
- theta
Coefficients of \(WX\).
- vcov
Covariance of
c(rho, coef, theta).- ll_model, ll_null
Log-likelihoods of the model and the null model.
- n
Number of observations.
- y
Response (or series to filter).
- X
Design matrix including any intercept column (optional for the residual checks).
- resid
Model residuals.
- WX
Lagged regressors \(WX_*\).
- sigma2
Error variance.
- beta
Coefficients of the columns of X and WX.
- 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
Burridge, P. (1981). Testing for a common factor in a spatial autoregression model. Environment and Planning A 13, 795-800.
Elhorst, J. P. (2014). Spatial Econometrics: From Cross-Sectional Data to Spatial Panels. Springer, Berlin.
LeSage, J. and Pace, R. K. (2009). Introduction to Spatial Econometrics. CRC Press, Boca Raton.
Cliff, A. D. and Ord, J. K. (1981). Spatial Processes: Models and Applications. Pion, London.
