diff --git a/.Rbuildignore b/.Rbuildignore index 50195e2..f0d545e 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -9,3 +9,8 @@ ^pkgdown$ ^cran-comments\.md$ ^CRAN-SUBMISSION$ +^vignettes/paper$ +^doc$ +^Meta$ +^vignettes/paper/bsvars\.Rmd$ +^vignettes/paper/bsvars\.knit\.md$ \ No newline at end of file diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index a3ac618..b62f021 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -43,7 +43,16 @@ jobs: with: extra-packages: any::rcmdcheck needs: check + - uses: r-lib/actions/setup-tinytex@v2 + - run: tlmgr --version + + - name: Install additional LaTeX packages + run: | + tlmgr update --self + tlmgr install pdfpages pdflscape + tlmgr list --only-installed - uses: r-lib/actions/check-r-package@v2 with: upload-snapshots: true + build_args: '"--compact-vignettes=gs+qpdf"' diff --git a/.gitignore b/.gitignore index 1d87a65..13b2a29 100644 --- a/.gitignore +++ b/.gitignore @@ -57,3 +57,5 @@ rsconnect/ .quarto *.so docs +/doc/ +/Meta/ diff --git a/DESCRIPTION b/DESCRIPTION index f8138ff..0c92bfb 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,11 +1,11 @@ Package: bsvarSIGNs Type: Package Title: Bayesian SVARs with Sign, Zero, and Narrative Restrictions -Version: 1.0.1.9000 -Date: 2024-08-10 +Version: 2.0 +Date: 2025-01-28 Authors@R: c(person("Xiaolei", "Wang", , "adamwang15@gmail.com", role = c("aut", "cre"), comment = c(ORCID = "0009-0005-6192-9061")),person("Tomasz", "Woźniak", , "wozniak.tom@pm.me", role = c("aut"), comment = c(ORCID = "0000-0003-2212-2378"))) Maintainer: Xiaolei Wang -Description: Implements state-of-the-art algorithms for the Bayesian analysis of Structural Vector Autoregressions (SVARs) identified by sign, zero, and narrative restrictions. The core model is based on a flexible Vector Autoregression with estimated hyper-parameters of the Minnesota prior and the dummy observation priors as in Giannone, Lenza, Primiceri (2015) . The sign restrictions are implemented employing the methods proposed by Rubio-Ramírez, Waggoner & Zha (2010) , while identification through sign and zero restrictions follows the approach developed by Arias, Rubio-Ramírez, & Waggoner (2018) . Furthermore, our tool provides algorithms for identification via sign and narrative restrictions, in line with the methods introduced by Antolín-Díaz and Rubio-Ramírez (2018) . Users can also estimate a model with sign, zero, and narrative restrictions imposed at once. The package facilitates predictive and structural analyses using impulse responses, forecast error variance and historical decompositions, forecasting and conditional forecasting, as well as analyses of structural shocks and fitted values. All this is complemented by colourful plots, user-friendly summary functions, and comprehensive documentation. The 'bsvarSIGNs' package is aligned regarding objects, workflows, and code structure with the R package 'bsvars' by Woźniak (2024) , and they constitute an integrated toolset. It was granted the Di Cook Open-Source Statistical Software Award by the Statistical Society of Australia in 2024. +Description: Implements state-of-the-art algorithms for the Bayesian analysis of Structural Vector Autoregressions (SVARs) identified by sign, zero, and narrative restrictions. The core model is based on a flexible Vector Autoregression with estimated hyper-parameters of the Minnesota prior and the dummy observation priors as in Giannone, Lenza, Primiceri (2015) . The sign restrictions are implemented employing the methods proposed by Rubio-Ramírez, Waggoner & Zha (2010) , while identification through sign and zero restrictions follows the approach developed by Arias, Rubio-Ramírez, & Waggoner (2018) . Furthermore, our tool provides algorithms for identification via sign and narrative restrictions, in line with the methods introduced by Antolín-Díaz and Rubio-Ramírez (2018) . Users can also estimate a model with sign, zero, and narrative restrictions imposed at once. The package facilitates predictive and structural analyses using impulse responses, forecast error variance and historical decompositions, forecasting and conditional forecasting, as well as analyses of structural shocks and fitted values. All this is complemented by colourful plots, user-friendly summary functions, and comprehensive documentation including the vignette by Wang & Woźniak (2024) . The 'bsvarSIGNs' package is aligned regarding objects, workflows, and code structure with the R package 'bsvars' by Woźniak (2024) , and they constitute an integrated toolset. It was granted the Di Cook Open-Source Statistical Software Award by the Statistical Society of Australia in 2024. License: GPL (>= 3) Imports: Rcpp (>= 1.0.12), @@ -20,9 +20,12 @@ Depends: R (>= 2.10), RcppArmadillo, bsvars -Suggests: tinytest -URL: https://bsvars.github.io/bsvarSIGNs/ +Suggests: + knitr, + tinytest +URL: https://bsvars.org/bsvarSIGNs/ BugReports: https://github.com/bsvars/bsvarSIGNs/issues Encoding: UTF-8 LazyData: true +VignetteBuilder: knitr RoxygenNote: 7.3.2 diff --git a/NEWS.md b/NEWS.md index cb66231..1ab6369 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,6 +1,7 @@ -# bsvarSIGNs (development version) +# bsvarSIGNs 2.0 -1. Fixing C++ code to avoid problems with future check [#59](https://github.com/bsvars/bsvarSIGNs/issues/59) +1. The package has a [vignette](https://doi.org/10.48550/arXiv.2501.16711) now! ...and better citation information [#53](https://github.com/bsvars/bsvarSIGNs/issues/53) +2. Fixing C++ code to avoid problems with future check [#59](https://github.com/bsvars/bsvarSIGNs/issues/59) # bsvarSIGNs 1.0.1 diff --git a/README.Rmd b/README.Rmd index 8f73adc..abf9306 100644 --- a/README.Rmd +++ b/README.Rmd @@ -25,14 +25,19 @@ An **R** package for Bayesian Estimation of Structural Vector Autoregressions Id [![R-CMD-check](https://github.com/bsvars/bsvarSIGNs/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/bsvars/bsvarSIGNs/actions/workflows/R-CMD-check.yaml) -Implements state-of-the-art algorithms for the Bayesian analysis of Structural Vector Autoregressions identified by sign, zero, and narrative restrictions. The core model is based on a flexible Vector Autoregression with estimated hyper-parameters of the Minnesota prior and the dummy observation priors as in [Giannone, Lenza, Primiceri (2015)](http://doi.org/10.1162/REST_a_00483). The sign restrictions are implemented employing the methods proposed by [Rubio-Ramírez, Waggoner & Zha (2010)](http://doi.org/10.1111/j.1467-937X.2009.00578.x), while identification through sign and zero restrictions follows the approach developed by [Arias, Rubio-Ramírez, & Waggoner (2018)](http://doi.org/10.3982/ECTA14468). Furthermore, our tool provides algorithms for identification via sign and narrative restrictions, in line with the methods introduced by [Antolín-Díaz and Rubio-Ramírez (2018)](http://doi.org/10.1257/aer.20161852). Users can also estimate a model with sign, zero, and narrative restrictions imposed at once. The package facilitates predictive and structural analyses using impulse responses, forecast error variance and historical decompositions, forecasting and conditional forecasting, as well as analyses of structural shocks and fitted values. All this is complemented by colourful plots, user-friendly summary functions, and comprehensive documentation. The **bsvarSIGNs** package is aligned regarding objects, workflows, and code structure with the **R** package **bsvars** by [Woźniak (2024)](http://doi.org/10.32614/CRAN.package.bsvars), and they constitute an integrated toolset. It was granted the Di Cook Open-Source Statistical Software Award by the Statistical Society of Australia in 2024. +Implements state-of-the-art algorithms for the Bayesian analysis of Structural Vector Autoregressions identified by sign, zero, and narrative restrictions. The core model is based on a flexible Vector Autoregression with estimated hyper-parameters of the Minnesota prior and the dummy observation priors as in [Giannone, Lenza, Primiceri (2015)](http://doi.org/10.1162/REST_a_00483). The sign restrictions are implemented employing the methods proposed by [Rubio-Ramírez, Waggoner & Zha (2010)](http://doi.org/10.1111/j.1467-937X.2009.00578.x), while identification through sign and zero restrictions follows the approach developed by [Arias, Rubio-Ramírez, Waggoner (2018)](http://doi.org/10.3982/ECTA14468). Furthermore, our tool provides algorithms for identification via sign and narrative restrictions, in line with the methods introduced by [Antolín-Díaz & Rubio-Ramírez (2018)](http://doi.org/10.1257/aer.20161852). Users can also estimate a model with sign, zero, and narrative restrictions imposed at once. The package facilitates predictive and structural analyses using impulse responses, forecast error variance and historical decompositions, forecasting and conditional forecasting, as well as analyses of structural shocks and fitted values. All this is complemented by colourful plots, user-friendly summary functions, and comprehensive documentation including the vignette by [Wang & Woźniak (2024)](https://doi.org/10.48550/arXiv.2501.16711). The **bsvarSIGNs** package is aligned regarding objects, workflows, and code structure with the **R** package **bsvars** by [Woźniak (2024)](http://doi.org/10.32614/CRAN.package.bsvars), and they constitute an integrated toolset. It was granted the Di Cook Open-Source Statistical Software Award by the Statistical Society of Australia in 2024. - + + - + +bsvars.org website +bsvars website +bsvarSIGNs website + ## Features @@ -89,6 +94,22 @@ This beautiful logo can be reproduced in R using [this file](https://github.com/

+## Resources + +- a vignette by [Wang & Woźniak (2025)](https://doi.org/10.48550/arXiv.2501.16711) +- a [reference manual](https://cran.r-project.org/web/packages/bsvarSIGNs/bsvarSIGNs.pdf) +- a website of the family of packages [bsvars.org](https://bsvars.org/) +- **bsvarSIGNs** on [CRAN](https://cran.r-project.org/package=bsvarSIGNs) +- presentations: + - for students at [Szkoła Główna Handlowa](https://www.sgh.waw.pl/) given in Warsaw in December 2024 [featuring **bsvars** 3.2 and **bsvarSIGNs** 1.0.1](https://bsvars.org/2024-12-sgh/)] + - at [Uniwersytet Warszawski](https://www.wne.uw.edu.pl/) given in Warsaw in December 2024 [featuring **bsvars** 3.2 and **bsvarSIGNs** 1.0.1](https://bsvars.org/2024-12-uwwne/) + - for students and researchers at [Uniwersytet Ekonomiczny w Krakowie](https://uek.krakow.pl/) given in Cracow in December 2024 [featuring **bsvars** 3.2 and **bsvarSIGNs** 1.0.1](https://bsvars.org/2024-12-uek/) + - a [youtube recording](https://youtu.be/QT02OTZWW14)] for [[Forecasting for Social Good](https://www.f4sg.org/) + - for [Forecasting for Social Good](https://www.f4sg.org/) given online in December 2024 [featuring **bsvars** 3.2 and **bsvarSIGNs** 1.0.1](https://bsvars.org/2024-12-F4SG/)] + - for Bayesian Econometrics students at the University of Melbourne given in October 2024 [featuring **bsvarSIGNs** 1.0.1](https://bsvars.org/2024-10-be24-bsvarSIGNs/) + - for the [QuantEcon](https://quantecon.org/) lab at the Australian National University given in August 2024 [featuring **bsvars** 3.1 and **bsvarSIGNs** 1.0.1](https://bsvars.org/2024-08-bsvars-QuantEcon/) + - at Monash University given in August 2024 [featuring **bsvars** 3.1 and **bsvarSIGNs** 1.0](https://bsvars.org/2024-08-bsvars-monash/) + ## Examples Replication of the results by [Arias, Rubio-Ramírez, & Waggoner (2018)](http://doi.org/10.3982/ECTA14468). @@ -184,7 +205,7 @@ The package is under intensive development. Your help is most welcome! Please, h - - - - + + + + diff --git a/README.md b/README.md index f99351c..2919d5e 100644 --- a/README.md +++ b/README.md @@ -24,10 +24,10 @@ and the dummy observation priors as in [Giannone, Lenza, Primiceri implemented employing the methods proposed by [Rubio-Ramírez, Waggoner & Zha (2010)](http://doi.org/10.1111/j.1467-937X.2009.00578.x), while identification through sign and zero restrictions follows the approach -developed by [Arias, Rubio-Ramírez, & Waggoner +developed by [Arias, Rubio-Ramírez, Waggoner (2018)](http://doi.org/10.3982/ECTA14468). Furthermore, our tool provides algorithms for identification via sign and narrative -restrictions, in line with the methods introduced by [Antolín-Díaz and +restrictions, in line with the methods introduced by [Antolín-Díaz & Rubio-Ramírez (2018)](http://doi.org/10.1257/aer.20161852). Users can also estimate a model with sign, zero, and narrative restrictions imposed at once. The package facilitates predictive and structural @@ -35,24 +35,31 @@ analyses using impulse responses, forecast error variance and historical decompositions, forecasting and conditional forecasting, as well as analyses of structural shocks and fitted values. All this is complemented by colourful plots, user-friendly summary functions, and -comprehensive documentation. The **bsvarSIGNs** package is aligned -regarding objects, workflows, and code structure with the **R** package -**bsvars** by [Woźniak +comprehensive documentation including the vignette by [Wang & Woźniak +(2024)](https://doi.org/10.48550/arXiv.2501.16711). The **bsvarSIGNs** +package is aligned regarding objects, workflows, and code structure with +the **R** package **bsvars** by [Woźniak (2024)](http://doi.org/10.32614/CRAN.package.bsvars), and they constitute an integrated toolset. It was granted the Di Cook Open-Source Statistical Software Award by the Statistical Society of Australia in 2024. - + + + - - + + +bsvars.org website +bsvars website +bsvarSIGNs website + ## Features #### Structural Vector Autoregressions @@ -130,6 +137,41 @@ file](https://github.com/donotdespair/naklejki/blob/master/bsvarSIGNs/bsvarSIGNs

+## Resources + +- a vignette by [Wang & Woźniak + (2025)](https://doi.org/10.48550/arXiv.2501.16711) +- a [reference + manual](https://cran.r-project.org/web/packages/bsvarSIGNs/bsvarSIGNs.pdf) +- a website of the family of packages [bsvars.org](https://bsvars.org/) +- **bsvarSIGNs** on + [CRAN](https://cran.r-project.org/package=bsvarSIGNs) +- presentations: + - for students at [Szkoła Główna Handlowa](https://www.sgh.waw.pl/) + given in Warsaw in December 2024 [featuring **bsvars** 3.2 and + **bsvarSIGNs** 1.0.1](https://bsvars.org/2024-12-sgh/)\] + - at [Uniwersytet Warszawski](https://www.wne.uw.edu.pl/) given in + Warsaw in December 2024 [featuring **bsvars** 3.2 and **bsvarSIGNs** + 1.0.1](https://bsvars.org/2024-12-uwwne/) + - for students and researchers at [Uniwersytet Ekonomiczny w + Krakowie](https://uek.krakow.pl/) given in Cracow in December 2024 + [featuring **bsvars** 3.2 and **bsvarSIGNs** + 1.0.1](https://bsvars.org/2024-12-uek/) + - a [youtube recording](https://youtu.be/QT02OTZWW14)\] for + \[[Forecasting for Social Good](https://www.f4sg.org/) + - for [Forecasting for Social Good](https://www.f4sg.org/) given + online in December 2024 [featuring **bsvars** 3.2 and **bsvarSIGNs** + 1.0.1](https://bsvars.org/2024-12-F4SG/)\] + - for Bayesian Econometrics students at the University of Melbourne + given in October 2024 [featuring **bsvarSIGNs** + 1.0.1](https://bsvars.org/2024-10-be24-bsvarSIGNs/) + - for the [QuantEcon](https://quantecon.org/) lab at the Australian + National University given in August 2024 [featuring **bsvars** 3.1 + and **bsvarSIGNs** + 1.0.1](https://bsvars.org/2024-08-bsvars-QuantEcon/) + - at Monash University given in August 2024 [featuring **bsvars** 3.1 + and **bsvarSIGNs** 1.0](https://bsvars.org/2024-08-bsvars-monash/) + ## Examples Replication of the results by [Arias, Rubio-Ramírez, & Waggoner @@ -250,11 +292,11 @@ macroeconomic analyses and programs in **R** and **cpp** using **Rcpp**. - + - + - + - + diff --git a/_pkgdown.yml b/_pkgdown.yml index c777490..fbd78c8 100644 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -1,4 +1,4 @@ -url: https://bsvars.github.io/bsvarSIGNs/ +url: https://bsvars.org/bsvarSIGNs/ template: bootstrap: 5 development: diff --git a/inst/CITATION b/inst/CITATION new file mode 100644 index 0000000..7c1c27e --- /dev/null +++ b/inst/CITATION @@ -0,0 +1,22 @@ + +bibentry(bibtype = "Manual", + header = "To cite the bsvarSIGNs package in publications please use:", + title = "bsvarSIGNs: Bayesian SVARs with Sign, Zero, and Narrative Restrictions", + author = c(person(given = "Xiaolei", family = "Wang", email = "adamwang15@gmail.com"),person(given = "Tomasz", family = "Woźniak", email = "wozniak.tom@pm.me")), + year = 2025, + note = "R package version 2.0", + url = "https://CRAN.R-project.org/package=bsvarSIGNs", + doi = "10.32614/CRAN.package.bsvarSIGNs", + textVersion = "Wang, Xiaolei and Woźniak, Tomasz (2025). bsvarSIGNs: Bayesian SVARs with Sign, Zero, and Narrative Restrictions. R package version 2.0, URL: https://cran.r-project.org/package=bsvarSIGNs, DOI: 10.32614/CRAN.package.bsvarSIGNs." +) + +bibentry(bibtype = "article", + header = "To cite the bsvarSIGNs package in publications please use:", + title = "Bayesian Analyses of Structural Vector Autoregressions with Sign, Zero, and Narrative Restrictions Using the R Package bsvarSIGNs", + author = c(person(given = "Xiaolei", family = "Wang", email = "adamwang15@gmail.com"),person(given = "Tomasz", family = "Woźniak", email = "wozniak.tom@pm.me")), + year = 2025, + journal = "University of Melbourne Working Paper", + pages = "1--21", + doi = "10.48550/arXiv.2501.16711", + textVersion = "Wang, Xiaolei and Woźniak, Tomasz (2025). Bayesian Analyses of Structural Vector Autoregressions with Sign, Zero, and Narrative Restrictions Using the R Package bsvarSIGNs, DOI: 10.48550/arXiv.2501.16711." +) diff --git a/vignettes/bsvarSIGNs_vignette.Rnw b/vignettes/bsvarSIGNs_vignette.Rnw new file mode 100644 index 0000000..76827e5 --- /dev/null +++ b/vignettes/bsvarSIGNs_vignette.Rnw @@ -0,0 +1,10 @@ +\documentclass{article} +\usepackage{pdfpages} +%\VignetteIndexEntry{Bayesian Analyses of Structural Vector Autoregressions with Sign, Zero, and Narrative Restrictions Using the R Package bsvarSIGNs} +%\VignetteKeywords{Bayesian inference, Structural VARs, Gibbs sampler, sign restrictions, zero restrictions, narrative restrictions, forecasting, structural analysis, R} +%\VignettePackage{bsvarSIGNs} +%\VignetteEncoding{UTF-8} +%\VignetteEngine{knitr::knitr} +\begin{document} +\includepdf[pages=-, fitpaper=true]{pdf/bsvarSIGNs.pdf} +\end{document} diff --git a/vignettes/pdf/bsvarSIGNs.pdf b/vignettes/pdf/bsvarSIGNs.pdf new file mode 100644 index 0000000..dd798f1 Binary files /dev/null and b/vignettes/pdf/bsvarSIGNs.pdf differ