vhar_bayes | R Documentation |
This function fits BVHAR.
Covariance term can be homoskedastic or heteroskedastic (stochastic volatility).
It can have Minnesota, SSVS, and Horseshoe prior.
vhar_bayes(
y,
har = c(5, 22),
num_chains = 1,
num_iter = 1000,
num_burn = floor(num_iter/2),
thinning = 1,
bayes_spec = set_bvhar(),
cov_spec = set_ldlt(),
intercept = set_intercept(),
include_mean = TRUE,
minnesota = c("longrun", "short", "no"),
ggl = TRUE,
save_init = FALSE,
convergence = NULL,
verbose = FALSE,
num_thread = 1
)
## S3 method for class 'bvharsv'
print(x, digits = max(3L, getOption("digits") - 3L), ...)
## S3 method for class 'bvharldlt'
print(x, digits = max(3L, getOption("digits") - 3L), ...)
## S3 method for class 'bvharsv'
knit_print(x, ...)
## S3 method for class 'bvharldlt'
knit_print(x, ...)
y |
Time series data of which columns indicate the variables |
har |
Numeric vector for weekly and monthly order. By default, |
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 BVHAR model specification by |
cov_spec |
|
intercept |
|
include_mean |
Add constant term (Default: |
minnesota |
Apply cross-variable shrinkage structure (Minnesota-way). Two type: |
ggl |
If |
save_init |
Save every record starting from the initial values ( |
convergence |
Convergence threshold for rhat < convergence. By default, |
verbose |
Print the progress bar in the console. By default, |
num_thread |
Number of threads |
x |
|
digits |
digit option to print |
... |
not used |
Cholesky stochastic volatility modeling for VHAR based on
\Sigma_t^{-1} = L^T D_t^{-1} L
vhar_bayes()
returns an object named bvharsv
class. It is a list with the following components:
Posterior mean of coefficients.
Posterior mean of contemporaneous effects.
Every set of MCMC trace.
Name of every parameter.
Indicators for group.
Number of groups.
Numer of Coefficients: 3m + 1
or 3m
3 (The number of terms. It contains this element for usage in other functions.)
Order for weekly term
Order for monthly term
Dimension of the data
Sample size used when training = totobs
- p
Total number of the observation
Matched call
Description of the model, e.g. VHAR_SSVS_SV
, VHAR_Horseshoe_SV
, or VHAR_minnesota-part_SV
include constant term (const
) or not (none
)
Coefficients prior specification
log volatility prior specification
Initial values
Intercept prior specification
The numer of chains
Total iterations
Burn-in
Thinning
VHAR linear transformation matrix
Y_0
X_0
Raw input
If it is SSVS or Horseshoe:
Posterior inclusion probabilities.
Kim, Y. G., and Baek, C. (2024). Bayesian vector heterogeneous autoregressive modeling. Journal of Statistical Computation and Simulation, 94(6), 1139-1157.
Kim, Y. G., and Baek, C. (n.d.). Working paper.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.