estimate.BSVARSV {bsvars} | R Documentation |
Bayesian estimation of a Structural Vector Autoregression with Stochastic Volatility heteroskedasticity via Gibbs sampler
Description
Estimates the SVAR with Stochastic Volatility (SV) heteroskedasticity
proposed by Lütkepohl, Shang, Uzeda, and Woźniak (2024).
Implements the Gibbs sampler proposed by Waggoner & Zha (2003)
for the structural matrix B
and the equation-by-equation sampler
by Chan, Koop, & Yu (2024)
for the autoregressive slope parameters A
. Additionally,
the parameter matrices A
and B
follow a Minnesota prior and generalised-normal prior distributions
respectively with the matrix-specific
overall shrinkage parameters estimated thanks to a hierarchical prior distribution.
The SV model is estimated using a range of techniques including:
simulation smoother, auxiliary mixture, ancillarity-sufficiency interweaving strategy,
and generalised inverse Gaussian distribution summarised by Kastner & Frühwirth-Schnatter (2014).
See section Details for the model equations.
Usage
## S3 method for class 'BSVARSV'
estimate(specification, S, thin = 1, show_progress = TRUE)
Arguments
specification |
an object of class BSVARSV generated using the |
S |
a positive integer, the number of posterior draws to be generated |
thin |
a positive integer, specifying the frequency of MCMC output thinning |
show_progress |
a logical value, if |
Details
The heteroskedastic SVAR model is given by the reduced form equation:
Y = AX + E
where Y
is an NxT
matrix of dependent variables, X
is a KxT
matrix of explanatory variables,
E
is an NxT
matrix of reduced form error terms, and A
is an NxK
matrix of autoregressive slope coefficients and parameters on deterministic terms in X
.
The structural equation is given by
BE = U
where U
is an NxT
matrix of structural form error terms, and
B
is an NxN
matrix of contemporaneous relationships.
Finally, the structural shocks, U
, are temporally and contemporaneously independent and jointly normally distributed with zero mean.
Two alternative specifications of the conditional variance of the n
th shock at time t
can be estimated: non-centred Stochastic Volatility by Lütkepohl, Shang, Uzeda, and Woźniak (2022)
or centred Stochastic Volatility by Chan, Koop, & Yu (2021).
The non-centred Stochastic Volatility by Lütkepohl, Shang, Uzeda, and Woźniak (2022)
is selected by setting argument centred_sv
of function specify_bsvar_sv$new()
to value FALSE
.
It has the conditional variances given by:
Var_{t-1}[u_{n.t}] = exp(w_n h_{n.t})
where w_n
is the estimated conditional standard deviation of the log-conditional variance
and the log-volatility process h_{n.t}
follows an autoregressive process:
h_{n.t} = g_n h_{n.t-1} + v_{n.t}
where h_{n.0}=0
, g_n
is an autoregressive parameter and v_{n.t}
is a standard normal error term.
The centred Stochastic Volatility by Chan, Koop, & Yu (2021)
is selected by setting argument centred_sv
of function specify_bsvar_sv$new()
to value TRUE
.
Its conditional variances are given by:
Var_{t-1}[u_{n.t}] = exp(h_{n.t})
where the log-conditional variances h_{n.t}
follow an autoregressive process:
h_{n.t} = g_n h_{n.t-1} + v_{n.t}
where h_{n.0}=0
, g_n
is an autoregressive parameter and v_{n.t}
is a zero-mean normal error term
with variance s_{v.n}^2
.
Value
An object of class PosteriorBSVARSV containing the Bayesian estimation output and containing two elements:
posterior
a list with a collection of S
draws from the posterior distribution generated via Gibbs sampler containing:
- A
an
NxKxS
array with the posterior draws for matrixA
- B
an
NxNxS
array with the posterior draws for matrixB
- hyper
a
5xS
matrix with the posterior draws for the hyper-parameters of the hierarchical prior distribution- h
an
NxTxS
array with the posterior draws of the log-volatility processes- rho
an
NxS
matrix with the posterior draws of SV autoregressive parameters- omega
an
NxS
matrix with the posterior draws of SV process conditional standard deviations- S
an
NxTxS
array with the posterior draws of the auxiliary mixture component indicators- sigma2_omega
an
NxS
matrix with the posterior draws of the variances of the zero-mean normal prior foromega
- s_
an
S
-vector with the posterior draws of the scale of the gamma prior of the hierarchical prior forsigma2_omega
last_draw
an object of class BSVARSV with the last draw of the current MCMC run as the starting value to be passed to the continuation of the MCMC estimation using estimate()
.
Author(s)
Tomasz Woźniak wozniak.tom@pm.me
References
Chan, J.C.C., Koop, G, and Yu, X. (2024) Large Order-Invariant Bayesian VARs with Stochastic Volatility. Journal of Business & Economic Statistics, 42, doi:10.1080/07350015.2023.2252039.
Kastner, G. and Frühwirth-Schnatter, S. (2014) Ancillarity-Sufficiency Interweaving Strategy (ASIS) for Boosting MCMC Estimation of Stochastic Volatility Models. Computational Statistics & Data Analysis, 76, 408–423, doi:10.1016/j.csda.2013.01.002.
Lütkepohl, H., Shang, F., Uzeda, L., and Woźniak, T. (2024) Partial Identification of Heteroskedastic Structural VARs: Theory and Bayesian Inference. University of Melbourne Working Paper, 1–57, doi:10.48550/arXiv.2404.11057.
Waggoner, D.F., and Zha, T., (2003) A Gibbs sampler for structural vector autoregressions. Journal of Economic Dynamics and Control, 28, 349–366, doi:10.1016/S0165-1889(02)00168-9.
See Also
specify_bsvar_sv
, specify_posterior_bsvar_sv
, normalise_posterior
Examples
# simple workflow
############################################################
# upload data
data(us_fiscal_lsuw)
# specify the model and set seed
specification = specify_bsvar_sv$new(us_fiscal_lsuw, p = 1)
set.seed(123)
# run the burn-in
burn_in = estimate(specification, 10)
# estimate the model
posterior = estimate(burn_in, 20, 2)
# workflow with the pipe |>
############################################################
set.seed(123)
us_fiscal_lsuw |>
specify_bsvar_sv$new(p = 1) |>
estimate(S = 10) |>
estimate(S = 20, thin = 2) |>
compute_impulse_responses(horizon = 4) -> irf