Skip to contents

y_t = rho W y_t + gamma y_(t-1) + delta W y_(t-1) + X_t beta + mu + e_t: conditional on the first period, the lagged response and (when space_time_lag) its spatial lag join X_t as regressors of the fixed-effects spatial lag model SpatialPanelMl (Elhorst 2014, ch. 4). beta lists gamma, delta (if used), then the X coefficients. Identical to the Python arm morie.fn.sppaneldyn.

Usage

SpPanelDynamic(
  y,
  X,
  W,
  effects = "individual",
  space_time_lag = TRUE,
  bounds = c(-0.99, 0.99)
)

Arguments

y

Numeric T x N matrix, rows are periods.

X

T x N x K array (or a list of lists of numeric vectors).

W

Row-standardised spatial weights.

effects

"individual", "time" or "twoways".

space_time_lag

Include W y_(t-1).

bounds

Search interval for rho.

Value

A list with rho, beta, coefficients, sigma2, loglik, residuals and n_obs.

References

Elhorst, J. P. (2014). Spatial Econometrics. Springer.

Yu, J., de Jong, R. and Lee, L.-F. (2008). Quasi-maximum likelihood estimators for spatial dynamic panel data with fixed effects when both n and T are large. Journal of Econometrics 146, 118-134.

Examples

W <- matrix(c(0, 1, 0, 0.5, 0, 0.5, 0, 1, 0), 3, byrow = TRUE)
y <- rbind(c(1, 2, 1.5), c(2, 2.5, 1), c(1.5, 3, 2.5), c(2.5, 2, 3), c(2, 1, 2.2))
X <- array(c(0.5, 1, 0.2, 1.5, 0.7, 0.1, 0.4, 2, 1.1, 1.2, 0.3, 1.9, 0.3, 0.9, 1.4), c(5, 3, 1))
SpPanelDynamic(y, X, W)$beta
#> [1]  0.11739605 -0.07270239 -0.12213419