Package: APRScenario 0.0.3.1

Giovanni Lombardo

APRScenario: Structural Scenario Analysis for Bayesian Structural Vector Autoregression Models

Implements the scenario analysis proposed by Antolin-Diaz, Petrella and Rubio-Ramirez (2021) "Structural scenario analysis with SVARs" <doi:10.1016/j.jmoneco.2020.06.001>.

Authors:Giovanni Lombardo [aut, cre]

APRScenario_0.0.3.1.tar.gz
APRScenario_0.0.3.1.tar.gz(r-4.7-arm64)APRScenario_0.0.3.1.tar.gz(r-4.7-x86_64)APRScenario_0.0.3.1.tar.gz(r-4.6-arm64)APRScenario_0.0.3.1.tar.gz(r-4.6-x86_64)
APRScenario_0.0.3.1.tgz(r-4.6-emscripten)
manual.pdf |manual.html
card.svg |card.png
APRScenario/json (API)

# Install 'APRScenario' in R:
install.packages('APRScenario', repos = c('https://cran.r-universe.dev', 'https://cloud.r-project.org'))
Uses libs:
  • openblas– Optimized BLAS
  • c++– GNU Standard C++ Library v3
Datasets:
  • NKdata - Example Dataset NKdata

On CRAN:

Conda:

This package does not link to any Github/Gitlab/R-forge repository. No issue tracker or development information is available.

openblascpp

3.00 score 1 stars 10 scripts 481 downloads 12 exports 41 dependencies

Last updated from:b7b090f94d. Checks:6 OK. Indexed: no.

TargetResultTimeFilesSyslog
linux-devel-arm64OK184
linux-devel-x86_64OK191
source / vignettesOK254
linux-release-arm64OK179
linux-release-x86_64OK197
wasm-releaseOK163

Exports:big_b_and_Mforc_hfull_scenarios_coregen_matsKLmat_forcplot_bvarsplot_cond_forcplot_cond_histoscenariosSimScensimulate_conditional_forecasts

Dependencies:abindclicpp11dplyrfarvergenericsggplot2glueGPArotationgtableisobandlabelinglatticelifecyclelubridatemagrittrMASSmnormtnlmepillarpkgconfigpsychpurrrR6RColorBrewerRcppRcppArmadilloRcppProgressrlangS7scalesstringistringrtibbletidyrtidyselecttimechangeutf8vctrsviridisLitewithr

APRScenario vignette

Rendered fromAPRScenario.Rmdusingknitr::rmarkdownon Jun 19 2026.

Last update: 2025-12-21
Started: 2025-07-24

Readme and manuals

Help Manual

Help pageTopics
big_b_and_M This function returns the extended b and M matrices as in APRbig_b_and_M
forc_h functionforc_h
Exported version of full_scenarios_corefull_scenarios_core
gen_mats functiongen_mats
KL function APR suggest this measure to assess the "plausibility" of the conditional forecast. It is based on the Kullback-Leibler measure of distance between the unconditional forecast and the conditional/scenario forecast.KL
mat_forc function ############################################################################## NB: HERE WE USE Antolin-Diaz et al notation # B is reduced form; # A is structural; # d is intercepts # M is reduced so that E(u_u')=Sigma=(A_0_A_0')^(-1) and M_0=A_0^(-1)*Q # Note that the code returns conflicting notation: # B=>A_0^(-1)*Q and # A=>B # ##############################################################################mat_forc
Example Dataset NKdataNKdata
plot_bvars: This function plots the IRFs generated with the BVARplot_bvars
plot_cond_forc function; Data should conatain the variable "variable", the "hor" horizon and a "history"plot_cond_forc
plot_cond_histo functionplot_cond_histo
scenarios function (fully optimized with Rcpp) This function computes the mean and covariances to draw from the conditional forecast The actual draw is done in the simscen functionscenarios
simscen function This function takes the mean and covariance of the conditional forecast to draw from the conditional forecast distribution The shock uncertainty is included in the simulation by default, but can be turned off.SimScen
Simulate paths from conditional forecast distributionssimulate_conditional_forecasts