Skip to contents

This function generates parameters of BVAR with Minnesota prior.

Usage

sim_mnvhar_coef(bayes_spec = set_bvhar(), full = TRUE)

Arguments

bayes_spec

A BVHAR model specification by set_bvhar() (default) or set_weight_bvhar().

full

Generate variance matrix from IW (default: TRUE) or not (FALSE)?

Value

List with the following component.

coefficients

BVHAR coefficient (MN)

covmat

BVHAR variance (IW or diagonal matrix of sigma of bayes_spec)

Details

Normal-IW family for vector HAR model: $$\Phi \mid \Sigma_e \sim MN(M_0, \Omega_0, \Sigma_e)$$ $$\Sigma_e \sim IW(\Psi_0, \nu_0)$$

References

Kim, Y. G., and Baek, C. (2024). Bayesian vector heterogeneous autoregressive modeling. Journal of Statistical Computation and Simulation, 94(6), 1139-1157.

See also

  • set_bvhar() to specify the hyperparameters of VAR-type Minnesota prior.

  • set_weight_bvhar() to specify the hyperparameters of HAR-type Minnesota prior.

Examples

# Generate (Phi, Sigma)
# BVHAR-S
# sigma: 1, 1, 1
# lambda: .1
# delta: .1, .1, .1
# epsilon: 1e-04
set.seed(1)
sim_mnvhar_coef(
  bayes_spec = set_bvhar(
    sigma = rep(1, 3),
    lambda = .1,
    delta = rep(.1, 3),
    eps = 1e-04
  ),
  full = TRUE
)
#> $coefficients
#>               [,1]         [,2]         [,3]
#>  [1,]  0.081071630  0.002721103  0.092414563
#>  [2,]  0.049041658  0.062491732 -0.032011373
#>  [3,] -0.018590620 -0.008312152  0.066508409
#>  [4,]  0.008099504 -0.017944600  0.007603526
#>  [5,] -0.039740346  0.001970018 -0.017502085
#>  [6,]  0.004281752  0.014382071  0.007386941
#>  [7,]  0.010781378  0.011870368  0.001985094
#>  [8,] -0.027501057  0.004849875 -0.019751320
#>  [9,] -0.011622302 -0.003601531 -0.018535816
#> 
#> $covmat
#>             [,1]        [,2]       [,3]
#> [1,]  0.41248285 -0.06400052 0.24882667
#> [2,] -0.06400052  0.14995663 0.01758338
#> [3,]  0.24882667  0.01758338 0.35941383
#>