choose_bvar {bvhar} | R Documentation |
Finding the Set of Hyperparameters of Individual Bayesian Model
Description
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), ...)
## S3 method for class 'bvharemp'
knit_print(x, ...)
Arguments
bayes_spec |
Initial Bayes model specification. |
lower |
|
upper |
|
... |
not used |
eps |
Hyperparameter |
y |
Time series data |
p |
BVAR lag |
include_mean |
Add constant term (Default: |
parallel |
List the same argument of |
har |
Numeric vector for weekly and monthly order. By default, |
x |
|
digits |
digit option to print |
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.
Value
bvharemp
class is a list that has
chosen
bvharspec
setBayesian model fit result with chosen specification
- ...
Many components of
stats::optim()
oroptimParallel::optimParallel()
- spec
Corresponding
bvharspec
- fit
Chosen Bayesian model
- ml
Marginal likelihood of the final model
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. (2023+). Bayesian vector heterogeneous autoregressive modeling. Journal of Statistical Computation and Simulation.