Skip to contents

Instead of these functions, you can use choose_bayes().

Usage

choose_bvar(
  bayes_spec = set_bvar(),
  lower = 0.01,
  upper = 10,
  ...,
  eps = 1e-04,
  y,
  p,
  include_mean = TRUE,
  parallel = list()
)

choose_bvhar(
  bayes_spec = set_bvhar(),
  lower = 0.01,
  upper = 10,
  ...,
  eps = 1e-04,
  y,
  har = c(5, 22),
  include_mean = TRUE,
  parallel = list()
)

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

is.bvharemp(x)

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

Arguments

bayes_spec

Initial Bayes model specification.

lower

[Experimental] Lower bound. By default, .01.

upper

[Experimental] Upper bound. By default, 10.

...

not used

eps

Hyperparameter eps is fixed. By default, 1e-04.

y

Time series data

p

BVAR lag

include_mean

Add constant term (Default: TRUE) or not (FALSE)

parallel

List the same argument of optimParallel::optimParallel(). By default, this is empty, and the function does not execute parallel computation.

har

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

x

bvharemp object

digits

digit option to print

Value

bvharemp class is a list that has

Details

Empirical Bayes method maximizes marginal likelihood and selects the set of hyperparameters. These functions implement L-BFGS-B method of stats::optim() to find the maximum of marginal likelihood.

If you want to set lower and upper option more carefully, deal with them like as in stats::optim() in order of set_bvar(), set_bvhar(), or set_weight_bvhar()'s argument (except eps). In other words, just arrange them in a vector.

References

Byrd, R. H., Lu, P., Nocedal, J., & Zhu, C. (1995). A limited memory algorithm for bound constrained optimization. SIAM Journal on scientific computing, 16(5), 1190-1208.

Gelman, A., Carlin, J. B., Stern, H. S., & Rubin, D. B. (2013). Bayesian data analysis. Chapman and Hall/CRC.

Giannone, D., Lenza, M., & Primiceri, G. E. (2015). Prior Selection for Vector Autoregressions. Review of Economics and Statistics, 97(2).

Kim, Y. G., and Baek, C. (2024). Bayesian vector heterogeneous autoregressive modeling. Journal of Statistical Computation and Simulation, 94(6), 1139-1157.