# Bayesian Estimation of the Panel VAR Model

To simplify the following exposition, we rewrite the panel VAR model as: where Yc is a matrix with N endogenous variables in the columns and time-series observations in the rows, in country c, with the total number of countries C? Xc contains the lags of the variables in Yc and the interac-

W L

tion terms, i.e. T^Bw.k.Jca-kZZ in Eq. t8-12^ and Bc is the array of asso-

w=1 k=1

ciated coefficients. F contains the common factors and the matrix Dc is the matrix of factor loadings, allowing each factor to affect each equation differently. Zc contains the economic structure variables in levels and the

W W

interaction terms for Yc, i.e. ^GwYtcZWt and ^HwZWt in (8.12), with GH

w=2 w=2

containing the corresponding coefficients. Uc is the matrix of the actual reduced form country-specific VAR innovations. This is assumed to be normally distributed with variance-covariance matrix Z.

Jarocinski (2010) shows that based on these assumptions, the joint posterior of the model can be written as: where Xc = IN®Xa F= IN, Zc = INZa yc = vec(Y) вс = vec(B)

в = VeC(B), dc = vec(Dc) and gh = vec(GH). Based on this posterior, it is

easy to derive the conditional distributions of the Gibbs sampler for this model:

The country-specific VAR coefficients Pc are drawn from: where ^ = Z-1 ® X'c Xc-Vc X is treated as a hyperparameter and drawn from the following inverse gamma 2 distribution: A completely non-informative prior with s and v set to 0 results in an improper posterior in this case. We therefore set both of the quantities to very small positive numbers, which is equivalent to assuming a weakly informative prior. But it is important to point out that X is estimated from the total number of coefficients that this prior is applied to, namely the product of country (C), equations (N) and total number of coefficients in each equation (K). Given this large number of effective units, any weakly informative prior will be dominated by the data. Finally, the variance matrix of the residuals, Z, is drawn from an inverse-Wishart distribution: where Uc = yc - XcPc - Fdc, U is an Txn matrix stacking all of the Uc’s and T is the number of observations for each country.

As in Lopes and West (2004), each individual factor, f, for can be drawn from: where K is an Cx1 vector the associated factor loadings, made up from the elements in dc. Z is an CxC diagonal matrix of variances associated with equation n in country c that the factor loads on. The coefficients associated with the factors are drawn from: Finally, we draw the coefficients contained in GH equation by equation from: where the subscript n refers to equation n in (8.12).This is to capture the asymmetric nature of GH across both of the equations. For the first equation, GH contains the coefficients on the levels of the economic structure variables, namely the financial repression index, the capital account openness index and the exchange rate regime index. The coefficients on all other variables take the value of zeros. For the second equation, all of the coefficients in GH are estimated. In other words, in addition to all of the coefficients from Eq. (8.1), the coefficients on and all of the associated interaction terms are also estimated now.