Usage
bvar_ssvs(
y,
p,
num_chains = 1,
num_iter = 1000,
num_burn = floor(num_iter/2),
thinning = 1,
bayes_spec = choose_ssvs(y = y, ord = p, type = "VAR", param = c(0.1, 10), include_mean
= include_mean, gamma_param = c(0.01, 0.01), mean_non = 0, sd_non = 0.1),
init_spec = init_ssvs(type = "auto"),
include_mean = TRUE,
minnesota = FALSE,
verbose = FALSE,
num_thread = 1
)
# S3 method for class 'bvarssvs'
print(x, digits = max(3L, getOption("digits") - 3L), ...)
# S3 method for class 'bvarssvs'
knit_print(x, ...)
Arguments
- y
Time series data of which columns indicate the variables
- p
VAR lag
- num_chains
Number of MCMC chains
- 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 SSVS model specification by
set_ssvs()
. By default, use a default semiautomatic approachchoose_ssvs()
.- init_spec
SSVS initialization specification by
init_ssvs()
. By default, use OLS for coefficient and cholesky factor while 1 for dummies.- include_mean
Add constant term (Default:
TRUE
) or not (FALSE
)- minnesota
Apply cross-variable shrinkage structure (Minnesota-way). By default,
FALSE
.- verbose
Print the progress bar in the console. By default,
FALSE
.- num_thread
- x
bvarssvs
object- digits
digit option to print
- ...
not used
Value
bvar_ssvs
returns an object named bvarssvs
class.
It is a list with the following components:
- coefficients
Posterior mean of VAR coefficients.
- chol_posterior
Posterior mean of cholesky factor matrix
- covmat
Posterior mean of covariance matrix
- omega_posterior
Posterior mean of omega
- pip
Posterior inclusion probability
- param
posterior::draws_df with every variable: alpha, eta, psi, omega, and gamma
- param_names
Name of every parameter.
- df
Numer of Coefficients:
mp + 1
ormp
- 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
- process
Description of the model, e.g.
VAR_SSVS
- type
include constant term (
const
) or not (none
)- spec
SSVS specification defined by
set_ssvs()
- init
Initial specification defined by
init_ssvs()
- chain
The numer of chains
- iter
Total iterations
- burn
Burn-in
- thin
Thinning
- group
Indicators for group.
- num_group
Number of groups.
- y0
\(Y_0\)
- design
\(X_0\)
- y
Raw input
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})$$
References
George, E. I., & McCulloch, R. E. (1993). Variable Selection via Gibbs Sampling. Journal of the American Statistical Association, 88(423), 881-889.
George, E. I., Sun, D., & Ni, S. (2008). Bayesian stochastic search for VAR model restrictions. Journal of Econometrics, 142(1), 553-580.
Koop, G., & Korobilis, D. (2009). Bayesian Multivariate Time Series Methods for Empirical Macroeconomics. Foundations and Trends® in Econometrics, 3(4), 267-358.