Description Usage Arguments Details Value Warning Author(s) References See Also Examples
Estimates the posterior mode for a Bayesian Structural Vector Autoregression (B-SVAR) model using the prior specified by Sims and Zha (1998)
1 2 3 |
Y |
T x m multiple time
series object created with |
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 ≥0. Larger values imply difference stationarity. |
mu6 |
Dummy Initial observations or drift prior ≥ 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" |
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)' A(0) = ∑_{i=1}^p Y(t-i)' A(i) + z(t)' D + e(t)', t = 1, ..., 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[e(t) | Y(1),...,Y(t-1), z(1),...,z(t-1)] = 0
E[e(t) e(t)' | y(1),..., y(t-1), z(1),...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' A(0) A(0)^{-1} = ∑_{i=1}^p Y(t-i)' A(i) A(0)^{-1} + z_t' D A(0)^{-1} + e(t)' A(0)^{-1}
y(t)' = ∑_{i=1}^p Y(t-i)' B(i) + z(t)' G + e(t)' A(0)^{-1}.
The reduced form error covariance matrix is found from the crossproduct of the reduced form innovations:
S = E[(e(t)' A(0)^{-1})(e(t)'A_0^{-1})'] = [A(0) A(0)']^{-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 |
Var. 3 | 0 | 1 | 1 |
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 |
Var. 3 | 0 | a(23) | a(33) |
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)' A(0) = x(t)'F + e(t)'
where
x(t)' = [ y(t-1)', ..., y(t-p)', z(t)'], F' = [A(1)', ..., A(p)', D']
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) ~ N(0, S(i)) and f(i) | a(i) ~ N(P(i) a(i), 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).
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 |
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:
|
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
|
If you do not understand the model described here,
you probably want the models described in szbvar
or
reduced.form.var
Patrick T. Brandt
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.
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.
1 2 3 4 5 6 7 8 9 10 11 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.