Skip to contents

Front ends for the SAC model \(y = \rho W y + X\beta + u\), \(u = \lambda W u + e\); R arm of the Python modules morie.fn.sac*. Sacdet, Sacjac: \(\log|I - \rho W| + \log|I - \lambda W|\). Sacconv: are both parameters inside \((1/e_{min}, 1/e_{max})\)? Saclrt: likelihood ratio against the nested SAR or SEM. Sacwald: joint Wald test \(b'V^{-1}b\). Sacres: Moran's I of residuals. Sacimp: LeSage-Pace impacts (those of the lag part; \(\lambda\) does not enter). Sacrob: GS2SLS with the HC sandwich covariance (spatialreg::gstsls(robust = TRUE)). Sacvar: inverse analytic information matrix of \((\beta, \rho, \lambda, \sigma^2)\). Sacboot: residual-bootstrap percentile interval for \(\rho\).

Usage

Sacdet(W, rho, lam)

Sacjac(W, rho, lam)

Sacconv(W, rho, lam)

Saclrt(ll_sac, ll_sar, df = 1)

Sacwald(params, vcov)

Sacres(resid, W, X = NULL)

Sacimp(coef, rho, lam, W)

Sacrob(y, X, W, robust = "HC0")

Sacvar(X, W, rho, lam, sigma2, beta)

Sacboot(y, X, W, B = 99, seed = 0, level = 0.95)

Arguments

W

Spatial weights matrix.

rho

Spatial lag parameter.

lam

Spatial error parameter.

ll_sac, ll_sar

Log-likelihoods of the SAC and the nested model.

df

Degrees of freedom.

params

Estimates tested jointly against zero.

vcov

Their covariance matrix.

resid

Model residuals.

X

Design matrix including any intercept column (optional for Sacres).

coef

Slopes without intercept.

y

Response.

robust

"HC0" or "HC1".

sigma2

Error variance.

beta

Regression coefficients including the intercept.

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.

Lee, L.-F. (2004). Asymptotic distributions of quasi-maximum likelihood estimators for spatial autoregressive models. Econometrica 72, 1899-1925.

Kelejian, H. H. and Prucha, I. R. (2010). Specification and estimation of spatial autoregressive models with autoregressive and heteroskedastic disturbances. Journal of Econometrics 157, 53-67.

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

Examples

W <- matrix(c(0, .5, 0, 1, 0, 1, 0, .5, 0), 3)
Sacdet(W, 0.5, -0.5)$statistic
#> [1] -0.5753641
Sacwald(c(0.3, 0.2), matrix(c(0.01, 0.002, 0.002, 0.02), 2))$p_value
#> [1] 0.006737947