Learn R Programming

pvars (version 1.1.1)

pvarx: Estimation of VAR models for heterogeneous panels

Description

Performs the (pooled) mean-group estimation of a panel VAR model. First, VAR models are estimated for all \(N\) individual entities. Then, their (pooled) mean-group estimate is calculated for each coefficient.

Usage

pvarx.VAR(
  L.data,
  lags,
  type = c("const", "trend", "both", "none"),
  t_D = NULL,
  D = NULL,
  n.factors = FALSE,
  n.iterations = FALSE
)

pvarx.VEC( L.data, lags, dim_r, type = c("Case1", "Case2", "Case3", "Case4", "Case5"), t_D1 = NULL, t_D2 = NULL, D1 = NULL, D2 = NULL, idx_pool = NULL, n.factors = FALSE, n.iterations = FALSE )

Value

A list of class 'pvarx' with the elements:

A

Matrix. The lined-up coefficient matrices \(A_j, j=1,\ldots,p\) for the lagged variables in the panel VAR estimated by mean-group.

B

Matrix. Placeholder for the structural impact matrix.

beta

Matrix. The \(((K+n_{d1}) \times r)\) cointegrating matrix of the VAR model if transformed from a rank-restricted VECM.

L.varx

List of 'varx' objects for the individual estimation results.

L.data

List of 'data.frame' objects for each individual.

CSD

List of measures for cross-sectional dependency. NULL if the individual VAR models have been estimated under independence.

args_pvarx

List of characters and integers indicating the estimator and specifications that have been used.

Arguments

L.data

List of 'data.frame' objects for each individual. The variables must have the same succession \(k = 1,\ldots,K\) in each individual 'data.frame'.

lags

Integer or vector of integers. Lag-order of the VAR models in levels, which is either a common \(p\) for all individuals or individual-specific \(p_i\) for each individual. In the vector, \(p_i\) must have the same succession \(i = 1,\ldots,N\) as argument 'L.data'.

type

Character. The conventional case of the deterministic term.

t_D

List of vectors. The activating break periods \(\tau\) for the period-specific deterministic regressors in \(d_{it}\) of the VAR model in levels.

D

List. A single 'data.frame' of common deterministic regressors or a list of \(N\) 'data.frame' objects of the individual deterministic regressors added to \(d_{it}\). These customized regressors correspond to 'exogen' in vars' VAR, which is fixed over bootstrap iterations.

n.factors

Integer. Number of common factors to be used for SUR. Deactivated if FALSE (the default).

n.iterations

Integer. The (maximum) number of iterations for the estimation of SUR resp. the pooled cointegrating vectors.

dim_r

Integer. Common cointegration-rank \(r\) of the VECM.

t_D1

List of vectors. The activating break periods \(\tau\) for the period-specific deterministic regressors in \(d_{1,it}\), which are restricted to the cointegration relations. Just as in pcoint, the accompanying lagged regressors are automatically included in \(d_{2,it}\).

t_D2

List of vectors. The activating break periods \(\tau\) for the period-specific deterministic regressors in \(d_{2,it}\), which are unrestricted.

D1

List. A single 'data.frame' of common deterministic regressors regressors or a list of \(N\) 'data.frame' objects of individual deterministic regressors added to \(d_{1,it}\), which are restricted to the cointegration relations. Unlike 't_D1', these customized regressors require potential accompanying lagged regressors to be manually included in \(d_{2,it}\)

D2

List. A single 'data.frame' of common deterministic regressors or a list of \(N\) 'data.frame' objects of individual deterministic regressors added to \(d_{2,it}\), which are unrestricted. These customized regressors correspond to 'dumvar' in urca's ca.jo, which is fixed over bootstrap iterations.

idx_pool

Vector. Position \(k = 1,...,K+n_1\) of each variable to be pooled using the two-step estimator by Breitung (2005). The integer vector specifies throughout heterogeneous coefficients up to the uniform upper block \(I_{r}\) estimated with the individual estimator by Ahn and Reinsel (1990) if exclusively in the interval \([0,...,r]\). Deactivated if NULL (the default).

Functions

  • pvarx.VAR(): Mean Group (MG) of VAR models in levels.

  • pvarx.VEC(): (Pooled) Mean Group (PMG) of VECM.

References

Canova, F., and Ciccarelli, M. (2013): "Panel Vector Autoregressive Models: A Survey", Advances in Econometrics, 32, pp. 205-246.

Hsiao, C. (2014): Analysis of Panel Data, Econometric Society Monographs, Cambridge University Press, 3rd ed.

Luetkepohl, H. (2005): New Introduction to Multiple Time Series Analysis, Springer, 2nd ed.

Pesaran, M. H., and Smith R. J. (1995): "Estimating Long-Run Relationships from Dynamic Heterogeneous Panels", Journal of Econometrics, 68, pp. 79-113.

Rebucci, A. (2010): "Estimating VARs with Long Stationary Heterogeneous Panels: A Comparison of the Fixed Effect and the Mean Group Estimators", Economic Modelling, 27, pp. 1183-1198.

Ahn, S. K., and Reinsel (1990): "Estimation for Partially Nonstationary Multivariate Autoregressive Models", Journal of the American Statistical Association, 85, pp. 813-823.

Breitung, J. (2005): "A Parametric Approach to the Estimation of Cointegration Vectors in Panel Data", Econometric Reviews, 24, pp. 151-173.

Johansen, S. (1996): Likelihood-based Inference in Cointegrated Vector Autoregressive Models, Advanced Texts in Econometrics, Oxford University Press, USA.

Pesaran, M. H., Shin, Y, and Smith R. J. (1999): "Pooled Mean Group Estimation of Dynamic Heterogeneous Panels", Journal of the American Statistical Association, 94, pp. 621-634.

Examples

Run this code
data("PCAP")
names_k = c("g", "k", "l", "y")  # variable names
names_i = levels(PCAP$id_i)      # country names 
L.data  = sapply(names_i, FUN=function(i) 
  ts(PCAP[PCAP$id_i==i, names_k], start=1960, end=2019, frequency=1), 
  simplify=FALSE)
R.lags = c(2, 4, 2, 3, 2, 4, 4, 2, 2, 3, 3, 3, 2, 4, 4, 2, 2, 2, 4, 2, 2, 2, 4)
names(R.lags) = names_i

### MG of VAR by OLS ###
R.t_D  = list(t_shift=10)  # common level shift for all countries 
R.pvar = pvarx.VAR(L.data, lags=R.lags, type="both", t_D=R.t_D)
R.pirf = irf(R.pvar, n.ahead=50)  # MG of individual forecast-error IRF
plot(R.pirf)

### Pooled MG of rank-restricted VAR ###
R.pvec = pvarx.VEC(L.data, lags=R.lags, dim_r=2, idx_pool=1:4, type="Case4")
R.pirf = irf(R.pvec, n.ahead=50)  # MG of individual forecast-error IRF
plot(R.pirf)

Run the code above in your browser using DataLab