Package: bvhar 2.4.1

bvhar: Bayesian Vector Heterogeneous Autoregressive Modeling
Tools to model and forecast multivariate time series including Bayesian Vector heterogeneous autoregressive (VHAR) model by Kim & Baek (2023) (<doi:10.1080/00949655.2023.2281644>). 'bvhar' can model Vector Autoregressive (VAR), VHAR, Bayesian VAR (BVAR), and Bayesian VHAR (BVHAR) models.
Authors:
bvhar_2.4.1.tar.gz
bvhar_2.4.1.tar.gz(r-4.7-arm64)bvhar_2.4.1.tar.gz(r-4.7-x86_64)bvhar_2.4.1.tar.gz(r-4.6-arm64)bvhar_2.4.1.tar.gz(r-4.6-x86_64)
bvhar_2.4.1.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
card.svg |card.png
bvhar/json (API)
NEWS
| # Install 'bvhar' in R: |
| install.packages('bvhar', repos = c('https://cran.r-universe.dev', 'https://cloud.r-project.org')) |
Bug tracker:https://github.com/ygeunkim/bvhar/issues
Pkgdown/docs site:https://bvhar.baeconverse.org
- etf_vix - CBOE ETF Volatility Index Dataset
Last updated from:5b77f68ffe. Checks:6 OK. Indexed: no.
| Target | Result | Time | Files | Syslog |
|---|---|---|---|---|
| linux-devel-arm64 | OK | 346 | ||
| linux-devel-x86_64 | OK | 375 | ||
| source / vignettes | OK | 564 | ||
| linux-release-arm64 | OK | 397 | ||
| linux-release-x86_64 | OK | 315 | ||
| wasm-release | OK | 244 |
Exports:alplautolayerautoplotbound_bvharbvar_flatbvar_minnesotabvhar_minnesotachoose_bayeschoose_bvarchoose_bvharchoose_varcompute_diccompute_logmlconf_fdrconf_fnrconf_fscoreconf_precconf_recallconfusiondivide_tsdynamic_spilloverforecast_expandforecast_rollFPEfromsegeom_evalgg_lossHQirfis.boundbvharempis.bvarflatis.bvarmnis.bvharcvis.bvharempis.bvharirfis.bvharmnis.bvharmodis.bvharpriorspecis.bvharspecis.covspecis.dlspecis.gdpspecis.horseshoespecis.interceptspecis.ldltspecis.ngspecis.predbvharis.ssvsinputis.stableis.svspecis.varlseis.vharlsemaemapemasemraemserelmaerelspnermafermapermasermsfeset_bvarset_bvar_flatset_bvharset_dlset_factorset_gdpset_horseshoeset_interceptset_lambdaset_ldltset_ngset_psiset_ssvsset_svset_weight_bvharsim_iwsim_matgaussiansim_mncoefsim_mniwsim_mnormalsim_mnvhar_coefsim_mvtsim_varsim_vharspilloverspnestablerootvar_bayesvar_lmVARtoVMAvhar_bayesvhar_lmVHARtoVMA
Dependencies:abindbackportsbayesplotBHcheckmateclicodetoolscpp11distributionaldplyrfarverforeachgenericsggplot2ggridgesgluegtableisobanditeratorslabelinglifecyclemagrittrmatrixStatsnumDerivoptimParallelpillarpkgconfigplyrposteriorpurrrR6RColorBrewerRcppRcppEigenRcppNumericalRcppSpdlogRcppThreadreshape2rlangS7scalesstringistringrtensorAtibbletidyrtidyselectutf8vctrsviridisLitewithr
Bayesian VAR and VHAR Models
Rendered fromshrinkage.Rmdusingknitr::rmarkdownon Jun 05 2026.Last update: 2025-06-25
Started: 2023-12-19
Introduction to bvhar
Rendered frombvhar.Rmdusingknitr::rmarkdownon Jun 05 2026.Last update: 2025-06-25
Started: 2023-11-08
Minnesota Prior
Rendered fromminnesota.Rmdusingknitr::rmarkdownon Jun 05 2026.Last update: 2024-09-17
Started: 2023-11-08
Stochastic Volatility Models
Rendered fromstochastic-volatility.Rmdusingknitr::rmarkdownon Jun 05 2026.Last update: 2025-06-25
Started: 2024-09-17
Readme and manuals
Help Manual
| Help page | Topics |
|---|---|
| Evaluate the Density Forecast Based on Average Log Predictive Likelihood (APLP) | alpl alpl.bvharcv |
| Dynamic Spillover Indices Plot | autoplot.bvhardynsp |
| Plot Impulse Responses | autoplot.bvharirf |
| Plot the Result of BVAR and BVHAR MCMC | autoplot.bvharsp |
| Residual Plot for Minnesota Prior VAR Model | autoplot.normaliw |
| Plot Forecast Result | autolayer.predbvhar autoplot.predbvhar |
| Plot the Heatmap of SSVS Coefficients | autoplot.summary.bvharsp |
| Density Plot for Minnesota Prior VAR Model | autoplot.summary.normaliw |
| Setting Empirical Bayes Optimization Bounds | bound_bvhar is.boundbvharemp knit_print.boundbvharemp print.boundbvharemp |
| Fitting Bayesian VAR(p) of Flat Prior | AIC.bvarflat BIC.bvarflat bvar_flat is.bvarflat knit_print.bvarflat logLik.bvarflat print.bvarflat |
| Fitting Bayesian VAR(p) of Minnesota Prior | AIC.bvarmn BIC.bvarmn bvar_minnesota is.bvarmn knit_print.bvarhm knit_print.bvarmn logLik.bvarmn print.bvarhm print.bvarmn |
| Fitting Bayesian VHAR of Minnesota Prior | AIC.bvharmn BIC.bvharmn bvhar_minnesota is.bvharmn knit_print.bvharhm knit_print.bvharmn logLik.bvharmn print.bvharhm print.bvharmn |
| Finding the Set of Hyperparameters of Bayesian Model | choose_bayes |
| Finding the Set of Hyperparameters of Individual Bayesian Model | choose_bvar choose_bvhar is.bvharemp knit_print.bvharemp print.bvharemp |
| Choose the Best VAR based on Information Criteria | choose_var |
| Coefficient Matrix of Multivariate Time Series Models | coef coef.bvarflat coef.bvarmn coef.bvharmn coef.bvharsp coef.summary.bvharsp coef.varlse coef.vharlse |
| Deviance Information Criterion of Multivariate Time Series Model | compute_dic compute_dic.bvarmn |
| Extracting Log of Marginal Likelihood | compute_logml compute_logml.bvarmn compute_logml.bvharmn |
| Evaluate the Sparsity Estimation Based on FDR | conf_fdr conf_fdr.summary.bvharsp |
| Evaluate the Sparsity Estimation Based on FNR | conf_fnr conf_fnr.summary.bvharsp |
| Evaluate the Sparsity Estimation Based on F1 Score | conf_fscore conf_fscore.summary.bvharsp |
| Evaluate the Sparsity Estimation Based on Precision | conf_prec conf_prec.summary.bvharsp |
| Evaluate the Sparsity Estimation Based on Recall | conf_recall conf_recall.summary.bvharsp |
| Evaluate the Sparsity Estimation Based on Confusion Matrix | confusion confusion.summary.bvharsp |
| Split a Time Series Dataset into Train-Test Set | divide_ts |
| Dynamic Spillover | dynamic_spillover dynamic_spillover.ldltmod dynamic_spillover.normaliw dynamic_spillover.olsmod dynamic_spillover.svmod knit_print.bvhardynsp print.bvhardynsp |
| CBOE ETF Volatility Index Dataset | etf_vix |
| Fitted Matrix from Multivariate Time Series Models | fitted fitted.bvarflat fitted.bvarmn fitted.bvharmn fitted.varlse fitted.vharlse |
| Out-of-sample Forecasting based on Expanding Window | forecast_expand forecast_expand.ldltmod forecast_expand.normaliw forecast_expand.olsmod forecast_expand.svmod |
| Out-of-sample Forecasting based on Rolling Window | forecast_roll forecast_roll.ldltmod forecast_roll.normaliw forecast_roll.olsmod forecast_roll.svmod is.bvharcv knit_print.bvharcv print.bvharcv |
| Final Prediction Error Criterion | FPE FPE.varlse FPE.vharlse |
| Evaluate the Estimation Based on Frobenius Norm | fromse fromse.bvharsp |
| Adding Test Data Layer | geom_eval |
| Compare Lists of Models | gg_loss |
| Hannan-Quinn Criterion | HQ HQ.bvarflat HQ.bvarmn HQ.bvharmn HQ.logLik HQ.varlse HQ.vharlse |
| Impulse Response Analysis | irf irf.bvarldlt irf.bvharldlt irf.varlse irf.vharlse is.bvharirf knit_print.bvharirf print.bvharirf |
| Stability of the process | is.stable is.stable.bvarflat is.stable.bvarmn is.stable.bvharmn is.stable.varlse is.stable.vharlse |
| Evaluate the Model Based on MAE (Mean Absolute Error) | mae mae.bvharcv mae.predbvhar |
| Evaluate the Model Based on MAPE (Mean Absolute Percentage Error) | mape mape.bvharcv mape.predbvhar |
| Evaluate the Model Based on MASE (Mean Absolute Scaled Error) | mase mase.bvharcv mase.predbvhar |
| Evaluate the Model Based on MRAE (Mean Relative Absolute Error) | mrae mrae.bvharcv mrae.predbvhar |
| Evaluate the Model Based on MSE (Mean Square Error) | mse mse.bvharcv mse.predbvhar |
| Forecasting Multivariate Time Series | is.predbvhar knit_print.predbvhar predict predict.bvarflat predict.bvarldlt predict.bvarmn predict.bvarsv predict.bvharldlt predict.bvharmn predict.bvharsv predict.varlse predict.vharlse print.predbvhar |
| Summarizing BVAR and BVHAR with Shrinkage Priors | knit_print.summary.bvharsp print.summary.bvharsp summary.bvharsp summary.hsmod summary.ngmod summary.ssvsmod |
| Evaluate the Model Based on RelMAE (Relative MAE) | relmae relmae.bvharcv relmae.predbvhar |
| Evaluate the Estimation Based on Relative Spectral Norm Error | relspne relspne.bvharsp |
| Residual Matrix from Multivariate Time Series Models | residuals residuals.bvarflat residuals.bvarmn residuals.bvharmn residuals.varlse residuals.vharlse |
| Evaluate the Model Based on RMAFE | rmafe rmafe.bvharcv rmafe.predbvhar |
| Evaluate the Model Based on RMAPE (Relative MAPE) | rmape rmape.bvharcv rmape.predbvhar |
| Evaluate the Model Based on RMASE (Relative MASE) | rmase rmase.bvharcv rmase.predbvhar |
| Evaluate the Model Based on RMSFE | rmsfe rmsfe.bvharcv rmsfe.predbvhar |
| Hyperparameters for Bayesian Models | is.bvharspec knit_print.bvharspec print.bvharspec set_bvar set_bvar_flat set_bvhar set_weight_bvhar |
| Dirichlet-Laplace Hyperparameter for Coefficients and Contemporaneous Coefficients | is.dlspec print.dlspec set_dl |
| Factor Specification | set_factor |
| Generalized Double Pareto Shrinkage Hyperparameters for Coefficients and Contemporaneous Coefficients | is.gdpspec set_gdp |
| Horseshoe Prior Specification | is.horseshoespec knit_print.horseshoespec print.horseshoespec set_horseshoe |
| Prior for Constant Term | is.interceptspec knit_print.interceptspec print.interceptspec set_intercept |
| Hyperpriors for Bayesian Models | is.bvharpriorspec knit_print.bvharpriorspec print.bvharpriorspec set_lambda set_psi |
| Covariance Matrix Prior Specification | is.covspec is.ldltspec is.svspec print.covspec set_ldlt set_sv |
| Normal-Gamma Hyperparameter for Coefficients and Contemporaneous Coefficients | is.ngspec print.ngspec set_ng |
| Stochastic Search Variable Selection (SSVS) Hyperparameter for Coefficients Matrix and Cholesky Factor | is.ssvsinput knit_print.ssvsinput print.ssvsinput set_ssvs |
| Generate Inverse-Wishart Random Matrix | sim_iw |
| Generate Matrix Normal Random Matrix | sim_matgaussian |
| Generate Minnesota BVAR Parameters | sim_mncoef |
| Generate Normal-IW Random Family | sim_mniw |
| Generate Multivariate Normal Random Vector | sim_mnormal |
| Generate Minnesota BVAR Parameters | sim_mnvhar_coef |
| Generate Multivariate t Random Vector | sim_mvt |
| Generate Multivariate Time Series Process Following VAR(p) | sim_var |
| Generate Multivariate Time Series Process Following VAR(p) | sim_vhar |
| h-step ahead Normalized Spillover | knit_print.bvharspillover print.bvharspillover spillover spillover.bvarldlt spillover.bvharldlt spillover.normaliw spillover.olsmod |
| Evaluate the Estimation Based on Spectral Norm Error | spne spne.bvharsp |
| Roots of characteristic polynomial | stableroot stableroot.bvarflat stableroot.bvarmn stableroot.bvharmn stableroot.varlse stableroot.vharlse |
| Summarizing Bayesian Multivariate Time Series Model | knit_print.summary.normaliw print.summary.normaliw summary.normaliw |
| Summarizing Vector Autoregressive Model | knit_print.summary.varlse print.summary.varlse summary.varlse |
| Summarizing Vector HAR Model | knit_print.summary.vharlse print.summary.vharlse summary.vharlse |
| Fitting Bayesian VAR with Coefficient and Covariance Prior | knit_print.bvarldlt knit_print.bvarsv print.bvarldlt print.bvarsv var_bayes |
| Fitting Vector Autoregressive Model of Order p Model | AIC.varlse BIC.varlse is.bvharmod is.varlse knit_print.varlse logLik.varlse print.varlse var_lm |
| Convert VAR to VMA(infinite) | VARtoVMA |
| Fitting Bayesian VHAR with Coefficient and Covariance Prior | knit_print.bvharldlt knit_print.bvharsv print.bvharldlt print.bvharsv vhar_bayes |
| Fitting Vector Heterogeneous Autoregressive Model | AIC.vharlse BIC.vharlse is.vharlse knit_print.vharlse logLik.vharlse print.vharlse vhar_lm |
| Convert VHAR to VMA(infinite) | VHARtoVMA |
