set_bvar {bvhar}R Documentation

Hyperparameters for Bayesian Models

Description

Set hyperparameters of Bayesian VAR and VHAR models.

Usage

set_bvar(sigma, lambda = 0.1, delta, eps = 1e-04)

set_bvar_flat(U)

set_bvhar(sigma, lambda = 0.1, delta, eps = 1e-04)

set_weight_bvhar(sigma, lambda = 0.1, eps = 1e-04, daily, weekly, monthly)

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

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

Arguments

sigma

Standard error vector for each variable (Default: sd)

lambda

Tightness of the prior around a random walk or white noise (Default: .1)

delta

Persistence (Default: Litterman sets 1 = random walk prior, White noise prior = 0)

eps

Very small number (Default: 1e-04)

U

Positive definite matrix. By default, identity matrix of dimension ncol(X0)

daily

Same as delta in VHAR type (Default: 1 as Litterman)

weekly

Fill the second part in the first block (Default: 1)

monthly

Fill the third part in the first block (Default: 1)

x

bvharspec object

digits

digit option to print

...

not used

Details

\delta_i are related to the belief to random walk.

\lambda controls the overall tightness of the prior around these two prior beliefs.

\sigma_i^2 / \sigma_j^2 in Minnesota moments explain the data scales.

Value

Every function returns bvharspec class. It is the list of which the components are the same as the arguments provided. If the argument is not specified, NULL is assigned here. The default values mentioned above will be considered in each fitting function.

process

Model name: BVAR, BVHAR

prior

Prior name: Minnesota (Minnesota prior for BVAR), Hierarchical (Hierarchical prior for BVAR), MN_VAR (BVHAR-S), MN_VHAR (BVHAR-L), Flat (Flat prior for BVAR)

sigma

Vector value (or bvharpriorspec class) assigned for sigma

lambda

Value (or bvharpriorspec class) assigned for lambda

delta

Vector value assigned for delta

eps

Value assigned for epsilon

set_weight_bvhar() has different component with delta due to its different construction.

daily

Vector value assigned for daily weight

weekly

Vector value assigned for weekly weight

monthly

Vector value assigned for monthly weight

Note

By using set_psi() and set_lambda() each, hierarchical modeling is available.

References

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

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

Ghosh, S., Khare, K., & Michailidis, G. (2018). High-Dimensional Posterior Consistency in Bayesian Vector Autoregressive Models. Journal of the American Statistical Association, 114(526).

Kim, Y. G., and Baek, C. (2023+). Bayesian vector heterogeneous autoregressive modeling. Journal of Statistical Computation and Simulation.

Kim, Y. G., and Baek, C. (2023+). Bayesian vector heterogeneous autoregressive modeling. Journal of Statistical Computation and Simulation.

See Also

Examples

# Minnesota BVAR specification------------------------
bvar_spec <- set_bvar(
  sigma = c(.03, .02, .01), # Sigma = diag(.03^2, .02^2, .01^2)
  lambda = .2, # lambda = .2
  delta = rep(.1, 3), # delta1 = .1, delta2 = .1, delta3 = .1
  eps = 1e-04 # eps = 1e-04
)
class(bvar_spec)
str(bvar_spec)
# Flat BVAR specification-------------------------
# 3-dim
# p = 5 with constant term
# U = 500 * I(mp + 1)
bvar_flat_spec <- set_bvar_flat(U = 500 * diag(16))
class(bvar_flat_spec)
str(bvar_flat_spec)
# BVHAR-S specification-----------------------
bvhar_var_spec <- set_bvhar(
  sigma = c(.03, .02, .01), # Sigma = diag(.03^2, .02^2, .01^2)
  lambda = .2, # lambda = .2
  delta = rep(.1, 3), # delta1 = .1, delta2 = .1, delta3 = .1
  eps = 1e-04 # eps = 1e-04
)
class(bvhar_var_spec)
str(bvhar_var_spec)
# BVHAR-L specification---------------------------
bvhar_vhar_spec <- set_weight_bvhar(
  sigma = c(.03, .02, .01), # Sigma = diag(.03^2, .02^2, .01^2)
  lambda = .2, # lambda = .2
  eps = 1e-04, # eps = 1e-04
  daily = rep(.2, 3), # daily1 = .2, daily2 = .2, daily3 = .2
  weekly = rep(.1, 3), # weekly1 = .1, weekly2 = .1, weekly3 = .1
  monthly = rep(.05, 3) # monthly1 = .05, monthly2 = .05, monthly3 = .05
)
class(bvhar_vhar_spec)
str(bvhar_vhar_spec)

[Package bvhar version 2.0.1 Index]