MSBVAR (version 0.9-2)

szbsvar: Structural Sims-Zha Bayesian VAR model estimation

Description

Estimates the posterior mode for a Bayesian Structural Vector Autoregression (B-SVAR) model using the prior specified by Sims and Zha (1998)

Usage

szbsvar(Y, p, z = NULL, lambda0, lambda1, lambda3, lambda4, lambda5, mu5, mu6, ident, qm = 4)

Arguments

Y
$T x m$ multiple time series object created with ts() with no NAs.
p
integer lag length for the model
z
$T x k$ matrix of exogenous variables (not including an intercept)
lambda0
$[0,1]$, Overall tightness of the prior (discounting of prior scale).
lambda1
$[0,1]$, Standard deviation or tightness of the prior around the AR(1) parameters.
lambda3
Lag decay ($> 0$, with 1=harmonic)
lambda4
Standard deviation or tightness around the intercept $>0$
lambda5
Standard deviation or tightness around the exogneous variable coefficients $>0$
mu5
Sum of coefficients prior weight $\ge0$. Larger values imply difference stationarity.
mu6
Dummy Initial observations or drift prior $\ge 0$. Larger values allow for common trends.
ident
$m x m$ matrix of binary indicators for the identification of the free and restricted contemporaneous parameters in $A(0)$.
qm
Frequency of the data for lag decay equivalence. Default is 4, and a value of 12 will match the lag decay of monthly to quarterly data. Other values have the same effect as "4"

Value

A list of the class "BSVAR" that summarizes the posterior mode of the B-SVAR model
XX
$X'X + H_0$ crossproduct moment matrix for the predetermined variables in the model plus the prior
XY
$X'Y$ for the model, including the dummy observations for mu5 and mu6
YY
$m x m$ Crossproduct for the Y's in the model
y
$T x m$ input data in dat plus the m dummy observations for dat
structural.innovations
$T x m$ structural innovations for the SVAR model
Ui
$m x q(i)$ Null space matrices that map the columns of $A(0)$ to the free parameters of the columns
Hpinv.tilde
Prior covariance for the predetermined and exogenous regression in the B-SVAR
H0inv.tilde
$m$ dimensional list of the prior covariances for the free parameters of the i'th equation in the model's $A_0$ matrix
Pi.tilde
list of $(m^2 p + 1 + h) x q(i)$ matrices of the prior for the parameters for the predetermined variables in the model
Hpinv.posterior
$(m^2 * p + 1 + h) x m$ matrix of the posterior of the structural parameters for the predetermined variables
P.posterior
list of $(m^2 * p + 1 + h) x m$ matrices of the posterior of the paramters for the predetermined variables in the model
H0inv.posterior
$m$ dimensional list of the posterior covariances for the free parameters of the i'th equation in the model's $A(0)$ matrix
A0.mode
posterior mode of the $A(0)$ matrix
F.posterior
$(m^2 * p + 1 + h) x m$ matrix of the posterior of the structural parameters for the predetermined variables
B.posterior
$(m^2 * p + 1 + h) x m$ matrix of the posterior of the reduced form parameters for the predetermined variables
ar.coefs
$m^2 p x m$ matrix of the posterior of the reduced form autoregressive parameters
intercept
$m$ dimensional vector of the reduced form intercepts
exog.coefs
$h x m$ matrix of the reduced form exogenous variable coefficients
prior
List of the prior parameter: c(lambda0,lambda1,lambda3,lambda4,lambda5, mu5, mu6).
df
Degrees of freedom for the model: T + number of dummy observations - lag length.
n0
$m$ dimensional list of the number of free parameters for the $A(0)$ matrix for equation $i$.
ident
$m x m$ identification matrix ident.

Warning

If you do not understand the model described here, you probably want the models described in szbvar or reduced.form.var

Details

This function estimates the posterior mode for the Bayesian structural VAR (B-SVAR) model described by Sims and Zha (1998) and Waggoner and Zha (2003). This B-SVAR model is based a specification of the dynamic simultaneous equation representation of the model. The prior is constructed for the structural parameters.

The basic SVAR model has the form of Waggoner and Zha (2003): $$ y_t^\prime A_0 = \sum_{\ell=1}^p Y_{t-\ell}^\prime A_\ell + z_t^\prime D + \epsilon_t^\prime, t = 1, \ldots, T, $$

where $A(i)$ are $m x m$ parameter matrices for the contemporaneous and lagged effects of the endogenous variables, $D$ is an $h x m$ parameter matrix for the exogenous variables (including an intercept), $y(t)$ is the $m x 1$ matrix of the endogenous variables, $z(t)$ is a $h x 1$ vector of exogenous variables (including an intercept) and $e(t)$ is the $m x 1$ matrix of structural shocks. NOTE that in this representation of the model, the columns of the $A(i)$ matrices refer to the equations!

The structural shocks are normal with mean and variance equal to the following: $$ E[\epsilon_t | y_1, \ldots, y_{t-1}, z_1, \ldots z_{t-1}] = 0$$ $$E[\epsilon_t \epsilon_t^\prime | y_1, \ldots, y_{t-1}, z_1, \ldots z_{t-1}] = I$$

The reduced form representation of the SVAR model can be found by post-multiplying through by $A(0)^{-1}$: $$ y_t^\prime A_0 A_0^{-1} = \sum_{\ell=1}^p Y_{t-\ell}^\prime A_\ell A_0^{-1} + z_t^\prime DA_0^{-1} + \epsilon_t^\prime A_0^{-1}$$

$$y_t^\prime = \sum_{\ell=1}^p Y_{t-\ell}^\prime B_\ell + z_t^\prime \Gamma + \epsilon_t^\prime A_0^{-1}.$$

The reduced form error covariance matrix is found from the crossproduct of the reduced form innovations:

$$ \Sigma = E[(\epsilon_t^\prime A_0^{-1})(\epsilon_t^\prime A_0^{-1})^\prime] = [A_0 A_0^\prime]^{-1}. $$.

Restrictions on the contemporaneous parameters in $A(0)$ are expressed by the specification of the ident matrix that defines the shocks that "hit" each equation in the contemporaneous specification. If ident is defined as in the following table,

Equations
Variables Eqn 1
Eqn 2 Eqn 3 Var. 1
1 0 0
Var. 2 1 1
0

then the corresponding $A(0)$ is restricted to

Equations
Variables Eqn 1
Eqn 2 Eqn 3 Var. 1
$a(11)$ 0 0
Var. 2 $a(12)$ $a(22)$
0

which is interpreted as shocks in variables 1 and 2 hit equation 1 (the first column); shocks in variables 2 and 3 hit the second equation (column 2); and, shocks in variable 3 hit the third equation (column 3).

As in Sims and Zha (1998) and Waggoner and Zha (2003), the prior for the model is formed for each of the equations. To illustrate the prior, the model is written in the more compact notation

$$ y_t^\prime A_0 = x_t^\prime F + \epsilon_t^\prime$$ where $$ x_t^\prime = [ y_{t-1}^\prime \cdots y_{t-p}^\prime, z_t^\prime], F^\prime = [A_1^\prime \cdots A_p^\prime \, D^\prime] $$ are the matrices of the right hand side variables and the right hand side coefficients for the SVAR model.

The general form of this prior is then $$a_i \sim N(0, \bar{S_i}) \quad \textrm{and} \quad f_i | a_i \sim N(\bar{P}_i a_i, \bar{H}_i)$$

where $S(i)$ is an $m x m$ prior covariance of the contemporaneous parameters, and $H(i)$ is the $k x k$ prior covariance of the parameters in $f(i) | a(i)$. The prior means of $a(i)$ are zero in the structural model, while the "random walk" component is in $P(i) a(i)$.

The prior covariance matrix of the errors, $S(i)$, is initially estimated using a VAR(p) model via OLS, with an intercept and no demeaning of the data.

The Bayesian prior is constructed for the unrestricted VAR model and then mapped into the restricted prior parameter space, as discussed in Waggoner and Zha (2003a).

References

Sims, C.A. and Tao A. Zha. 1998. "Bayesian Methods for Dynamic Multivariate Models." International Economic Review. 39(4):949-968.

Waggoner, Daniel F. and Tao A. Zha. 2003a. "A Gibbs sampler for structural vector autoregressions" Journal of Economic Dynamics \& Control. 28:349--366.

Waggoner, Daniel F. and Tao A. Zha. 2003b. "Likelihood preserving normalization in multiple equation models". Journal of Econometrics. 114: 329--347.

Brandt, Patrick T. and John R. Freeman. 2006. "Advances in Bayesian Time Series Modeling and the Study of Politics: Theory Testing, Forecasting, and Policy Analysis". Political Analysis 14(1):1-36.

See Also

szbvar for reduced form Bayesian VAR models, reduced.form.var for non-Bayesian reduced form VAR models, gibbs.A0 for drawing from the posterior of this model using a Gibbs sampler, posterior.fit for assessing the posterior fit of the model, and mc.irf for computing impulse responses for this model.

Examples

Run this code
# SZ, B-SVAR model for the Levant data
data(BCFdata)
m <- ncol(Y)
ident <- diag(m)
ident[1,] <- 1
ident[2,1] <- 1

# estimate the model's posterior moments
model <- szbsvar(Y, p=2, z=z2, lambda0=0.8, lambda1=0.1,
                 lambda3=1, lambda4=0.1, lambda5=0.05,
                 mu5=0, mu6=5, ident, qm=12)

Run the code above in your browser using DataLab