msdpd: M-estimator for spatial dynamic panel data model

Description Usage Arguments Details Value References Examples

View source: R/msdpd.R

Description

Estimating the spatial dynamic panel data model with M-estimator

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
msdpd(
  y,
  x,
  w1,
  correction = TRUE,
  hessian_er = FALSE,
  true_range = FALSE,
  max_try = 5,
  w2 = w1,
  w3 = w1,
  no_tf = FALSE,
  model = "full",
  rcpp = TRUE,
  cma_pop_multi = 1
)

Arguments

y

matrix, containing regional index (first column), time index (second column, numeric) and dependent variable (third column, numeric).

x

matrix, containing regional index (first column), time index (second column, numeric) and regressors (numeric).

w1

matrix, the spatial weight matrix. If w2 and w3 are supplied, the spatial weight matrix for spatial lag.

correction

logical, whether to use adjusted score function. Default value is TRUE.

hessian_er

logical, whether to output hessian based se. Ignored if correction is set to False. Default value is FALSE.

true_range

logical, whether to used the accurate stationary check. Default value is FALSE due to performance reasons.

max_try

integer, maximum attempt for the solver. Default value is 5.

w2

matrix, the spatial weight matrix for spatio-temporal lag. Default value is the same as w1.

w3

matrix, the spatial weight matrix for spatial error. Default value is the same as w1.

no_tf

logical, whether to account for time effect. Default value is TRUE.

model

character, indicates the model used for estimation, can be "full", "slm", "sem", "sltl". See Details.

rcpp

logical, whether to use the rcpp implementation to calculate the score function. Default value is TRUE.

cma_pop_multi

integer, multiplier for the population size used in CMA-ES. Default value is 1.

Details

Estimating the spatial dynamic panel data model with Yang(2018)'s M-estimator

y_{ti} = μ_{i}+α_t + x_{ti}β + ρ y_{t-1,i} + λ_1 ∑_{j =1}^{n}w_{1,ij}y_{tj} + λ_2 ∑_{j =1}^{n}w_{2,ij}y_{t-1,j} + u_{ti},\\ u_{ti} = λ_3∑_{j =1}^{n}w_{3,ij}u_{tj} + v_{ti}, i=1,…,n,t=1,…,T

The minimum number of time-periods is 4. Make sure the rows and columns of w1, w2, and w3 are lined up with the regional index. Sub-models can be specified by argument "model"

Some suggestions when the optimizer fails:

Value

A list of estimation results of S3 class "msdpd"

References

Yang, Z. (2018). Unified M-estimation of fixed-effects spatial dynamic models with short panels. Journal of Econometrics, 205(2), 423-447.

Examples

1
2
data(data_n, data_nw)
result <- msdpd(y = data_n$y, x = data_n$x, w1 = data_nw)

sdpdth documentation built on March 22, 2021, 5:06 p.m.