Fitting Bayesian VAR(p) of Horseshoe Prior
Source:R/bvar-horseshoe.R
, R/print-bvharsp.R
bvar_horseshoe.Rd
Usage
bvar_horseshoe(
y,
p,
num_chains = 1,
num_iter = 1000,
num_burn = floor(num_iter/2),
thinning = 1,
bayes_spec = set_horseshoe(),
include_mean = TRUE,
minnesota = FALSE,
algo = c("block", "gibbs"),
verbose = FALSE,
num_thread = 1
)
# S3 method for class 'bvarhs'
print(x, digits = max(3L, getOption("digits") - 3L), ...)
# S3 method for class 'bvarhs'
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
Horseshoe initialization specification by
set_horseshoe()
.- include_mean
Add constant term (Default:
TRUE
) or not (FALSE
)- minnesota
Minnesota type
- algo
Ordinary gibbs sampling (
gibbs
) or blocked gibbs (Default:block
).- verbose
Print the progress bar in the console. By default,
FALSE
.- num_thread
- x
bvarhs
object- digits
digit option to print
- ...
not used
Value
bvar_horseshoe
returns an object named bvarhs
class.
It is a list with the following components:
- coefficients
Posterior mean of VAR coefficients.
- covmat
Posterior mean of covariance matrix
- psi_posterior
Posterior mean of precision matrix \(\Psi\)
- pip
Posterior inclusion probabilities.
- param
posterior::draws_df with every variable: alpha, lambda, tau, omega, and eta
- 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_Horseshoe
- type
include constant term (
const
) or not (none
)- algo
Usual Gibbs sampling (
gibbs
) or fast sampling (fast
)- spec
Horseshoe specification defined by
set_horseshoe()
- 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