bvar_niwhm {bvhar}R Documentation

Fitting Hierarchical Bayesian VAR(p)

Description

This function fits hierarchical BVAR(p) with general Minnesota prior.

Usage

bvar_niwhm(
  y,
  p,
  num_iter = 1000,
  num_burn = floor(num_iter/2),
  thinning = 1,
  bayes_spec = set_bvar(sigma = set_psi(), lambda = set_lambda()),
  scale_variance = 0.05,
  include_mean = TRUE,
  parallel = list(),
  verbose = FALSE
)

## S3 method for class 'bvarhm'
print(x, digits = max(3L, getOption("digits") - 3L), ...)

## S3 method for class 'bvarhm'
knit_print(x, ...)

Arguments

y

Time series data of which columns indicate the variables

p

VAR lag

num_iter

MCMC iteration number

num_burn

Number of burn-in (warm-up). Half of the iteration is the default choice.

thinning

Thinning every thinning-th iteration

bayes_spec

A BVAR model specification by set_ssvs().

scale_variance

Proposal distribution scaling constant to adjust an acceptance rate

include_mean

Add constant term (Default: TRUE) or not (FALSE)

parallel

List the same argument of optimParallel::optimParallel(). By default, this is empty, and the function does not execute parallel computation.

verbose

Print the progress bar in the console. By default, FALSE.

x

bvarhm object

digits

digit option to print

...

not used

Details

SSVS prior gives prior to parameters \alpha = vec(A) (VAR coefficient) and \Sigma_e^{-1} = \Psi \Psi^T (residual covariance).

\alpha_j \mid \gamma_j \sim (1 - \gamma_j) N(0, \kappa_{0j}^2) + \gamma_j N(0, \kappa_{1j}^2)

\gamma_j \sim Bernoulli(q_j)

and for upper triangular matrix \Psi,

\psi_{jj}^2 \sim Gamma(shape = a_j, rate = b_j)

\psi_{ij} \mid w_{ij} \sim (1 - w_{ij}) N(0, \kappa_{0,ij}^2) + w_{ij} N(0, \kappa_{1,ij}^2)

w_{ij} \sim Bernoulli(q_{ij})

Gibbs sampler is used for the estimation. See ssvs_bvar_algo how it works.

Value

bvar_niwhm returns an object named bvarhm class. It is a list with the following components:

coefficients

Coefficient Matrix

p

Lag of VAR

m

Dimension of the data

obs

Sample size used when training = totobs - p

totobs

Total number of the observation

call

Matched call

type

include constant term ("const") or not ("none")

y0

Y_0

design

X_0

y

Raw input

References

BaƄbura, M., Giannone, D., & Reichlin, L. (2010). Large Bayesian vector auto regressions. Journal of Applied Econometrics, 25(1).

Giannone, D., Lenza, M., & Primiceri, G. E. (2015). Prior Selection for Vector Autoregressions. Review of Economics and Statistics, 97(2).

Litterman, R. B. (1986). Forecasting with Bayesian Vector Autoregressions: Five Years of Experience. Journal of Business & Economic Statistics, 4(1), 25.


[Package bvhar version 2.0.1 Index]