msdpdth: M-estimator for threshold spatial dynamic panel data model

Description Usage Arguments Details Value References Examples

View source: R/msdpdth.R

Description

Estimating threshold spatial dynamic panel data model with M-estimator

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
msdpdth(
  y,
  x,
  w1,
  th,
  correction = TRUE,
  max_try = 5,
  all_er = FALSE,
  true_range = FALSE,
  residual = FALSE,
  w3 = w1,
  w2 = w1,
  no_tf = FALSE,
  model = "full",
  th_type = "row",
  ini_val = NULL,
  rcpp = TRUE,
  cma_pop_multi = 1
)

Arguments

y

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

x

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

w1

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

th

data.frame, containing regional index (first column, numeric) and grouping indicator(second column, logical). The number of rows should be the same as the number of regions.

correction

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

max_try

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

all_er

logical, whether to output Hessian and Gamma matrix 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.

residual

logical, whether to output the residual. Default value is FALSE.

w3

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

w2

matrix, the spatial weight matrix for spatio-temporal lag. 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.

th_type

character, "row" or "col". Indicates whether the threshold is applied to the columns or the rows of the weight matrix. Default value is "row".

ini_val

vector msdpd object. A length 4 vector of the initial values of lambda1, lambda2, lambda3, rho or an msdpd object that contain the non-threshold estimation result. If unsupplied msdpd() will be called.

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 threshold spatial dynamic panel data model with extended Yang(2018)'s M-estimator

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

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 "msdpdth"

References

Wu, J and Matsuda, Y. (2021). A threshold extension of spatial dynamic panel model with fixed effects. Journal of Spatial Econometrics 2,3

Examples

1
2
data(data_th, data_w)
result <- msdpdth(y = data_th$y, x = data_th$x, w1 = data_w, th = data_th$th)

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