*! version 1.2.16 18may2011

[R] xtvar2 -- Panel vector autoregressive models (PVARs)

Syntax

xtvar2
depvarlist
[if]
[,
options]

Model
lags(#) use # lags in the PVAR; default is lags(2)

pooled estimate pooled PVAR

Impulse Response Function (IRF) and Forecast Error Variance Decomposition (FEVD)
stirf calculate IRFs and FEVDs to one-unit shocks instead of IRFs and FEVDs to
one-standard deviation shocks

step(#) set forecast horizon to #; default is step(8)

ssaving(filename[, replace]) save
IRFs, FEVDs and corresponding confidence intervals in the data set filename

bsn obtain IRF confidence intervals and FEVD confidence intervals using a nonparametric
temporal resampling bootstrap default

dbsn obtain IRF confidence intervals and FEVD confidence intervals using a nonparametric
double resampling bootstrap

bsp obtain IRF confidence intervals and FEVD confidence intervals using a parametric
bootstrap

mc obtain IRF confidence intervals and FEVD confidence intervals using a Monte-Carlo
simulation

norm obtain standard normal confidence intervals

reps(#) use # bootstrap or Monte-Carlo
replications; default is reps(200)

Reporting
level(#) set confidence level; default
is level(95)

nodraw suppress graphs

You must xtset your data before using xtvar2; see
[XT] xtset. xtvar2 requires a balanced panel dat aset.

Description

General

xtvar2 fits a multivariate panel regression of each dependent variable on lags of itself and on
lags of all the other dependent variables using the least squares dummy variable estimator (LSDV),
see e.g. Bun and Kiviet (2006). The LSDV estimator is consistent when the number of time observations
in the data set tends to infinity, see e.g. Nickell (1981) and Hahn and Kuersteiner (2002). For an
application see Cagala et al. (2014). Variables in the depvarlist have to follow the causal ordering.
A variable that is higher in the ordering causes contemporaneous changes in subsequent variables.
Variables that are lower in the ordering affect previous variables with a lag.

Impulse Response Function (IRF)

xtvar2 estimates IRFs, reports IRFs in tables, and visualizes IRFs in graphs. See Lütkepohl
(2005) for the estimation of IRFs. You can choose between two types of IRFs:

IRFs to one-standard deviation shocks after xtvar2

IRFs to one-unit shocks after xtvar2, stirf

Use the option ssaving(filename[, replace]) to save IRFs, FEVDs and
corresponding confidence intervals in the data set filename.

Forecast error variance decomposition (FEVD)

xtvar2 estimates FEVDs, reports FEVDs in tables, and visualizes FEVDs in graphs. See Lütkepohl
(2005) for the estimation of FEVDs. You can choose between two types of FEVDs:

FEVDs based on IRFs to one-standard deviation shocks after xtvar2

FEVDs based on IRFs to one-unit shocks after xtvar2, stirf

Use the option ssaving(filename[, replace]) to save IRFs, FEVDs and
corresponding confidence intervals in the data set filename.

Confidence Intervals for IRFs and FEVDs

xtvar2 computes confidence intervals for IRFs and FEVDs. xtvar2 computes confidence
intervals optionally based on (I) a non-parametric residual bootstrap algorithm (bsn
or dbsn), (II) a parametric residual bootstrap algorithm (bsp), or (III) a Monte-Carlo
simulation algorithm mc.

(I) Nonparametric residual bootstrap algorithm, see Lütkepohl (2005) Appendix D.3

(1) Estimate the parameters of the PVAR model under consideration. Compute
the residuals û_it. Calculate IRFs and FEVDs.

(2) Compute centered residuals û^k_i1 - ü^k_i,..., û^k_iT - ü^k_i for equation
k and group i, where ü^k_i is group i's average residual over t. Obtain
bootstrap residuals by randomly drawing with replacement from the centered
residuals. bsn and dbsn refer to different resampling schemes. For a
detailed description of the resampling schemes see Kapetanios (2008).

bsn refers to a temporal resampling scheme. Define the residual matrix
U_k as U_k = (u^k_1 ,..., u^k_i ,..., u^k_N) with u^k_i = (u^k_i1 ,...,
u^k_iT)'. For the TxN residual matrix U_k of equation k, temporal
resampling is the operation of constructing a TxN matrix U_k*, where the
rows of U_k* are obtained by resampling with replacement rows of
U_k. Use this resampling method if the rows of U_k are independent (no
temporal dependence).

dbsn refers to a double resampling scheme, which is a combination of
temporal resampling and cross-sectional resampling. For a TxN residual
matrix U_k of equation k, double resampling is the operation of
constructing a TxN matrix U_k**. First, residuals are temporal resampled
and U_k* is obtained, see bsn. Second, residuals obtained by temporal
resampling U_k* are cross-sectional resampled by resampling with
replacement columns of U_k*. Use this resampling method if the rows of
U_k and the columns of U_k* are independent (no temporal and no
cross-sectional dependence).

(3) Compute a bootstrap panel data set recursively, including all variables k as

y*^k_it = â0_i + â1 * y*^k_it-1 + ... + âp * y*^k_it-p + u*^k_it.

where y*^k_it-1 to y*^k_it-p are true initial values.

(4) Reestimate the parameters of the PVAR model using the bootstrap panel data
set. Obtain a bootstrap version of IRFs and FEVDs.

(5) Repeat these steps step(#) times, where step(#) is a large number.

(II) Parametric residual bootstrap algorithm

(1) Estimate the parameters of the PVAR model under consideration. Compute
the residuals û_it. Calculate IRFs and FEVDs.

(2) Construct a TxN matrix U_k* by randomly dawing from a normal-distribution
N ~ [0; Variance^k_u], where Variance^k_u is the mean-square-error (MSE) of
equation k.

(3) Compute a bootstrap panel data set recursively, including all variables k as

y*^k_it = â0_i + â1 * y*^k_it-1 + ... + âp * y*^k_it-p + u*^k_it.

where y*^k_it-1 to y*^k_it-p are true initial values.

(4)	Reestimate the parameters of the PVAR model using the bootstrap panel data
set. Obtain a bootstrap version of IRFs and FEVDs.

(5) Repeat these steps step(#) times, where step(#) is a large number.

(III) Monte-Carlo algorithm, see Doan (2007) and Hamilton (1994)

(1) Estimate the parameters of the PVAR model under consideration.

(2) Draw a new innovation covariance matrix using the asymptotic distribution of the
innovation covariance matrix. Use the Cholesky factorization to obtain contemporary
coefficients.

(3) Derive the new coefficient covariance matrix from the the drawn innovation
covariance matrix.

(4) Draw a vector of random components using the new coefficient covariance matrix.

(5) Calculate two sets of coefficients. To obtain the first set, add the random vector to
the coefficient vector. To obtain the second set, deduct the random component
from the coefficient vector.

(6) Calculate an impulse response function for each of the sets of coefficients.

(7) Repeat these steps step(#) times, where step(#) is a large number.

(IV) Computation of confidence intervals

xtvar2 either computes standard percentile intervals (default) or standard normal confidence
intervals (norm). See Lütkepohl (2005) Appendix D.3 for a detailed description. bstat
serves as basis for the computation of the confidence intervals.

Options

Model

lags(#) specifies the lags to be included in the model. The default is lags(2).
This option takes an integer for the maximum lag. For example, lags(2) would include
the first two lags in the model.

pooled specifies that xtvar2 estimates a multivariate least squares model with
common intercept for cross-sectional units.

Impulse Response Function

stirf specifies that xtvar2 estimates IRFs to one-unit shocks and FEVDs based
on IRFs to one-unit shocks. If stirf is not specified xtvar2 estimates IRFs to
one-standard deviation shocks and FEVDs based on IRFs to one-standard deviation shocks.

step(#) specifies the step (forecast) horizon. The default is eight periods.

ssaving(filename[, replace]) creates the data set filename and
saves IRFs, FEVDs, and corresponding confidence intervals in it. The new file filename
is a .dta data set that can be loaded using use. If filename is specified
without an extension, .dta is assumed.

bsn specifies that xtvar2 estimates confidence intervals for IRFs and FEVDs
using the nonparametric residual bootstrap algorithm with the
temporal resampling scheme. You have to specify one of the
following options: bsn, dbsn, bsp, or bsn.

dbsn specifies that xtvar2 estimates confidence intervals for IRFs and FEVDs
using the nonparametric residual bootstrap algorithm with
double resampling scheme. You have to specify one of the
following options: bsn, dbsn, bsp, or bsn.

bsp specifies that xtvar2 estimates confidence intervals for IRFs and FEVDs
using the parametric residual algorithm bootstrap.
You have to specify one of the following options: bsn, dbsn, bsp, or
bsn.

mc specifies that xtvar2 estimates confidence intervals for IRFs and FEVDs
using the Monte-Carlo simulation algorithm.
You have to specify one of the following options: bsn, dbsn, bsp, or
bsn.

norm specifies that xtvar2 computes standard normal confidence intervals instead
of standard percentile intervals.

reps(#) specifies the number of bootstrap replications to be performed. The default is
200. The number of replications must be larger than 2.

Reporting

level(#) specifies the confidence level for confidence intervals as a percentage. The
default is 95.

nodraw suppresses graphs of IRFs and FEVDs.

Saved results

xtvar2 saves the following in e():

Scalars

e(N) number of observations

e(neqs) number of dependent variables

e(N_g) number of groups

e(g) number of observations per group

e(df_m) model degrees of freedom

e(df_r) residual degrees of freedom

e(k_#) number of parameters in equation #

e(df_m#) model degrees of freedom for equation #

e(df_r#) residual degrees of freedom for equation #

e(r2_#) R-squared for equation #

e(tss_#) total sum of squares for equation #

e(rss_#) residual sum of squares for equation #

e(mss_#) model sum of squares for equation #

e(rmse_#) root mean squared error for equation #

e(F_#) F statistic for equation #

e(F_panel_#) F-Test lagged variables for equation #

e(p_panel_#) p-Value of F-Test lagged variables for equation #

Macros

e(cmdline) command as typed

e(cmd) xtvar2

e(eqnames) names of equations

e(properties) b V

e(ivar) name of panel variable

Matrices

e(b) coefficient vector

e(A) contemporaneous coefficient matrix

e(V) variance-covariance matrix of the estimators

e(Sigma) Sigma hat matrix

References

Bun, M. J. G. and J. F. Kiviet. 2006.
The effects of dynamic feedbacks on LS and MM estimator
accuracy in panel data models.
Journal of Econometrics.
132(2).
409-444.

Cagala, T., U. Glogowsky, V. Grimm & J. Rincke, 2014.
Cooperation and Trustworthiness in Repeated Interaction.

Doan, T. A. 2007.
RATS Version 7 User's Guide.
Evanston, IL: Estima.

Hamilton, J. D. 1994.
Time Series Analysis.
Princeton, NJ: Princeton University Press.

Hahn, J., and G. Kuersteiner. 2002.
Asymptotically Unbiased Inference for a Dynamic Panel
Model with Fixed Effects when Both n and T Are Large.
Econometrica.
70(4).
1639-1657.

Kapetanios, G. 2008
A bootstrap procedure for panel data sets with
many cross-sectional units.
Econometrics Journal.
11(2).
377-395.

Lütkepohl, H. 2005.
New Introduction to Multiple Time Series Analysis.
Berlin: Springer.

Nickell, S. J. 1981.
Biases in Dynamic Models with Fixed Effects.
Econometrica.
49(6).
1417-26.

Authors

Tobias Cagala and Ulrich Glogowsky

Department of Economics

Friedrich-Alexander University of Erlangen-Nuremberg

tobias.cagala@fau.de / ulrich.glogowsky@fau.de

Citation

If you use the program in a paper, please cite the tool as:

Cagala, T. and Glogowsky, U. 2014.
Panel Vector Autoregressions for Stata (xtvar2).