bvhar_sv {bvhar} | R Documentation |
Fitting Bayesian VHAR-SV
Description
This function fits VHAR-SV. It can have Minnesota, SSVS, and Horseshoe prior.
Usage
bvhar_sv(
y,
har = c(5, 22),
num_chains = 1,
num_iter = 1000,
num_burn = floor(num_iter/2),
thinning = 1,
bayes_spec = set_bvhar(),
sv_spec = set_sv(),
intercept = set_intercept(),
include_mean = TRUE,
minnesota = c("longrun", "short", "no"),
save_init = FALSE,
verbose = FALSE,
num_thread = 1
)
## S3 method for class 'bvharsv'
print(x, digits = max(3L, getOption("digits") - 3L), ...)
## S3 method for class 'bvharsv'
knit_print(x, ...)
Arguments
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 |
sv_spec |
SV specification by |
intercept |
Prior for the constant term by |
include_mean |
Add constant term (Default: |
minnesota |
Apply cross-variable shrinkage structure (Minnesota-way). Two type: |
save_init |
Save every record starting from the initial values ( |
verbose |
Print the progress bar in the console. By default, |
num_thread |
Number of threads |
x |
|
digits |
digit option to print |
... |
not used |
Details
Cholesky stochastic volatility modeling for VHAR based on
\Sigma_t = L^T D_t^{-1} L
Value
bvhar_sv()
returns an object named bvharsv
class. It is a list with the following components:
- phi_record
MCMC trace for vectorized coefficients (
\phi
) with posterior::draws_df format.- h_record
MCMC trace for log-volatilities.
- a_record
MCMC trace for contemporaneous coefficients.
- h0_record
MCMC trace for initial log-volatilities.
- sigh_record
MCMC trace for log-volatilities variance.
- coefficients
Posterior mean of coefficients.
- chol_posterior
Posterior mean of contemporaneous effects.
- pip
Posterior inclusion probabilities.
- param
Every set of MCMC trace.
- group
Indicators for group.
- df
Numer of Coefficients:
3m + 1
or3m
- p
3 (The number of terms. It contains this element for usage in other functions.)
- week
Order for weekly term
- month
Order for monthly term
- 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.
"VHAR_SSVS_SV",
"VHAR_Horseshoe_SV", or"VHAR_minnesota-part_SV"} \item{type}{include constant term (
"const") or not (
"none"')- spec
Coefficients prior specification
- sv
log volatility prior specification
- chain
The numer of chains
- iter
Total iterations
- burn
Burn-in
- thin
Thinning
- HARtrans
VHAR linear transformation matrix
- y0
Y_0
- design
X_0
- y
Raw input
Different members are added according to priors. If it is SSVS:
- gamma_record
MCMC trace for dummy variable.
Horseshoe:
- lambda_record
MCMC trace for local shrinkage level.
- tau_record
MCMC trace for global shrinkage level.
- kappa_record
MCMC trace for shrinkage factor.
References
Kim, Y. G., and Baek, C. (2023+). Bayesian vector heterogeneous autoregressive modeling. Journal of Statistical Computation and Simulation.
Kim, Y. G., and Baek, C. (n.d.). Working paper.