bvhar_horseshoe {bvhar}R Documentation

Fitting Bayesian VHAR of Horseshoe Prior

Description

[Experimental] This function fits VHAR with horseshoe prior.

Usage

bvhar_horseshoe(
  y,
  har = c(5, 22),
  num_chains = 1,
  num_iter = 1000,
  num_burn = floor(num_iter/2),
  thinning = 1,
  bayes_spec = set_horseshoe(),
  include_mean = TRUE,
  minnesota = c("no", "short", "longrun"),
  algo = c("block", "gibbs"),
  verbose = FALSE,
  num_thread = 1
)

## S3 method for class 'bvharhs'
print(x, digits = max(3L, getOption("digits") - 3L), ...)

## S3 method for class 'bvharhs'
knit_print(x, ...)

Arguments

y

Time series data of which columns indicate the variables

har

Numeric vector for weekly and monthly order. By default, c(5, 22).

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

[Experimental] Number of threads

x

bvharhs object

digits

digit option to print

...

not used

Value

bvhar_horseshoe returns an object named bvarhs class. It is a list with the following components:

phi_record

MCMC trace for vectorized coefficients (alpha \phi) with posterior::draws_df format.

lambda_record

MCMC trace for local shrinkage level (lambda \lambda) with posterior::draws_df format.

tau_record

MCMC trace for global shrinkage level (tau \tau) with posterior::draws_df format.

psi_record

MCMC trace for precision matrix (psi \Psi) with list format.

chain

The numer of chains

coefficients

Posterior mean of VHAR coefficients.

psi_posterior

Posterior mean of precision matrix \Psi

covmat

Posterior mean of covariance matrix

omega_record

MCMC trace for diagonal element of \Psi (omega) with posterior::draws_df format.

eta_record

MCMC trace for upper triangular element of \Psi (eta) with posterior::draws_df format.

param

posterior::draws_df with every variable: alpha, lambda, tau, omega, and eta

df

Numer of Coefficients: ⁠3m + 1⁠ or ⁠3m⁠

p

3 (The number of terms. It contains this element for usage in other functions.)

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_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()

iter

Total iterations

burn

Burn-in

thin

Thinning

HARtrans

VHAR linear transformation matrix

y0

Y_0

design

X_0

y

Raw input

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.


[Package bvhar version 2.0.1 Index]