This package provides public C++ headers. Some might be implement these useful.
bvharsim.h
: Rcpp random generation functions that are
widely used in Bayesian statistics.ols.h
: OLS classes and structsminnesota.h
: Minnesota prior classes and structsmcmcsv.h
: Classes and structs for stochastic volatility
models. It includes
mcmchs.h
: Horseshoe prior classesmcmcssvs.h
: SSVS prior classesolsforecaster.h
: Forecasting class for each VAR and
VHARminnforecaster.h
: Minnesota prior forecaster
classessvforecaster.h
: SV models forecaster classesolsspillover.h
: FEVD and spillover class for each VAR
and VHARminnspillover.h
: FEVD and spillover class for Minnesota
priorsvspillover.h
: FEVD and spillover class for SV
modelsbvharprogress.h
: Simple progress bar classesbvharinterrupt.h
: Interruption handler classesYou can use these by writing in your R package DESCRIPTION:
LinkingTo:
BH,
Rcpp,
RcppEigen,
bvhar
Also, you can use in your single C++
source:
// [[Rcpp::depends(BH, RcppEigen, bvhar)]]
// [[Rcpp::plugins(bvhar)]]
You need to add plugins
attribute because the header in
this package should define USE_RCPP
macro. Or you can use
instead:
without using plugins attribute.
mcmc*.h
has classes that can conduct MCMC. Since it is
designed thread-safe, you can OpenMP for parallel multiple chain
loop.
std::unique_ptr
)
doPosteriorDraws()
updates MCMC draws, so use this
inside loop.returnRecords(burn, thin)
returns
Rcpp::List
of every MCMC record.In case of SV model, you can define your own prior by defining a derived class.