ptm2 {PanelTM}R Documentation

Two-way panel threshold regression model.

Description

Two-way panel threshold regression model with the 2-step GMM estimator.

Usage

ptm2(Y, TV=NULL, Xendo=NULL, Xexo=NULL, IV=NULL, trimrate=0.4,  
    ngrid=100, h0=1.5, Iweight=FALSE, test.lin=TRUE, B=1000)

Arguments

Y

a N\times T matrix of the dependent variable where the rows represent the statistical units and the columns the time.

TV

a N\times T transition variable matrix where the rows represent the statistical units and the columns the time. If not specified, the first lag of Y is taken.

Xendo

a Nk_{endo}\times T matrix of the independent variables (if any). The rows contain in order X_{1i=1}, X_{1i=2}, \dots, X_{1i=N}, X_{2i=1},X_{2i=2}, \dots, X_{2i=N}, \dots, X_{k_{endo}i=1}, X_{k_{endo}i=2}, \dots, X_{k_{endo}i=N}.

Xexo

a Nk_{exo}\times T matrix of the independent variables (if any). The rows contain in order X_{1i=1}, X_{1i=2}, \dots, X_{1i=N}, X_{2i=1},X_{2i=2}, \dots, X_{2i=N}, \dots, X_{k_{exo}i=1}, X_{k_{exo}i=2}, \dots, X_{k_{exo}i=N}.

IV

a matrix of the additional instrumental variables to include in the analysis. The rows contain in order z_{1i=1}, z_{1i=2}, \dots, z_{1i=N}, z_{2i=1}, z_{2i=2}, \dots, z_{2i=N}, \dots, \quad z_{li=1}, z_{li=2}, \dots, z_{li=N}. The lagged dependent and independent variables are automatically included in the estimation and should not be specified in IV. If not specified, only the lags of the dependent and independent variables are taken as instrumental variables.

trimrate

the trim rate when constructing the grid for estimating the threshold. Default is set to 0.4.

ngrid

the number of grid points to estimate the threshold. Default is set to 100.

h0

the parameter for Silverman's rule of thumb for kernel estimation. The default is set to 1.5.

Iweight

the 1-st step weight matrix. If TRUE, the identity matrix is used. If FALSE, the 1-st step weight matrix is constructed from the instrumental variables and the moments matrix. Default is set to FALSE.

test.lin

if TRUE (default), the linearity test is performed; if FALSE, not.

B

if test.lin=TRUE, it is the number of bootstrap iterations for the linearity test.

Details

ptm2 performs the first-difference 2-step GMM estimator by Seo and Shin (2016) for panel threshold regression. The following steps are performed in the estimation algorithm:

  1. Computes the first differences of the dependent and independent variables.

  2. Defines the instrumental variables matrix, which includes the lagged dependent and independent variables, and the additional instrumental variables in the IV matrix (if specified).

  3. Constructs the 1-st step weight matrix according to the Iweight option.

  4. Identifies a set of equally distant points between quantiles (trimrate/2) and 1-(trimrate/2) of the threshold variable vector. The number of points is specified in the option ngrid.

  5. Computes the GMM estimator setting the threshold equal to each selected point and computes the residuals. Identifies the 1st-step estimator by minimizing the residual.

  6. Constructs the 2nd-step weight matrix from the residuals associated with the 1st-step estimator.

  7. Repeats steps 4. and 5. and returns the 2nd-step estimator of the 1st-differenced parameters, the threshold, and the covariance matrix.

Value

An object of S4 class "ptm2", which is a list with the following elements:

threshold

the estimated threshold and the associated p-value.

estimates

the matrix of the estimated first-differenced parameters (i.e. parameter(s) estimated for the lower regime, the difference between the parameter(s) estimated for the upper and the lower regime) and the associated p-values.

cov.

the sample version of covariance matrix of the estimated paramaters.

residuals.

the matrix of the first-differenced residuals.

test.lin.

the list of the linearity test results containing: the name of the test; the number of bootstrap iterations carried out; the p-value of the test.

Note

The method requires at least 6 times of observation: four lags of the dependent and independent variables are used as instruments, and two more are necessary to identify the regime switch (i.e., one per regime).

Author(s)

Francesca Marta Lilja Di Lascio <marta.dilascio@unibz.it>

Selene Perazzini <selene.perazzini@alumni.imtlucca.it>

References

Seo, M.H. and Shin, Y. (2016) Dynamic panels with threshold effect and endogeneity. Journal of Econometrics, 195(2), p.169-186.

Seo, M.H., Kim, S. and Kim Y.-J. (2019) Estimation of dynamic panel threshold model using Stata. The Stata Journal, 19(3), p.685-697.

See Also

See also ptm3 and simptm.

Examples

## Select data
data(banana)
data <- banana[which(banana$j==1),]

# Prepare input matrices for ptm2
bioimpedance <-  matrix(data$bioimpedance, ncol=length(unique(data$t)), 
                        byrow=TRUE)

weight <-  matrix(data$weight, ncol=length(unique(data$t)), byrow=TRUE)

## Estimation

# Model on bioimpedance y_{it} with transition variable y_{i(t-1)}
# y_{it}= (phi1_c)1(y_{it-1}<= gamma) + (phi2_c)1(y_{it-1}>gamma)
# Estimation and linear test
ptm2(Y=bioimpedance, TV=NULL, Xendo=NULL, Xexo=NULL, IV=NULL,  
     trimrate=0.4, ngrid=100, h0=1.5, Iweight=FALSE, test.lin=TRUE, 
     B=100)

## NOT RUN
## Model on bioimpedance y_{it} with transition variable y_{i(t-1)} and 
## weight as regressor x_{it}: 
## y_{it}= (phi1_c + phi1_X*x_{it})1(y_{it-1}<= gamma) + 
##         (phi2_c + phi2_X*x_{it})1(y_{it-1}>gamma)
#ptm2(Y=bioimpedance, TV=NULL, Xendo=weight, Xexo=NULL, IV=NULL,  
#     trimrate=0.4, ngrid=100, h0=1.5, Iweight=FALSE, test.lin=FALSE)
##

[Package PanelTM version 1.0 Index]