View source: R/simulate-param.R
sim_mncoef | R Documentation |
This function generates parameters of BVAR with Minnesota prior.
sim_mncoef(p, bayes_spec = set_bvar(), full = TRUE)
p |
VAR lag |
bayes_spec |
A BVAR model specification by |
full |
Generate variance matrix from IW (default: |
Implementing dummy observation constructions, Bańbura et al. (2010) sets Normal-IW prior.
A \mid \Sigma_e \sim MN(A_0, \Omega_0, \Sigma_e)
\Sigma_e \sim IW(S_0, \alpha_0)
If full = FALSE
, the result of \Sigma_e
is the same as input (diag(sigma)
).
List with the following component.
BVAR coefficient (MN)
BVAR variance (IW or diagonal matrix of sigma
of bayes_spec
)
Bańbura, M., Giannone, D., & Reichlin, L. (2010). Large Bayesian vector auto regressions. Journal of Applied Econometrics, 25(1).
Karlsson, S. (2013). Chapter 15 Forecasting with Bayesian Vector Autoregression. Handbook of Economic Forecasting, 2, 791-897.
Litterman, R. B. (1986). Forecasting with Bayesian Vector Autoregressions: Five Years of Experience. Journal of Business & Economic Statistics, 4(1), 25.
set_bvar()
to specify the hyperparameters of Minnesota prior.
# Generate (A, Sigma)
# BVAR(p = 2)
# sigma: 1, 1, 1
# lambda: .1
# delta: .1, .1, .1
# epsilon: 1e-04
set.seed(1)
sim_mncoef(
p = 2,
bayes_spec = set_bvar(
sigma = rep(1, 3),
lambda = .1,
delta = rep(.1, 3),
eps = 1e-04
),
full = TRUE
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.