diff --git a/404.html b/404.html index 71fbc5d..3add036 100644 --- a/404.html +++ b/404.html @@ -31,7 +31,7 @@ bayesianVARs - 0.1.1 + 0.1.0.9000 diff --git a/LICENSE.html b/LICENSE.html index ba7edc0..bd31220 100644 --- a/LICENSE.html +++ b/LICENSE.html @@ -10,7 +10,7 @@ bayesianVARs - 0.1.1 + 0.1.0.9000 diff --git a/articles/bayesianVARs-vignette.pdf b/articles/bayesianVARs-vignette.pdf index 04dceaa..ac5bbcb 100644 Binary files a/articles/bayesianVARs-vignette.pdf and b/articles/bayesianVARs-vignette.pdf differ diff --git a/articles/index.html b/articles/index.html index 604f542..5dc0b5d 100644 --- a/articles/index.html +++ b/articles/index.html @@ -10,7 +10,7 @@ bayesianVARs - 0.1.1 + 0.1.0.9000 diff --git a/authors.html b/authors.html index 0f5a8bc..5877db0 100644 --- a/authors.html +++ b/authors.html @@ -10,7 +10,7 @@ bayesianVARs - 0.1.1 + 0.1.0.9000 @@ -64,13 +64,13 @@ Citation Gruber L (2024). bayesianVARs: MCMC Estimation of Bayesian Vectorautoregressions. -R package version 0.1.1, https://luisgruber.github.io/bayesianVARs/, https://github.com/luisgruber/bayesianVARs. +R package version 0.1.0.9000, https://luisgruber.github.io/bayesianVARs/, https://github.com/luisgruber/bayesianVARs. @Manual{, title = {bayesianVARs: MCMC Estimation of Bayesian Vectorautoregressions}, author = {Luis Gruber}, year = {2024}, - note = {R package version 0.1.1, https://luisgruber.github.io/bayesianVARs/}, + note = {R package version 0.1.0.9000, https://luisgruber.github.io/bayesianVARs/}, url = {https://github.com/luisgruber/bayesianVARs}, } diff --git a/index.html b/index.html index 2f94652..fd9c521 100644 --- a/index.html +++ b/index.html @@ -45,7 +45,7 @@ bayesianVARs - 0.1.1 + 0.1.0.9000 diff --git a/news/index.html b/news/index.html index 282db6d..25f5a41 100644 --- a/news/index.html +++ b/news/index.html @@ -10,7 +10,7 @@ bayesianVARs - 0.1.1 + 0.1.0.9000 @@ -51,10 +51,8 @@ -bayesianVARs 0.1.1CRAN release: 2024-01-17 -Fixed clang-UBSAN issue. -Fixed undefined figure references in vignette. - +bayesianVARs (development version) + bayesianVARs 0.1.0CRAN release: 2024-01-13 Initial CRAN submission. diff --git a/pkgdown.yml b/pkgdown.yml index 7a4b1b4..6e90210 100644 --- a/pkgdown.yml +++ b/pkgdown.yml @@ -3,7 +3,7 @@ pkgdown: 2.0.7 pkgdown_sha: ~ articles: bayesianVARs-vignette: bayesianVARs-vignette.pdf -last_built: 2024-01-17T22:58Z +last_built: 2024-01-17T23:02Z urls: reference: https://luisgruber.github.io/bayesianVARs/reference article: https://luisgruber.github.io/bayesianVARs/articles diff --git a/reference/bvar.html b/reference/bvar.html index 07fb919..ab3acd7 100644 --- a/reference/bvar.html +++ b/reference/bvar.html @@ -12,7 +12,7 @@ bayesianVARs - 0.1.1 + 0.1.0.9000 diff --git a/reference/coef.html b/reference/coef.html index d399665..7eb64ee 100644 --- a/reference/coef.html +++ b/reference/coef.html @@ -12,7 +12,7 @@ bayesianVARs - 0.1.1 + 0.1.0.9000 diff --git a/reference/fitted.bayesianVARs_bvar.html b/reference/fitted.bayesianVARs_bvar.html index fc285f9..1305f28 100644 --- a/reference/fitted.bayesianVARs_bvar.html +++ b/reference/fitted.bayesianVARs_bvar.html @@ -10,7 +10,7 @@ bayesianVARs - 0.1.1 + 0.1.0.9000 diff --git a/reference/index.html b/reference/index.html index ff803ac..c8c76c6 100644 --- a/reference/index.html +++ b/reference/index.html @@ -10,7 +10,7 @@ bayesianVARs - 0.1.1 + 0.1.0.9000 diff --git a/reference/my_gig.html b/reference/my_gig.html index 6c104e4..7bd4033 100644 --- a/reference/my_gig.html +++ b/reference/my_gig.html @@ -10,7 +10,7 @@ bayesianVARs - 0.1.1 + 0.1.0.9000 diff --git a/reference/pairs_predict.html b/reference/pairs_predict.html index 6f52faa..7dd0fd9 100644 --- a/reference/pairs_predict.html +++ b/reference/pairs_predict.html @@ -14,7 +14,7 @@ bayesianVARs - 0.1.1 + 0.1.0.9000 diff --git a/reference/plot.bayesianVARs_bvar.html b/reference/plot.bayesianVARs_bvar.html index db2277a..c6c745f 100644 --- a/reference/plot.bayesianVARs_bvar.html +++ b/reference/plot.bayesianVARs_bvar.html @@ -12,7 +12,7 @@ bayesianVARs - 0.1.1 + 0.1.0.9000 diff --git a/reference/plot.bayesianVARs_fitted.html b/reference/plot.bayesianVARs_fitted.html index be3ea29..dfce71c 100644 --- a/reference/plot.bayesianVARs_fitted.html +++ b/reference/plot.bayesianVARs_fitted.html @@ -10,7 +10,7 @@ bayesianVARs - 0.1.1 + 0.1.0.9000 diff --git a/reference/plot.bayesianVARs_predict.html b/reference/plot.bayesianVARs_predict.html index 5378f12..2205159 100644 --- a/reference/plot.bayesianVARs_predict.html +++ b/reference/plot.bayesianVARs_predict.html @@ -10,7 +10,7 @@ bayesianVARs - 0.1.1 + 0.1.0.9000 diff --git a/reference/posterior_heatmap.html b/reference/posterior_heatmap.html index 525fe1e..903e446 100644 --- a/reference/posterior_heatmap.html +++ b/reference/posterior_heatmap.html @@ -10,7 +10,7 @@ bayesianVARs - 0.1.1 + 0.1.0.9000 diff --git a/reference/predict.bayesianVARs_bvar.html b/reference/predict.bayesianVARs_bvar.html index 586d6ed..4c97508 100644 --- a/reference/predict.bayesianVARs_bvar.html +++ b/reference/predict.bayesianVARs_bvar.html @@ -14,7 +14,7 @@ bayesianVARs - 0.1.1 + 0.1.0.9000 diff --git a/reference/print.bayesianVARs_bvar.html b/reference/print.bayesianVARs_bvar.html index 3d97a1c..bbfd454 100644 --- a/reference/print.bayesianVARs_bvar.html +++ b/reference/print.bayesianVARs_bvar.html @@ -10,7 +10,7 @@ bayesianVARs - 0.1.1 + 0.1.0.9000 diff --git a/reference/print.bayesianVARs_predict.html b/reference/print.bayesianVARs_predict.html index a1fdb88..2eecf65 100644 --- a/reference/print.bayesianVARs_predict.html +++ b/reference/print.bayesianVARs_predict.html @@ -10,7 +10,7 @@ bayesianVARs - 0.1.1 + 0.1.0.9000 diff --git a/reference/print.summary.bayesianVARs_bvar.html b/reference/print.summary.bayesianVARs_bvar.html index 09a0216..1fef41a 100644 --- a/reference/print.summary.bayesianVARs_bvar.html +++ b/reference/print.summary.bayesianVARs_bvar.html @@ -10,7 +10,7 @@ bayesianVARs - 0.1.1 + 0.1.0.9000 diff --git a/reference/print.summary.bayesianVARs_predict.html b/reference/print.summary.bayesianVARs_predict.html index 5ba4d7f..7b31991 100644 --- a/reference/print.summary.bayesianVARs_predict.html +++ b/reference/print.summary.bayesianVARs_predict.html @@ -10,7 +10,7 @@ bayesianVARs - 0.1.1 + 0.1.0.9000 diff --git a/reference/specify_prior_phi.html b/reference/specify_prior_phi.html index 6a3d7d5..522266a 100644 --- a/reference/specify_prior_phi.html +++ b/reference/specify_prior_phi.html @@ -10,7 +10,7 @@ bayesianVARs - 0.1.1 + 0.1.0.9000 diff --git a/reference/specify_prior_sigma.html b/reference/specify_prior_sigma.html index 6c909d4..32748dd 100644 --- a/reference/specify_prior_sigma.html +++ b/reference/specify_prior_sigma.html @@ -10,7 +10,7 @@ bayesianVARs - 0.1.1 + 0.1.0.9000 diff --git a/reference/stable_bvar.html b/reference/stable_bvar.html index 3028e44..9b28ee5 100644 --- a/reference/stable_bvar.html +++ b/reference/stable_bvar.html @@ -16,7 +16,7 @@ bayesianVARs - 0.1.1 + 0.1.0.9000 diff --git a/reference/sub-.bayesianVARs_coef.html b/reference/sub-.bayesianVARs_coef.html index 9816e59..f32ba72 100644 --- a/reference/sub-.bayesianVARs_coef.html +++ b/reference/sub-.bayesianVARs_coef.html @@ -10,7 +10,7 @@ bayesianVARs - 0.1.1 + 0.1.0.9000 diff --git a/reference/sub-.bayesianVARs_draws.html b/reference/sub-.bayesianVARs_draws.html index 6d575a7..85ec538 100644 --- a/reference/sub-.bayesianVARs_draws.html +++ b/reference/sub-.bayesianVARs_draws.html @@ -10,7 +10,7 @@ bayesianVARs - 0.1.1 + 0.1.0.9000 diff --git a/reference/summary.bayesianVARs_bvar.html b/reference/summary.bayesianVARs_bvar.html index d03bc1b..6b8e3c0 100644 --- a/reference/summary.bayesianVARs_bvar.html +++ b/reference/summary.bayesianVARs_bvar.html @@ -10,7 +10,7 @@ bayesianVARs - 0.1.1 + 0.1.0.9000 diff --git a/reference/summary.bayesianVARs_draws.html b/reference/summary.bayesianVARs_draws.html index 217a0fe..dbc167b 100644 --- a/reference/summary.bayesianVARs_draws.html +++ b/reference/summary.bayesianVARs_draws.html @@ -10,7 +10,7 @@ bayesianVARs - 0.1.1 + 0.1.0.9000 diff --git a/reference/summary.bayesianVARs_predict.html b/reference/summary.bayesianVARs_predict.html index 08c0f83..28419ba 100644 --- a/reference/summary.bayesianVARs_predict.html +++ b/reference/summary.bayesianVARs_predict.html @@ -10,7 +10,7 @@ bayesianVARs - 0.1.1 + 0.1.0.9000 diff --git a/reference/usmacro_growth.html b/reference/usmacro_growth.html index b4ddb9b..9d73ad3 100644 --- a/reference/usmacro_growth.html +++ b/reference/usmacro_growth.html @@ -16,7 +16,7 @@ bayesianVARs - 0.1.1 + 0.1.0.9000 diff --git a/reference/vcov.bayesianVARs_bvar.html b/reference/vcov.bayesianVARs_bvar.html index 3c18a35..27f2380 100644 --- a/reference/vcov.bayesianVARs_bvar.html +++ b/reference/vcov.bayesianVARs_bvar.html @@ -18,7 +18,7 @@ bayesianVARs - 0.1.1 + 0.1.0.9000 diff --git a/search.json b/search.json index 7bbc1c1..e62a276 100644 --- a/search.json +++ b/search.json @@ -1 +1 @@ -[{"path":"https://luisgruber.github.io/bayesianVARs/LICENSE.html","id":null,"dir":"","previous_headings":"","what":"GNU General Public License","title":"GNU General Public License","text":"Version 3, 29 June 2007Copyright © 2007 Free Software Foundation, Inc. Everyone permitted copy distribute verbatim copies license document, changing allowed.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/LICENSE.html","id":"preamble","dir":"","previous_headings":"","what":"Preamble","title":"GNU General Public License","text":"GNU General Public License free, copyleft license software kinds works. licenses software practical works designed take away freedom share change works. contrast, GNU General Public License intended guarantee freedom share change versions program–make sure remains free software users. , Free Software Foundation, use GNU General Public License software; applies also work released way authors. can apply programs, . speak free software, referring freedom, price. General Public Licenses designed make sure freedom distribute copies free software (charge wish), receive source code can get want , can change software use pieces new free programs, know can things. protect rights, need prevent others denying rights asking surrender rights. Therefore, certain responsibilities distribute copies software, modify : responsibilities respect freedom others. example, distribute copies program, whether gratis fee, must pass recipients freedoms received. must make sure , , receive can get source code. must show terms know rights. Developers use GNU GPL protect rights two steps: (1) assert copyright software, (2) offer License giving legal permission copy, distribute /modify . developers’ authors’ protection, GPL clearly explains warranty free software. users’ authors’ sake, GPL requires modified versions marked changed, problems attributed erroneously authors previous versions. devices designed deny users access install run modified versions software inside , although manufacturer can . fundamentally incompatible aim protecting users’ freedom change software. systematic pattern abuse occurs area products individuals use, precisely unacceptable. Therefore, designed version GPL prohibit practice products. problems arise substantially domains, stand ready extend provision domains future versions GPL, needed protect freedom users. Finally, every program threatened constantly software patents. States allow patents restrict development use software general-purpose computers, , wish avoid special danger patents applied free program make effectively proprietary. prevent , GPL assures patents used render program non-free. precise terms conditions copying, distribution modification follow.","code":""},{"path":[]},{"path":"https://luisgruber.github.io/bayesianVARs/LICENSE.html","id":"id_0-definitions","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"0. Definitions","title":"GNU General Public License","text":"“License” refers version 3 GNU General Public License. “Copyright” also means copyright-like laws apply kinds works, semiconductor masks. “Program” refers copyrightable work licensed License. licensee addressed “”. “Licensees” “recipients” may individuals organizations. “modify” work means copy adapt part work fashion requiring copyright permission, making exact copy. resulting work called “modified version” earlier work work “based ” earlier work. “covered work” means either unmodified Program work based Program. “propagate” work means anything , without permission, make directly secondarily liable infringement applicable copyright law, except executing computer modifying private copy. Propagation includes copying, distribution (without modification), making available public, countries activities well. “convey” work means kind propagation enables parties make receive copies. Mere interaction user computer network, transfer copy, conveying. interactive user interface displays “Appropriate Legal Notices” extent includes convenient prominently visible feature (1) displays appropriate copyright notice, (2) tells user warranty work (except extent warranties provided), licensees may convey work License, view copy License. interface presents list user commands options, menu, prominent item list meets criterion.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/LICENSE.html","id":"id_1-source-code","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"1. Source Code","title":"GNU General Public License","text":"“source code” work means preferred form work making modifications . “Object code” means non-source form work. “Standard Interface” means interface either official standard defined recognized standards body, , case interfaces specified particular programming language, one widely used among developers working language. “System Libraries” executable work include anything, work whole, () included normal form packaging Major Component, part Major Component, (b) serves enable use work Major Component, implement Standard Interface implementation available public source code form. “Major Component”, context, means major essential component (kernel, window system, ) specific operating system () executable work runs, compiler used produce work, object code interpreter used run . “Corresponding Source” work object code form means source code needed generate, install, (executable work) run object code modify work, including scripts control activities. However, include work’s System Libraries, general-purpose tools generally available free programs used unmodified performing activities part work. example, Corresponding Source includes interface definition files associated source files work, source code shared libraries dynamically linked subprograms work specifically designed require, intimate data communication control flow subprograms parts work. Corresponding Source need include anything users can regenerate automatically parts Corresponding Source. Corresponding Source work source code form work.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/LICENSE.html","id":"id_2-basic-permissions","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"2. Basic Permissions","title":"GNU General Public License","text":"rights granted License granted term copyright Program, irrevocable provided stated conditions met. License explicitly affirms unlimited permission run unmodified Program. output running covered work covered License output, given content, constitutes covered work. License acknowledges rights fair use equivalent, provided copyright law. may make, run propagate covered works convey, without conditions long license otherwise remains force. may convey covered works others sole purpose make modifications exclusively , provide facilities running works, provided comply terms License conveying material control copyright. thus making running covered works must exclusively behalf, direction control, terms prohibit making copies copyrighted material outside relationship . Conveying circumstances permitted solely conditions stated . Sublicensing allowed; section 10 makes unnecessary.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/LICENSE.html","id":"id_3-protecting-users-legal-rights-from-anti-circumvention-law","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"3. Protecting Users’ Legal Rights From Anti-Circumvention Law","title":"GNU General Public License","text":"covered work shall deemed part effective technological measure applicable law fulfilling obligations article 11 WIPO copyright treaty adopted 20 December 1996, similar laws prohibiting restricting circumvention measures. convey covered work, waive legal power forbid circumvention technological measures extent circumvention effected exercising rights License respect covered work, disclaim intention limit operation modification work means enforcing, work’s users, third parties’ legal rights forbid circumvention technological measures.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/LICENSE.html","id":"id_4-conveying-verbatim-copies","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"4. Conveying Verbatim Copies","title":"GNU General Public License","text":"may convey verbatim copies Program’s source code receive , medium, provided conspicuously appropriately publish copy appropriate copyright notice; keep intact notices stating License non-permissive terms added accord section 7 apply code; keep intact notices absence warranty; give recipients copy License along Program. may charge price price copy convey, may offer support warranty protection fee.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/LICENSE.html","id":"id_5-conveying-modified-source-versions","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"5. Conveying Modified Source Versions","title":"GNU General Public License","text":"may convey work based Program, modifications produce Program, form source code terms section 4, provided also meet conditions: ) work must carry prominent notices stating modified , giving relevant date. b) work must carry prominent notices stating released License conditions added section 7. requirement modifies requirement section 4 “keep intact notices”. c) must license entire work, whole, License anyone comes possession copy. License therefore apply, along applicable section 7 additional terms, whole work, parts, regardless packaged. License gives permission license work way, invalidate permission separately received . d) work interactive user interfaces, must display Appropriate Legal Notices; however, Program interactive interfaces display Appropriate Legal Notices, work need make . compilation covered work separate independent works, nature extensions covered work, combined form larger program, volume storage distribution medium, called “aggregate” compilation resulting copyright used limit access legal rights compilation’s users beyond individual works permit. Inclusion covered work aggregate cause License apply parts aggregate.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/LICENSE.html","id":"id_6-conveying-non-source-forms","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"6. Conveying Non-Source Forms","title":"GNU General Public License","text":"may convey covered work object code form terms sections 4 5, provided also convey machine-readable Corresponding Source terms License, one ways: ) Convey object code , embodied , physical product (including physical distribution medium), accompanied Corresponding Source fixed durable physical medium customarily used software interchange. b) Convey object code , embodied , physical product (including physical distribution medium), accompanied written offer, valid least three years valid long offer spare parts customer support product model, give anyone possesses object code either (1) copy Corresponding Source software product covered License, durable physical medium customarily used software interchange, price reasonable cost physically performing conveying source, (2) access copy Corresponding Source network server charge. c) Convey individual copies object code copy written offer provide Corresponding Source. alternative allowed occasionally noncommercially, received object code offer, accord subsection 6b. d) Convey object code offering access designated place (gratis charge), offer equivalent access Corresponding Source way place charge. need require recipients copy Corresponding Source along object code. place copy object code network server, Corresponding Source may different server (operated third party) supports equivalent copying facilities, provided maintain clear directions next object code saying find Corresponding Source. Regardless server hosts Corresponding Source, remain obligated ensure available long needed satisfy requirements. e) Convey object code using peer--peer transmission, provided inform peers object code Corresponding Source work offered general public charge subsection 6d. separable portion object code, whose source code excluded Corresponding Source System Library, need included conveying object code work. “User Product” either (1) “consumer product”, means tangible personal property normally used personal, family, household purposes, (2) anything designed sold incorporation dwelling. determining whether product consumer product, doubtful cases shall resolved favor coverage. particular product received particular user, “normally used” refers typical common use class product, regardless status particular user way particular user actually uses, expects expected use, product. product consumer product regardless whether product substantial commercial, industrial non-consumer uses, unless uses represent significant mode use product. “Installation Information” User Product means methods, procedures, authorization keys, information required install execute modified versions covered work User Product modified version Corresponding Source. information must suffice ensure continued functioning modified object code case prevented interfered solely modification made. convey object code work section , , specifically use , User Product, conveying occurs part transaction right possession use User Product transferred recipient perpetuity fixed term (regardless transaction characterized), Corresponding Source conveyed section must accompanied Installation Information. requirement apply neither third party retains ability install modified object code User Product (example, work installed ROM). requirement provide Installation Information include requirement continue provide support service, warranty, updates work modified installed recipient, User Product modified installed. Access network may denied modification materially adversely affects operation network violates rules protocols communication across network. Corresponding Source conveyed, Installation Information provided, accord section must format publicly documented (implementation available public source code form), must require special password key unpacking, reading copying.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/LICENSE.html","id":"id_7-additional-terms","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"7. Additional Terms","title":"GNU General Public License","text":"“Additional permissions” terms supplement terms License making exceptions one conditions. Additional permissions applicable entire Program shall treated though included License, extent valid applicable law. additional permissions apply part Program, part may used separately permissions, entire Program remains governed License without regard additional permissions. convey copy covered work, may option remove additional permissions copy, part . (Additional permissions may written require removal certain cases modify work.) may place additional permissions material, added covered work, can give appropriate copyright permission. Notwithstanding provision License, material add covered work, may (authorized copyright holders material) supplement terms License terms: ) Disclaiming warranty limiting liability differently terms sections 15 16 License; b) Requiring preservation specified reasonable legal notices author attributions material Appropriate Legal Notices displayed works containing ; c) Prohibiting misrepresentation origin material, requiring modified versions material marked reasonable ways different original version; d) Limiting use publicity purposes names licensors authors material; e) Declining grant rights trademark law use trade names, trademarks, service marks; f) Requiring indemnification licensors authors material anyone conveys material (modified versions ) contractual assumptions liability recipient, liability contractual assumptions directly impose licensors authors. non-permissive additional terms considered “restrictions” within meaning section 10. Program received , part , contains notice stating governed License along term restriction, may remove term. license document contains restriction permits relicensing conveying License, may add covered work material governed terms license document, provided restriction survive relicensing conveying. add terms covered work accord section, must place, relevant source files, statement additional terms apply files, notice indicating find applicable terms. Additional terms, permissive non-permissive, may stated form separately written license, stated exceptions; requirements apply either way.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/LICENSE.html","id":"id_8-termination","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"8. Termination","title":"GNU General Public License","text":"may propagate modify covered work except expressly provided License. attempt otherwise propagate modify void, automatically terminate rights License (including patent licenses granted third paragraph section 11). However, cease violation License, license particular copyright holder reinstated () provisionally, unless copyright holder explicitly finally terminates license, (b) permanently, copyright holder fails notify violation reasonable means prior 60 days cessation. Moreover, license particular copyright holder reinstated permanently copyright holder notifies violation reasonable means, first time received notice violation License (work) copyright holder, cure violation prior 30 days receipt notice. Termination rights section terminate licenses parties received copies rights License. rights terminated permanently reinstated, qualify receive new licenses material section 10.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/LICENSE.html","id":"id_9-acceptance-not-required-for-having-copies","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"9. Acceptance Not Required for Having Copies","title":"GNU General Public License","text":"required accept License order receive run copy Program. Ancillary propagation covered work occurring solely consequence using peer--peer transmission receive copy likewise require acceptance. However, nothing License grants permission propagate modify covered work. actions infringe copyright accept License. Therefore, modifying propagating covered work, indicate acceptance License .","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/LICENSE.html","id":"id_10-automatic-licensing-of-downstream-recipients","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"10. Automatic Licensing of Downstream Recipients","title":"GNU General Public License","text":"time convey covered work, recipient automatically receives license original licensors, run, modify propagate work, subject License. responsible enforcing compliance third parties License. “entity transaction” transaction transferring control organization, substantially assets one, subdividing organization, merging organizations. propagation covered work results entity transaction, party transaction receives copy work also receives whatever licenses work party’s predecessor interest give previous paragraph, plus right possession Corresponding Source work predecessor interest, predecessor can get reasonable efforts. may impose restrictions exercise rights granted affirmed License. example, may impose license fee, royalty, charge exercise rights granted License, may initiate litigation (including cross-claim counterclaim lawsuit) alleging patent claim infringed making, using, selling, offering sale, importing Program portion .","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/LICENSE.html","id":"id_11-patents","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"11. Patents","title":"GNU General Public License","text":"“contributor” copyright holder authorizes use License Program work Program based. work thus licensed called contributor’s “contributor version”. contributor’s “essential patent claims” patent claims owned controlled contributor, whether already acquired hereafter acquired, infringed manner, permitted License, making, using, selling contributor version, include claims infringed consequence modification contributor version. purposes definition, “control” includes right grant patent sublicenses manner consistent requirements License. contributor grants non-exclusive, worldwide, royalty-free patent license contributor’s essential patent claims, make, use, sell, offer sale, import otherwise run, modify propagate contents contributor version. following three paragraphs, “patent license” express agreement commitment, however denominated, enforce patent (express permission practice patent covenant sue patent infringement). “grant” patent license party means make agreement commitment enforce patent party. convey covered work, knowingly relying patent license, Corresponding Source work available anyone copy, free charge terms License, publicly available network server readily accessible means, must either (1) cause Corresponding Source available, (2) arrange deprive benefit patent license particular work, (3) arrange, manner consistent requirements License, extend patent license downstream recipients. “Knowingly relying” means actual knowledge , patent license, conveying covered work country, recipient’s use covered work country, infringe one identifiable patents country reason believe valid. , pursuant connection single transaction arrangement, convey, propagate procuring conveyance , covered work, grant patent license parties receiving covered work authorizing use, propagate, modify convey specific copy covered work, patent license grant automatically extended recipients covered work works based . patent license “discriminatory” include within scope coverage, prohibits exercise , conditioned non-exercise one rights specifically granted License. may convey covered work party arrangement third party business distributing software, make payment third party based extent activity conveying work, third party grants, parties receive covered work , discriminatory patent license () connection copies covered work conveyed (copies made copies), (b) primarily connection specific products compilations contain covered work, unless entered arrangement, patent license granted, prior 28 March 2007. Nothing License shall construed excluding limiting implied license defenses infringement may otherwise available applicable patent law.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/LICENSE.html","id":"id_12-no-surrender-of-others-freedom","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"12. No Surrender of Others’ Freedom","title":"GNU General Public License","text":"conditions imposed (whether court order, agreement otherwise) contradict conditions License, excuse conditions License. convey covered work satisfy simultaneously obligations License pertinent obligations, consequence may convey . example, agree terms obligate collect royalty conveying convey Program, way satisfy terms License refrain entirely conveying Program.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/LICENSE.html","id":"id_13-use-with-the-gnu-affero-general-public-license","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"13. Use with the GNU Affero General Public License","title":"GNU General Public License","text":"Notwithstanding provision License, permission link combine covered work work licensed version 3 GNU Affero General Public License single combined work, convey resulting work. terms License continue apply part covered work, special requirements GNU Affero General Public License, section 13, concerning interaction network apply combination .","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/LICENSE.html","id":"id_14-revised-versions-of-this-license","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"14. Revised Versions of this License","title":"GNU General Public License","text":"Free Software Foundation may publish revised /new versions GNU General Public License time time. new versions similar spirit present version, may differ detail address new problems concerns. version given distinguishing version number. Program specifies certain numbered version GNU General Public License “later version” applies , option following terms conditions either numbered version later version published Free Software Foundation. Program specify version number GNU General Public License, may choose version ever published Free Software Foundation. Program specifies proxy can decide future versions GNU General Public License can used, proxy’s public statement acceptance version permanently authorizes choose version Program. Later license versions may give additional different permissions. However, additional obligations imposed author copyright holder result choosing follow later version.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/LICENSE.html","id":"id_15-disclaimer-of-warranty","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"15. Disclaimer of Warranty","title":"GNU General Public License","text":"WARRANTY PROGRAM, EXTENT PERMITTED APPLICABLE LAW. EXCEPT OTHERWISE STATED WRITING COPYRIGHT HOLDERS /PARTIES PROVIDE PROGRAM “” WITHOUT WARRANTY KIND, EITHER EXPRESSED IMPLIED, INCLUDING, LIMITED , IMPLIED WARRANTIES MERCHANTABILITY FITNESS PARTICULAR PURPOSE. ENTIRE RISK QUALITY PERFORMANCE PROGRAM . PROGRAM PROVE DEFECTIVE, ASSUME COST NECESSARY SERVICING, REPAIR CORRECTION.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/LICENSE.html","id":"id_16-limitation-of-liability","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"16. Limitation of Liability","title":"GNU General Public License","text":"EVENT UNLESS REQUIRED APPLICABLE LAW AGREED WRITING COPYRIGHT HOLDER, PARTY MODIFIES /CONVEYS PROGRAM PERMITTED , LIABLE DAMAGES, INCLUDING GENERAL, SPECIAL, INCIDENTAL CONSEQUENTIAL DAMAGES ARISING USE INABILITY USE PROGRAM (INCLUDING LIMITED LOSS DATA DATA RENDERED INACCURATE LOSSES SUSTAINED THIRD PARTIES FAILURE PROGRAM OPERATE PROGRAMS), EVEN HOLDER PARTY ADVISED POSSIBILITY DAMAGES.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/LICENSE.html","id":"id_17-interpretation-of-sections-15-and-16","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"17. Interpretation of Sections 15 and 16","title":"GNU General Public License","text":"disclaimer warranty limitation liability provided given local legal effect according terms, reviewing courts shall apply local law closely approximates absolute waiver civil liability connection Program, unless warranty assumption liability accompanies copy Program return fee. END TERMS CONDITIONS","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/LICENSE.html","id":"how-to-apply-these-terms-to-your-new-programs","dir":"","previous_headings":"","what":"How to Apply These Terms to Your New Programs","title":"GNU General Public License","text":"develop new program, want greatest possible use public, best way achieve make free software everyone can redistribute change terms. , attach following notices program. safest attach start source file effectively state exclusion warranty; file least “copyright” line pointer full notice found. Also add information contact electronic paper mail. program terminal interaction, make output short notice like starts interactive mode: hypothetical commands show w show c show appropriate parts General Public License. course, program’s commands might different; GUI interface, use “box”. also get employer (work programmer) school, , sign “copyright disclaimer” program, necessary. information , apply follow GNU GPL, see . GNU General Public License permit incorporating program proprietary programs. program subroutine library, may consider useful permit linking proprietary applications library. want , use GNU Lesser General Public License instead License. first, please read .","code":" Copyright (C) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type 'show w'. This is free software, and you are welcome to redistribute it under certain conditions; type 'show c' for details."},{"path":"https://luisgruber.github.io/bayesianVARs/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Luis Gruber. Copyright holder, author, maintainer.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Gruber L (2024). bayesianVARs: MCMC Estimation Bayesian Vectorautoregressions. R package version 0.1.1, https://luisgruber.github.io/bayesianVARs/, https://github.com/luisgruber/bayesianVARs.","code":"@Manual{, title = {bayesianVARs: MCMC Estimation of Bayesian Vectorautoregressions}, author = {Luis Gruber}, year = {2024}, note = {R package version 0.1.1, https://luisgruber.github.io/bayesianVARs/}, url = {https://github.com/luisgruber/bayesianVARs}, }"},{"path":"https://luisgruber.github.io/bayesianVARs/index.html","id":"bayesianvars-","dir":"","previous_headings":"","what":"MCMC Estimation of Bayesian Vectorautoregressions","title":"MCMC Estimation of Bayesian Vectorautoregressions","text":"Estimation Bayesian vectorautoregressions /without stochastic volatility. Implements several modern hierarchical shrinkage priors, amongst Dirichlet-Laplace prior (DL), hierarchical Minnesota prior (HM), Horseshoe prior (HS), normal-gamma prior (NG), R2-induced-Dirichlet-decomposition prior (R2D2) stochastic search variable selection prior (SSVS). Concerning error-term, user can either specify order-invariant factor structure order-variant cholesky structure.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"MCMC Estimation of Bayesian Vectorautoregressions","text":"Install CRAN version: Install latest development version directly GitHub:","code":"install.packages(\"bayesianVARs\") devtools::install_github(\"luisgruber/bayesianVARs\")"},{"path":"https://luisgruber.github.io/bayesianVARs/index.html","id":"usage","dir":"","previous_headings":"","what":"Usage","title":"MCMC Estimation of Bayesian Vectorautoregressions","text":"main workhorse conduct Bayesian inference vectorautoregression models package function bvar(). features: Prediction, plotting, extraction model parameters extraction fitted values usual generic functions predict(), plot(), coef(), vcov() fitted(). Configure prior distributions helper functions specify_prior_phi() specify_prior_sigma().","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/index.html","id":"demonstration","dir":"","previous_headings":"","what":"Demonstration","title":"MCMC Estimation of Bayesian Vectorautoregressions","text":"","code":"set.seed(537) # load package library(bayesianVARs) # Load data train_data <-100 * usmacro_growth[1:237,c(\"GDPC1\", \"PCECC96\", \"GPDIC1\", \"AWHMAN\", \"GDPCTPI\", \"CES2000000008x\", \"FEDFUNDS\", \"GS10\", \"EXUSUKx\", \"S&P 500\")] test_data <-100 * usmacro_growth[238:241,c(\"GDPC1\", \"PCECC96\", \"GPDIC1\", \"AWHMAN\", \"GDPCTPI\", \"CES2000000008x\", \"FEDFUNDS\", \"GS10\", \"EXUSUKx\", \"S&P 500\")] # Estimate model using default prior settings mod <- bvar(train_data, lags = 2L, draws = 2000, burnin = 1000, sv_keep = \"all\") # Out of sample prediction and log-predictive-likelihood evaluation pred <- predict(mod, ahead = 1:4, LPL = TRUE, Y_obs = test_data) # Visualize in-sample fit plus out-of-sample prediction intervals plot(mod, predictions = pred)"},{"path":"https://luisgruber.github.io/bayesianVARs/index.html","id":"documentation","dir":"","previous_headings":"","what":"Documentation","title":"MCMC Estimation of Bayesian Vectorautoregressions","text":"bayesianVARs - Shrinkage Priors Bayesian Vectorautoregressions R","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/bvar.html","id":null,"dir":"Reference","previous_headings":"","what":"Markov Chain Monte Carlo Sampling for Bayesian Vectorautoregressions — bvar","title":"Markov Chain Monte Carlo Sampling for Bayesian Vectorautoregressions — bvar","text":"bvar simulates joint posterior distribution parameters latent variables returns posterior draws.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/bvar.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Markov Chain Monte Carlo Sampling for Bayesian Vectorautoregressions — bvar","text":"","code":"bvar( data, lags = 1L, draws = 1000L, burnin = 1000L, thin = 1L, prior_intercept = 100, prior_phi = specify_prior_phi(data = data, lags = lags, prior = \"HS\"), prior_sigma = specify_prior_sigma(data = data, type = \"factor\", quiet = TRUE), sv_keep = \"last\", quiet = FALSE, startvals = list(), expert = list() )"},{"path":"https://luisgruber.github.io/bayesianVARs/reference/bvar.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Markov Chain Monte Carlo Sampling for Bayesian Vectorautoregressions — bvar","text":"data Data matrix (can time series object). \\(M\\) columns assumed contain single time-series length \\(T\\). lags Integer indicating order VAR, .e. number lags dependent variables included predictors. draws single integer indicating number draws burnin burnin single integer indicating number draws discarded burnin thin single integer. Every \\(thin\\)th draw stored. Default thin=1L. prior_intercept Either prior_intercept=FALSE constant term (intercept) included. numeric vector length \\(M\\) indicating (fixed) prior variances constant term. single number recycled accordingly. Default prior_intercept=100. prior_phi bayesianVARs_prior_phi object specifying prior reduced form VAR coefficients. Best use constructor specify_prior_phi. prior_sigma bayesianVARs_prior_sigma object specifying prior variance-covariance matrix VAR. Best use constructor specify_prior_sigma. sv_keep String equal \"\" \"last\". case sv_keep = \"last\", default, draws last log-variance \\(h_T\\) stored. quiet logical value indicating whether information progress sampling displayed sampling (default TRUE). startvals optional list starting values. expert optional list expert settings.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/bvar.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Markov Chain Monte Carlo Sampling for Bayesian Vectorautoregressions — bvar","text":"object type bayesianVARs_bvar, list containing following objects: PHI: bayesianVARs_coef object, array, containing posterior draws VAR coefficients (including intercept). U: bayesianVARs_draws object, matrix, containing posterior draws contemporaneous coefficients (cholesky decomposition sigma specified). logvar: bayesianVARs_draws object containing log-variance draws. sv_para: baysesianVARs_draws object containing posterior draws stochastic volatility related parameters. phi_hyperparameter: matrix containing posterior draws hyperparameters conditional normal prior VAR coefficients. u_hyperparameter: matrix containing posterior draws hyperparameters conditional normal prior U (cholesky decomposition sigma specified). bench: Numerical indicating average time took generate one single draw joint posterior distribution parameters. V_prior: array containing posterior draws variances conditional normal prior VAR coefficients. facload: bayesianVARs_draws object, array, containing draws posterior distribution factor loadings matrix (factor decomposition sigma specified). fac: bayesianVARs_draws object, array, containing factor draws posterior distribution (factor decomposition sigma specified). Y: Matrix containing dependent variables used estimation. X matrix containing lagged values dependent variables, .e. covariates. lags: Integer indicating lag order VAR. intercept: Logical indicating whether constant term included. heteroscedastic logical indicating whether heteroscedasticity assumed. Yraw: Matrix containing dependent variables, including initial 'lags' observations. Traw: Integer indicating total number observations. sigma_type: Character specifying decomposition variance-covariance matrix. datamat: Matrix containing 'Y' 'X'. config: List containing information configuration parameters.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/bvar.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Markov Chain Monte Carlo Sampling for Bayesian Vectorautoregressions — bvar","text":"VAR(p) model following form: \\( \\boldsymbol{y}^\\prime_t = \\boldsymbol{\\iota}^\\prime + \\boldsymbol{x}^\\prime_t\\boldsymbol{\\Phi} + \\boldsymbol{\\epsilon}^\\prime_t\\), \\(\\boldsymbol{y}_t\\) \\(M\\)-dimensional vector dependent variables \\(\\boldsymbol{\\epsilon}_t\\) error term dimension. \\(\\boldsymbol{x}_t\\) \\(K=pM\\)-dimensional vector containing lagged/past values dependent variables \\(\\boldsymbol{y}_{t-l}\\) \\(l=1,\\dots,p\\) \\(\\boldsymbol{\\iota}\\) constant term (intercept) dimension \\(M\\times 1\\). reduced-form coefficient matrix \\(\\boldsymbol{\\Phi}\\) dimension \\(K \\times M\\). bvar offers two different specifications errors: user can choose factor stochastic volatility structure cholesky stochastic volatility structure. cases disturbances \\(\\boldsymbol{\\epsilon}_t\\) assumed follow \\(M\\)-dimensional multivariate normal distribution zero mean variance-covariance matrix \\(\\boldsymbol{\\Sigma}_t\\). case cholesky specification \\(\\boldsymbol{\\Sigma}_t = \\boldsymbol{U}^{\\prime -1} \\boldsymbol{D}_t \\boldsymbol{U}^{-1}\\), \\(\\boldsymbol{U}^{-1}\\) upper unitriangular (ones diagonal). diagonal matrix \\(\\boldsymbol{D}_t\\) depends upon latent log-variances, .e. \\(\\boldsymbol{D}_t=diag(exp(h_{1t}),\\dots, exp(h_{Mt})\\). log-variances follow priori independent autoregressive processes \\(h_{}\\sim N(\\mu_i + \\phi_i(h_{,t-1}-\\mu_i),\\sigma_i^2)\\) \\(=1,\\dots,M\\). case factor structure, \\(\\boldsymbol{\\Sigma}_t = \\boldsymbol{\\Lambda} \\boldsymbol{V}_t \\boldsymbol{\\Lambda}^\\prime + \\boldsymbol{G}_t\\). diagonal matrices \\(\\boldsymbol{V}_t\\) \\(\\boldsymbol{G}_t\\) depend upon latent log-variances, .e. \\(\\boldsymbol{G}_t=diag(exp(h_{1t}),\\dots, exp(h_{Mt})\\) \\(\\boldsymbol{V}_t=diag(exp(h_{M+1,t}),\\dots, exp(h_{M+r,t})\\). log-variances follow priori independent autoregressive processes \\(h_{}\\sim N(\\mu_i + \\phi_i(h_{,t-1}-\\mu_i),\\sigma_i^2)\\) \\(=1,\\dots,M\\) \\(h_{M+j,t}\\sim N(\\phi_ih_{M+j,t-1},\\sigma_{M+j}^2)\\) \\(j=1,\\dots,r\\).","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/bvar.html","id":"mcmc-algorithm","dir":"Reference","previous_headings":"","what":"MCMC algorithm","title":"Markov Chain Monte Carlo Sampling for Bayesian Vectorautoregressions — bvar","text":"sample efficiently reduced-form VAR coefficients assuming factor structure errors, equation per equation algorithm Kastner & Huber (2020) implemented. parameters latent variables associated factor-structure sampled using package factorstochvol-package's function update_fsv callable C-level . sample efficiently reduced-form VAR coefficients, assuming cholesky-structure errors, corrected triangular algorithm Carriero et al. (2021) implemented. SV parameters latent variables sampled using package stochvol's update_fast_sv function. precision parameters, .e. free -diagonal elements \\(\\boldsymbol{U}\\), sampled Cogley Sargent (2005).","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/bvar.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Markov Chain Monte Carlo Sampling for Bayesian Vectorautoregressions — bvar","text":"Gruber, L. Kastner, G. (2023). Forecasting macroeconomic data Bayesian VARs: Sparse dense? depends! arXiv:2206.04902. Kastner, G. Huber, F. Sparse (2020). Bayesian vector autoregressions huge dimensions. Journal Forecasting. 39, 1142--1165, doi:10.1002/.2680 . Kastner, G. (2019). Sparse Bayesian Time-Varying Covariance Estimation Many Dimensions Journal Econometrics, 210(1), 98--115, doi:10.1016/j.jeconom.2018.11.007 . Carriero, . Chan, J. Clark, T. E. Marcellino, M. (2021). Corrigendum “Large Bayesian vector autoregressions stochastic volatility non-conjugate priors” [J. Econometrics 212 (1) (2019) 137–154]. Journal Econometrics, doi:10.1016/j.jeconom.2021.11.010 . Cogley, S. Sargent, T. (2005). Drifts volatilities: monetary policies outcomes post WWII US. Review Economic Dynamics, 8, 262--302, doi:10.1016/j.red.2004.10.009 . Hosszejni, D. Kastner, G. (2021). Modeling Univariate Multivariate Stochastic Volatility R stochvol factorstochvol. Journal Statistical Software, 100, 1–-34. doi:10.18637/jss.v100.i12 .","code":""},{"path":[]},{"path":"https://luisgruber.github.io/bayesianVARs/reference/bvar.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Markov Chain Monte Carlo Sampling for Bayesian Vectorautoregressions — bvar","text":"","code":"# Access a subset of the usmacro_growth dataset data <- usmacro_growth[,c(\"GDPC1\", \"CPIAUCSL\", \"FEDFUNDS\")] # Estimate a model mod <- bvar(data, sv_keep = \"all\", quiet = TRUE) # Plot plot(mod) # Summary summary(mod) #> #> Posterior median of reduced-form coefficients: #> GDPC1 CPIAUCSL FEDFUNDS #> GDPC1.l1 0.236588 0.006926 2.109e-02 #> CPIAUCSL.l1 -0.053390 0.616162 -3.646e-03 #> FEDFUNDS.l1 0.007874 0.037088 1.001e+00 #> intercept 0.005874 0.001291 -8.055e-05 #> #> Posterior interquartile range of of reduced-form coefficients: #> GDPC1 CPIAUCSL FEDFUNDS #> GDPC1.l1 0.089598 0.0290897 0.0252782 #> CPIAUCSL.l1 0.111515 0.0904426 0.0150976 #> FEDFUNDS.l1 0.018416 0.0141909 0.0076726 #> intercept 0.001135 0.0007528 0.0001651"},{"path":"https://luisgruber.github.io/bayesianVARs/reference/coef.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract VAR coefficients — coef","title":"Extract VAR coefficients — coef","text":"Extracts posterior draws VAR coefficients VAR model estimated bvar().","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/coef.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract VAR coefficients — coef","text":"","code":"# S3 method for bayesianVARs_bvar coef(object, ...)"},{"path":"https://luisgruber.github.io/bayesianVARs/reference/coef.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract VAR coefficients — coef","text":"object bayesianVARs_bvar object obtained bvar(). ... Currently ignored.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/coef.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extract VAR coefficients — coef","text":"Returns numeric array dimension \\(M \\times K \\times draws\\), M number time-series, K number covariates per equation (including intercept) draws number stored posterior draws.","code":""},{"path":[]},{"path":"https://luisgruber.github.io/bayesianVARs/reference/coef.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Extract VAR coefficients — coef","text":"","code":"# Access a subset of the usmacro_growth dataset data <- usmacro_growth[,c(\"GDPC1\", \"CPIAUCSL\", \"FEDFUNDS\")] # Estimate a model mod <- bvar(data, sv_keep = \"all\", quiet = TRUE) # Extract posterior draws of VAR coefficients bvar_coefs <- coef(mod)"},{"path":"https://luisgruber.github.io/bayesianVARs/reference/fitted.bayesianVARs_bvar.html","id":null,"dir":"Reference","previous_headings":"","what":"Simulate fitted/predicted historical values for an estimated VAR model — fitted.bayesianVARs_bvar","title":"Simulate fitted/predicted historical values for an estimated VAR model — fitted.bayesianVARs_bvar","text":"Simulates fitted/predicted (-sample) values estimated VAR model.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/fitted.bayesianVARs_bvar.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Simulate fitted/predicted historical values for an estimated VAR model — fitted.bayesianVARs_bvar","text":"","code":"# S3 method for bayesianVARs_bvar fitted(object, error_term = TRUE, ...)"},{"path":"https://luisgruber.github.io/bayesianVARs/reference/fitted.bayesianVARs_bvar.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Simulate fitted/predicted historical values for an estimated VAR model — fitted.bayesianVARs_bvar","text":"object bayesianVARs_bvar object estimated via bvar(). error_term logical indicating whether include error term . ... Currently ignored.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/fitted.bayesianVARs_bvar.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Simulate fitted/predicted historical values for an estimated VAR model — fitted.bayesianVARs_bvar","text":"object class bayesianVARs_fitted.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/fitted.bayesianVARs_bvar.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Simulate fitted/predicted historical values for an estimated VAR model — fitted.bayesianVARs_bvar","text":"","code":"# Access a subset of the usmacro_growth dataset data <- usmacro_growth[,c(\"GDPC1\", \"CPIAUCSL\", \"FEDFUNDS\")] # Estimate a model mod <- bvar(data, sv_keep = \"all\", quiet = TRUE) # Simulate predicted historical values including the error term. pred <- fitted(mod, error_term = TRUE) # Simulate fitted historical values not including the error term. fit <- fitted(mod, error_term = FALSE) # Visualize plot(pred) plot(fit)"},{"path":"https://luisgruber.github.io/bayesianVARs/reference/my_gig.html","id":null,"dir":"Reference","previous_headings":"","what":"Draw from generalized inverse Gaussian — my_gig","title":"Draw from generalized inverse Gaussian — my_gig","text":"Vectorized version rgig","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/my_gig.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Draw from generalized inverse Gaussian — my_gig","text":"","code":"my_gig(n, lambda, chi, psi)"},{"path":"https://luisgruber.github.io/bayesianVARs/reference/my_gig.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Draw from generalized inverse Gaussian — my_gig","text":"n single integer indicating number draws generate. lambda vector shape parameters. chi vector shape/scale parameters. Must nonnegative positive lambdas positive else. psi vector shape/scale parameters. Must nonnegative negative lambdas positive else.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/my_gig.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Draw from generalized inverse Gaussian — my_gig","text":"Matrix dimension c(n,m), m maximum length lambda, psi chi.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/my_gig.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Draw from generalized inverse Gaussian — my_gig","text":"","code":"gigsamples <- my_gig(2, c(1,1), c(1,1), c(1,1))"},{"path":"https://luisgruber.github.io/bayesianVARs/reference/pairs_predict.html","id":null,"dir":"Reference","previous_headings":"","what":"Pairwise visualization of out-of-sample posterior predictive\ndensities. — pairs_predict","title":"Pairwise visualization of out-of-sample posterior predictive\ndensities. — pairs_predict","text":"Pairwise visualization --sample posterior predictive densities.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/pairs_predict.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Pairwise visualization of out-of-sample posterior predictive\ndensities. — pairs_predict","text":"","code":"# S3 method for bayesianVARs_predict pairs(x, vars, ahead, ...)"},{"path":"https://luisgruber.github.io/bayesianVARs/reference/pairs_predict.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Pairwise visualization of out-of-sample posterior predictive\ndensities. — pairs_predict","text":"x object class bayesianVARs_predict obtained via predict.bayesianVARs_bvar(). vars Integer vector (coercible ) indicating variables plot. ahead Integer vector (coercible ) indicating step ahead plot. max(ahead) must smaller equal dim(x$predictions)[1]. ... Currently ignored!","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/pairs_predict.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Pairwise visualization of out-of-sample posterior predictive\ndensities. — pairs_predict","text":"Returns x invisibly.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/pairs_predict.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Pairwise visualization of out-of-sample posterior predictive\ndensities. — pairs_predict","text":"Note bayesianVARs_predict can also used withing plot.bayesianVARs_bvar().","code":""},{"path":[]},{"path":"https://luisgruber.github.io/bayesianVARs/reference/pairs_predict.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Pairwise visualization of out-of-sample posterior predictive\ndensities. — pairs_predict","text":"","code":"# Access a subset of the usmacro_growth dataset data <- usmacro_growth[,c(\"GDPC1\", \"CPIAUCSL\", \"FEDFUNDS\")] # Estimate a model mod <- bvar(data, sv_keep = \"all\", quiet = TRUE) # Simulate from posterior predictive predictions <- predict(mod, ahead = 1:3) #> 'stable=TRUE': Calling 'stable_bvar()' to discard those posterior #> draws, that do not fulfill the stable criterion. #> #> 485 stable posterior draws remaining for prediction! # Visualize pairs(predictions, vars = 1:3, ahead = 1:3)"},{"path":"https://luisgruber.github.io/bayesianVARs/reference/plot.bayesianVARs_bvar.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot method for bayesianVARs_bvar — plot.bayesianVARs_bvar","title":"Plot method for bayesianVARs_bvar — plot.bayesianVARs_bvar","text":"Visualization -sample fit. Can also used display prediction intervals future values.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/plot.bayesianVARs_bvar.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot method for bayesianVARs_bvar — plot.bayesianVARs_bvar","text":"","code":"# S3 method for bayesianVARs_bvar plot( x, predictions = NULL, quantiles = c(0.05, 0.5, 0.95), dates = NULL, n_col = 1, ... )"},{"path":"https://luisgruber.github.io/bayesianVARs/reference/plot.bayesianVARs_bvar.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot method for bayesianVARs_bvar — plot.bayesianVARs_bvar","text":"x object class bayesianVARs_bvar obtained via bvar(). predictions Optional array sample predictions, e.g. obtained via predict.bayesianVARs_bvar(). quantiles numeric vector indicating quantiles plot. dates optional vector dates labelling x-axis. default values NULL; case, axis labeled numbers. n_col integer indicating number columns use plotting. ... Currently ignored!","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/plot.bayesianVARs_bvar.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Plot method for bayesianVARs_bvar — plot.bayesianVARs_bvar","text":"Returns x invisibly.","code":""},{"path":[]},{"path":"https://luisgruber.github.io/bayesianVARs/reference/plot.bayesianVARs_bvar.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Plot method for bayesianVARs_bvar — plot.bayesianVARs_bvar","text":"","code":"# Access a subset of the usmacro_growth dataset data <- usmacro_growth[,c(\"GDPC1\", \"CPIAUCSL\", \"FEDFUNDS\")] # Estimate a model mod <- bvar(data, sv_keep = \"all\", quiet = TRUE) # Simulate from posterior predictive predictions <- predict(mod, ahead = 1:3) #> 'stable=TRUE': Calling 'stable_bvar()' to discard those posterior #> draws, that do not fulfill the stable criterion. #> #> 626 stable posterior draws remaining for prediction! # Visualize plot(mod, predictions = predictions)"},{"path":"https://luisgruber.github.io/bayesianVARs/reference/plot.bayesianVARs_fitted.html","id":null,"dir":"Reference","previous_headings":"","what":"Visualization of in-sample fit of an estimated VAR. — plot.bayesianVARs_fitted","title":"Visualization of in-sample fit of an estimated VAR. — plot.bayesianVARs_fitted","text":"Visualization -sample fit estimated VAR.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/plot.bayesianVARs_fitted.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Visualization of in-sample fit of an estimated VAR. — plot.bayesianVARs_fitted","text":"","code":"# S3 method for bayesianVARs_fitted plot( x, dates = NULL, vars = \"all\", quantiles = c(0.05, 0.5, 0.95), n_col = 1L, ... )"},{"path":"https://luisgruber.github.io/bayesianVARs/reference/plot.bayesianVARs_fitted.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Visualization of in-sample fit of an estimated VAR. — plot.bayesianVARs_fitted","text":"x bayesianVARs_fitted object. dates optional vector dates labelling x-axis. default values NULL; case, axis labeled numbers. vars character vector containing names variables visualized. default \"\" indicating fit variables visualized. quantiles numeric vector indicating quantiles plot. n_col integer indicating number columns use plotting. ... Currently ignored.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/plot.bayesianVARs_fitted.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Visualization of in-sample fit of an estimated VAR. — plot.bayesianVARs_fitted","text":"returns x invisibly","code":""},{"path":[]},{"path":"https://luisgruber.github.io/bayesianVARs/reference/plot.bayesianVARs_fitted.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Visualization of in-sample fit of an estimated VAR. — plot.bayesianVARs_fitted","text":"","code":"# Access a subset of the usmacro_growth dataset data <- usmacro_growth[,c(\"GDPC1\", \"CPIAUCSL\", \"FEDFUNDS\")] # Estimate a model mod <- bvar(data, sv_keep = \"all\", quiet = TRUE) # Simulate predicted historical values including the error term. pred <- fitted(mod, error_term = TRUE) # Visualize plot(pred)"},{"path":"https://luisgruber.github.io/bayesianVARs/reference/plot.bayesianVARs_predict.html","id":null,"dir":"Reference","previous_headings":"","what":"Fan chart — plot.bayesianVARs_predict","title":"Fan chart — plot.bayesianVARs_predict","text":"Visualization (--sample) predictive distribution.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/plot.bayesianVARs_predict.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Fan chart — plot.bayesianVARs_predict","text":"","code":"# S3 method for bayesianVARs_predict plot( x, dates = NULL, vars = \"all\", ahead = NULL, quantiles = c(0.05, 0.25, 0.5, 0.75, 0.95), n_col = 1L, first_obs = 1L, ... )"},{"path":"https://luisgruber.github.io/bayesianVARs/reference/plot.bayesianVARs_predict.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Fan chart — plot.bayesianVARs_predict","text":"x object type bayesianVARs_predict obtained via predict.bayesianVARs_bvar(). dates optional vector dates labeling x-axis. default values NULL; case, axis labeled numbers. vars character vector containing names variables visualized. default \"\" indicating variables visualized. ahead Integer vector (coercible ) indicating step ahead plot. max(ahead) must smaller equal dim(x$predictions)[1]. quantiles numeric vector indicating quantiles plot. n_col integer indicating number columns use plotting. first_obs integer indicating first observation used plotting. ... Currently ignored!","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/plot.bayesianVARs_predict.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Fan chart — plot.bayesianVARs_predict","text":"Returns x invisibly!","code":""},{"path":[]},{"path":"https://luisgruber.github.io/bayesianVARs/reference/plot.bayesianVARs_predict.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Fan chart — plot.bayesianVARs_predict","text":"","code":"# Access a subset of the usmacro_growth dataset data <- usmacro_growth[,c(\"GDPC1\", \"CPIAUCSL\", \"FEDFUNDS\")] # Estimate a model mod <- bvar(data, sv_keep = \"all\", quiet = TRUE) # Simulate from posterior predictive predictions <- predict(mod, ahead = 1:3) #> 'stable=TRUE': Calling 'stable_bvar()' to discard those posterior #> draws, that do not fulfill the stable criterion. #> #> 385 stable posterior draws remaining for prediction! # Visualize plot(predictions, vars = 1:3, ahead = 1:3)"},{"path":"https://luisgruber.github.io/bayesianVARs/reference/posterior_heatmap.html","id":null,"dir":"Reference","previous_headings":"","what":"Posterior heatmaps for VAR coefficients or variance-covariance matrices — posterior_heatmap","title":"Posterior heatmaps for VAR coefficients or variance-covariance matrices — posterior_heatmap","text":"Posterior heatmaps VAR coefficients variance-covariance matrices","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/posterior_heatmap.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Posterior heatmaps for VAR coefficients or variance-covariance matrices — posterior_heatmap","text":"","code":"posterior_heatmap( x, FUN, ..., colorbar = TRUE, xlabels = NULL, ylabels = NULL, add_numbers = FALSE, zlim = NULL, colspace = NULL, main = \"\", cex.axis = 0.75, cex.colbar = 1, cex.numbers = 1, asp = NULL )"},{"path":"https://luisgruber.github.io/bayesianVARs/reference/posterior_heatmap.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Posterior heatmaps for VAR coefficients or variance-covariance matrices — posterior_heatmap","text":"x array dimension \\(\\times b \\times draws\\), \\( \\times b\\) dimension parameter visualize draws number posterior draws. FUN summary function applied margins c(1,2) x. E.g. \"median\", \"mean\", \"IQR\", \"sd\" \"var\". apply(x, 1:2, FUN, ...) must return matrix! ... optional arguments FUN. colorbar logical indicating whether display colorbar . Default TRUE. xlabels ylabels=NULL, default, indicates names dependent variables displayed. ylabels=\"\" indicates ylabels displayed. ylabels xlabels=NULL, default, indicates labels covariables (lagged values dependent variables) displayed. xlabels=\"lags\" indicates lags marked. xlabels=\"\" indicates ylabels displayed. add_numbers logical. add_numbers=TRUE, default indicates actual values summary displayed. zlim numeric vector length two indicating minimum maximum values colors plotted. default range determined maximum absolute values selected summary. colspace Optional argument. main main title plot. cex.axis magnification used y-axis annotation relative current setting cex. cex.colbar magnification used colorbar annotation relative current setting cex. cex.numbers magnification used actual values (add_numbers=TRUE) relative current setting cex. asp aspect ratio.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/posterior_heatmap.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Posterior heatmaps for VAR coefficients or variance-covariance matrices — posterior_heatmap","text":"Returns x invisibly.","code":""},{"path":[]},{"path":"https://luisgruber.github.io/bayesianVARs/reference/posterior_heatmap.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Posterior heatmaps for VAR coefficients or variance-covariance matrices — posterior_heatmap","text":"","code":"# Access a subset of the usmacro_growth dataset data <- usmacro_growth[,c(\"GDPC1\", \"CPIAUCSL\", \"FEDFUNDS\")] # Estimate a model mod <- bvar(100*data, sv_keep = \"all\", quiet = TRUE) # Extract posterior draws of VAR coefficients phi_post <- coef(mod) # Visualize posterior median of VAR coefficients posterior_heatmap(phi_post, median) # Extract posterior draws of variance-covariance matrices (for each point in time) sigma_post <- vcov(mod) # Visualize posterior interquartile-range of variance-covariance matrix of the first observation posterior_heatmap(sigma_post[1,,,], IQR)"},{"path":"https://luisgruber.github.io/bayesianVARs/reference/predict.bayesianVARs_bvar.html","id":null,"dir":"Reference","previous_headings":"","what":"Predict method for Bayesian VARs — predict.bayesianVARs_bvar","title":"Predict method for Bayesian VARs — predict.bayesianVARs_bvar","text":"Simulates (--sample) predictive density Bayesian VARs estimated via bvar() computes log predictive likelhoods ex-post observed data supplied.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/predict.bayesianVARs_bvar.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Predict method for Bayesian VARs — predict.bayesianVARs_bvar","text":"","code":"# S3 method for bayesianVARs_bvar predict( object, ahead = 1L, each = 1L, stable = TRUE, simulate_predictive = TRUE, LPL = FALSE, Y_obs = NA, LPL_VoI = NA, ... )"},{"path":"https://luisgruber.github.io/bayesianVARs/reference/predict.bayesianVARs_bvar.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Predict method for Bayesian VARs — predict.bayesianVARs_bvar","text":"object bayesianVARs_bvar object, obtained bvar(). ahead Integer vector (coercible ), indicating number steps ahead predict. Single integer (coercible ) indicating often drawn posterior predictive distribution draw stored MCMC sampling. stable logical indicating whether consider draws posterior fulfill 'stable' criterion. Default TRUE. simulate_predictive logical, indicating whether posterior predictive distribution simulated. LPL logical indicating whether ahead-step-ahead log predictive likelihoods computed. LPL=TRUE, Y_obs specified. Y_obs Data matrix observed values computation log predictive likelihood. ncol(object$Yraw) columns assumed contain single time-series length length(ahead). LPL_VoI either integer vector character vector column-names indicating subgroup time-series object$Yraw joint log predictive likelihood shall computed. ... Currently ignored!","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/predict.bayesianVARs_bvar.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Predict method for Bayesian VARs — predict.bayesianVARs_bvar","text":"Object class bayesianVARs_predict, list may contain following elements: predictions array dimensions c(length(ahead), ncol(object$Yraw), * dim(object$PHI)[3]) containing simulations predictive density (simulate_predictive=TRUE). LPL vector length length(ahead) containing log-predictive-likelihoods (taking account joint distribution variables) (LPL=TRUE). LPL_univariate matrix dimension c(length(ahead), ncol(object$Yraw) containing marginalized univariate log-predictive-likelihoods series (LPL=TRUE). LPL_VoI vector length length(ahead) containing log-predictive-likelihoods subset variables (LPL=TRUE LPL_VoI != NA). Yraw matrix containing data used estimation VAR. LPL_draws matrix containing simulations log-predictive-likelihood (LPL=TRUE). PL_univariate_draws array containing simulations univariate predictive-likelihoods (LPL=TRUE). LPL_sub_draws matrix containing simulations log-predictive-likelihood subset variables (LPL=TRUE LPL_VoI != NA).","code":""},{"path":[]},{"path":"https://luisgruber.github.io/bayesianVARs/reference/predict.bayesianVARs_bvar.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Predict method for Bayesian VARs — predict.bayesianVARs_bvar","text":"","code":"# Access a subset of the usmacro_growth dataset data <- usmacro_growth[,c(\"GDPC1\", \"CPIAUCSL\", \"FEDFUNDS\")] # Split data in train and test train <- data[1:(nrow(data)-4),] test <- data[-c(1:(nrow(data)-4)),] # Estimate model using train data only mod <- bvar(train, quiet = TRUE) # Simulate from 1-step to 4-steps ahead posterior predictive and compute # log-predictive-likelihoods predictions <- predict(mod, ahead = 1:4, LPL = TRUE, Y_obs = test) #> 'stable=TRUE': Calling 'stable_bvar()' to discard those posterior #> draws, that do not fulfill the stable criterion. #> #> 617 stable posterior draws remaining for prediction! # Summary summary(predictions) #> #> LPL: #> t+1 t+2 t+3 t+4 #> 5.114 9.665 9.092 6.526 #> #> Marginal univariate LPLs: #> GDPC1 CPIAUCSL FEDFUNDS #> t+1 -0.8729 0.4109 3.541 #> t+2 2.8555 2.6739 3.391 #> t+3 2.8363 2.4370 3.349 #> t+4 2.8931 0.2959 3.326 #> #> Prediction quantiles: #> , , GDPC1 #> #> t+1 t+2 t+3 t+4 #> 5% -0.07875 -0.0329135 -0.021393 -0.011870 #> 50% -0.01851 0.0009099 0.005688 0.006618 #> 95% 0.03798 0.0429166 0.034118 0.024602 #> #> , , CPIAUCSL #> #> t+1 t+2 t+3 t+4 #> 5% -0.018515 -0.017824 -0.015592 -0.0140807 #> 50% -0.007656 -0.005287 -0.002413 -0.0005886 #> 95% 0.002679 0.006747 0.009743 0.0106464 #> #> , , FEDFUNDS #> #> t+1 t+2 t+3 t+4 #> 5% -0.016214 -0.022544 -0.026463 -0.030055 #> 50% -0.004527 -0.005249 -0.006258 -0.006404 #> 95% 0.005912 0.011279 0.016238 0.018100 #> # Visualize via fan-charts plot(predictions) # \\donttest{ # In order to evaluate the joint predictive density of a subset of the # variables (variables of interest), consider specifying 'LPL_VoI': predictions <- predict(mod, ahead = 1:4, LPL = TRUE, Y_obs = test, LPL_VoI = c(\"GDPC1\",\"FEDFUNDS\")) #> 'stable=TRUE': Calling 'stable_bvar()' to discard those posterior #> draws, that do not fulfill the stable criterion. #> #> 617 stable posterior draws remaining for prediction! predictions$LPL_VoI #> t+1 t+2 t+3 t+4 #> 2.542386 6.712653 6.548112 6.391536 # }"},{"path":"https://luisgruber.github.io/bayesianVARs/reference/print.bayesianVARs_bvar.html","id":null,"dir":"Reference","previous_headings":"","what":"Pretty printing of a bvar object — print.bayesianVARs_bvar","title":"Pretty printing of a bvar object — print.bayesianVARs_bvar","text":"Pretty printing bvar object","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/print.bayesianVARs_bvar.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Pretty printing of a bvar object — print.bayesianVARs_bvar","text":"","code":"# S3 method for bayesianVARs_bvar print(x, ...)"},{"path":"https://luisgruber.github.io/bayesianVARs/reference/print.bayesianVARs_bvar.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Pretty printing of a bvar object — print.bayesianVARs_bvar","text":"x Object class bayesianVARs_bvar, usually resulting call bvar(). ... Ignored.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/print.bayesianVARs_bvar.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Pretty printing of a bvar object — print.bayesianVARs_bvar","text":"Returns x invisibly.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/print.bayesianVARs_bvar.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Pretty printing of a bvar object — print.bayesianVARs_bvar","text":"","code":"# Access a subset of the usmacro_growth dataset data <- usmacro_growth[,c(\"GDPC1\", \"CPIAUCSL\", \"FEDFUNDS\")] # Estimate a model mod <- bvar(data, sv_keep = \"all\", quiet = TRUE) # Print model mod #> #> Fitted bayesianVARs_bvar object with #> - 3 series #> - 1 lag(s) #> - 246 used observations #> - 247 total observations #> - 1000 MCMC draws #> - 1 thinning #> - 1000 burn-in #>"},{"path":"https://luisgruber.github.io/bayesianVARs/reference/print.bayesianVARs_predict.html","id":null,"dir":"Reference","previous_headings":"","what":"Print method for bayesianVARs_predict objects — print.bayesianVARs_predict","title":"Print method for bayesianVARs_predict objects — print.bayesianVARs_predict","text":"Print method bayesianVARs_predict objects.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/print.bayesianVARs_predict.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Print method for bayesianVARs_predict objects — print.bayesianVARs_predict","text":"","code":"# S3 method for bayesianVARs_predict print(x, ...)"},{"path":"https://luisgruber.github.io/bayesianVARs/reference/print.bayesianVARs_predict.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Print method for bayesianVARs_predict objects — print.bayesianVARs_predict","text":"x bayesianVARs_predict object obtained via predict.bayesianVARs_bvar(). ... Currently ignored!","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/print.bayesianVARs_predict.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Print method for bayesianVARs_predict objects — print.bayesianVARs_predict","text":"Returns x invisibly.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/print.bayesianVARs_predict.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Print method for bayesianVARs_predict objects — print.bayesianVARs_predict","text":"","code":"# Access a subset of the usmacro_growth dataset data <- usmacro_growth[,c(\"GDPC1\", \"CPIAUCSL\", \"FEDFUNDS\")] # Split data in train and test train <- data[1:(nrow(data)-4),] test <- data[-c(1:(nrow(data)-4)),] # Estimate model using train data only mod <- bvar(train, quiet = TRUE) # Simulate from 1-step ahead posterior predictive predictions <- predict(mod, ahead = 1L) #> 'stable=TRUE': Calling 'stable_bvar()' to discard those posterior #> draws, that do not fulfill the stable criterion. #> #> 595 stable posterior draws remaining for prediction! print(predictions) #> #> Generic functions for bayesianVARs_predict objects: #> - summary.bayesianVARs_predict(), #> - pairs.bayesianVARs_predict(), #> - plot.bayesianVARs_predict() (alias for pairs.bayesianVARs_predict())."},{"path":"https://luisgruber.github.io/bayesianVARs/reference/print.summary.bayesianVARs_bvar.html","id":null,"dir":"Reference","previous_headings":"","what":"Print method for summary.bayesianVARs_bvar objects — print.summary.bayesianVARs_bvar","title":"Print method for summary.bayesianVARs_bvar objects — print.summary.bayesianVARs_bvar","text":"Print method summary.bayesianVARs_bvar objects.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/print.summary.bayesianVARs_bvar.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Print method for summary.bayesianVARs_bvar objects — print.summary.bayesianVARs_bvar","text":"","code":"# S3 method for summary.bayesianVARs_bvar print(x, ...)"},{"path":"https://luisgruber.github.io/bayesianVARs/reference/print.summary.bayesianVARs_bvar.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Print method for summary.bayesianVARs_bvar objects — print.summary.bayesianVARs_bvar","text":"x summary.bayesianVARs_bvar object obtained via summary.bayesianVARs_bvar(). ... Currently ignored!","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/print.summary.bayesianVARs_bvar.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Print method for summary.bayesianVARs_bvar objects — print.summary.bayesianVARs_bvar","text":"Returns x invisibly!","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/print.summary.bayesianVARs_bvar.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Print method for summary.bayesianVARs_bvar objects — print.summary.bayesianVARs_bvar","text":"","code":"# Access a subset of the usmacro_growth dataset data <- usmacro_growth[,c(\"GDPC1\", \"CPIAUCSL\", \"FEDFUNDS\")] # Estimate model mod <- bvar(data, quiet = TRUE) # Print summary summary(mod) #> #> Posterior median of reduced-form coefficients: #> GDPC1 CPIAUCSL FEDFUNDS #> GDPC1.l1 0.226152 0.00604 1.362e-02 #> CPIAUCSL.l1 -0.063468 0.62045 -4.773e-03 #> FEDFUNDS.l1 0.009492 0.03717 1.001e+00 #> intercept 0.005959 0.00120 -4.555e-05 #> #> Posterior interquartile range of of reduced-form coefficients: #> GDPC1 CPIAUCSL FEDFUNDS #> GDPC1.l1 0.105445 0.0271618 0.0208810 #> CPIAUCSL.l1 0.118059 0.0930382 0.0131568 #> FEDFUNDS.l1 0.019176 0.0145773 0.0065391 #> intercept 0.001173 0.0007342 0.0001668"},{"path":"https://luisgruber.github.io/bayesianVARs/reference/print.summary.bayesianVARs_predict.html","id":null,"dir":"Reference","previous_headings":"","what":"Print method for summary.bayesianVARs_predict objects — print.summary.bayesianVARs_predict","title":"Print method for summary.bayesianVARs_predict objects — print.summary.bayesianVARs_predict","text":"Print method summary.bayesianVARs_predict objects.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/print.summary.bayesianVARs_predict.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Print method for summary.bayesianVARs_predict objects — print.summary.bayesianVARs_predict","text":"","code":"# S3 method for summary.bayesianVARs_predict print(x, ...)"},{"path":"https://luisgruber.github.io/bayesianVARs/reference/print.summary.bayesianVARs_predict.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Print method for summary.bayesianVARs_predict objects — print.summary.bayesianVARs_predict","text":"x summary.bayesianVARs_predict object obtained via summary.bayesianVARs_predict(). ... Currently ignored.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/print.summary.bayesianVARs_predict.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Print method for summary.bayesianVARs_predict objects — print.summary.bayesianVARs_predict","text":"Returns x invisibly.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/print.summary.bayesianVARs_predict.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Print method for summary.bayesianVARs_predict objects — print.summary.bayesianVARs_predict","text":"","code":"# Access a subset of the usmacro_growth dataset data <- usmacro_growth[,c(\"GDPC1\", \"CPIAUCSL\", \"FEDFUNDS\")] # Split data in train and test train <- data[1:(nrow(data)-4),] test <- data[-c(1:(nrow(data)-4)),] # Estimate model using train data only mod <- bvar(train, quiet = TRUE) # Simulate from 1-step ahead posterior predictive predictions <- predict(mod, ahead = 1L) #> 'stable=TRUE': Calling 'stable_bvar()' to discard those posterior #> draws, that do not fulfill the stable criterion. #> #> 586 stable posterior draws remaining for prediction! sum <- summary(predictions) print(sum) #> #> Prediction quantiles: #> , , GDPC1 #> #> t+1 #> 5% -0.06812 #> 50% -0.01798 #> 95% 0.02909 #> #> , , CPIAUCSL #> #> t+1 #> 5% -0.018438 #> 50% -0.008339 #> 95% 0.003312 #> #> , , FEDFUNDS #> #> t+1 #> 5% -0.021399 #> 50% -0.004006 #> 95% 0.009963 #>"},{"path":"https://luisgruber.github.io/bayesianVARs/reference/specify_prior_phi.html","id":null,"dir":"Reference","previous_headings":"","what":"Specify prior on PHI — specify_prior_phi","title":"Specify prior on PHI — specify_prior_phi","text":"Configures prior PHI, matrix reduced-form VAR coefficients.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/specify_prior_phi.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Specify prior on PHI — specify_prior_phi","text":"","code":"specify_prior_phi( data = NULL, M = ncol(data), lags = 1L, prior = \"HS\", priormean = 0, PHI_tol = 1e-18, DL_a = \"1/K\", DL_tol = 0, R2D2_a = 0.1, R2D2_b = 0.5, R2D2_tol = 0, NG_a = 0.1, NG_b = 1, NG_c = 1, NG_tol = 0, SSVS_c0 = 0.01, SSVS_c1 = 100, SSVS_semiautomatic = TRUE, SSVS_p = 0.5, HMP_lambda1 = c(0.01, 0.01), HMP_lambda2 = c(0.01, 0.01), normal_sds = 10, global_grouping = \"global\", ... )"},{"path":"https://luisgruber.github.io/bayesianVARs/reference/specify_prior_phi.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Specify prior on PHI — specify_prior_phi","text":"data Optional. Data matrix (can time series object). \\(M\\) columns assumed contain single time-series length \\(T\\). M positive integer indicating number time-series VAR. lags positive integer indicating order VAR, .e. number lags dependent variables included predictors. prior character, one \"HS\", \"R2D2\", \"NG\", \"DL\", \"SSVS\", \"HMP\" \"normal\". priormean real numbers indicating prior means VAR coefficients. One single number means prior mean -lag coefficients w.r.t. first lag equals priormean 0 else. vector length M means prior mean -lag coefficients w.r.t. first lag equals priormean 0 else. priormean matrix dimension c(lags*M,M), \\(M\\) columns assumed contain lags*M prior means VAR coefficients respective VAR equations. PHI_tol Minimum number absolute value VAR coefficient draw can take. Prevents numerical issues can appear strong shrinkage enforced chosen greater zero. DL_a (Single) positive real number. value interpreted concentration parameter local scales. Smaller values enforce heavier shrinkage. argument global_grouping specifies e.g. k groups, DL_a can numeric vector length k elements indicate shrinkage group. matrix dimension c(s,2) specifies discrete hyperprior, first column contains s support points second column contains associated prior probabilities. DL_a specified prior=\"DL\". DL_tol Minimum number parameter draw one shrinking parameters Dirichlet Laplace prior can take. Prevents numerical issues can appear strong shrinkage enforced chosen greater zero. DL_tol specified prior=\"DL\". R2D2_a (Single) positive real number. value interpreted concentration parameter local scales. Smaller values enforce heavier shrinkage. argument global_grouping specifies e.g. k groups, R2D2_a can numeric vector length k elements indicate shrinkage group. matrix dimension c(s,2) specifies discrete hyperprior, first column contains s support points second column contains associated prior probabilities. R2D2_a specified prior=\"R2D2\". R2D2_b (Single) positive real number. value indicates shape parameter inverse gamma prior (semi-)global scales. argument global_grouping specifies e.g. k groups, NG_b can numeric vector length k elements determine shape parameter group. R2D2_b specified prior=\"R2D2\". R2D2_tol Minimum number parameter draw one shrinking parameters R2D2 prior can take. Prevents numerical issues can appear strong shrinkage enforced chosen greater zero. R2D2_tol specified prior=\"R2D2\". NG_a (Single) positive real number. value interpreted concentration parameter local scales. Smaller values enforce heavier shrinkage. argument global_grouping specifies e.g. k groups, NG_a can numeric vector length k elements indicate shrinkage group. matrix dimension c(s,2) specifies discrete hyperprior, first column contains s support points second column contains associated prior probabilities. NG_a specified prior=\"NG\". NG_b (Single) positive real number. value indicates shape parameter inverse gamma prior (semi-)global scales. argument global_grouping specifies e.g. k groups, NG_b can numeric vector length k elements determine shape parameter group. NG_b specified prior=\"NG\". NG_c (Single) positive real number. value indicates scale parameter inverse gamma prior (semi-)global scales. argument global_grouping specifies e.g. k groups, NG_c can numeric vector length k elements determine scale parameter group. Expert option set scale parameter proportional NG_a. E.g. case discrete hyperprior NG_a chosen, desired proportion say 0.2 achieved setting NG_c=\"0.2a\" (character input!). NG_c specified prior=\"NG\". NG_tol Minimum number parameter draw one shrinking parameters normal-gamma prior can take. Prevents numerical issues can appear strong shrinkage enforced chosen greater zero. NG_tol specified prior=\"NG\". SSVS_c0 single positive number indicating (unscaled) standard deviation spike component. SSVS_c0 specified prior=\"SSVS\". \\(SSVS_{c0} \\ll SSVS_{c1}\\)! SSVS_c0 specified prior=\"SSVS\". SSVS_c1 single positive number indicating (unscaled) standard deviation slab component. SSVS_c0 specified prior=\"SSVS\". \\(SSVS_{c0} \\ll SSVS_{c1}\\)! SSVS_semiautomatic logical. SSVS_semiautomatic=TRUE SSVS_c0 SSVS_c1 scaled variances posterior PHI FLAT conjugate (dependent Normal-Wishart prior). SSVS_semiautomatic specified prior=\"SSVS\". SSVS_p Either single positive number range (0,1) indicating (fixed) prior inclusion probability coefficient. numeric vector length 2 positive entries indicating shape parameters Beta distribution. case Beta hyperprior placed prior inclusion probability. SSVS_p specified prior=\"SSVS\". HMP_lambda1 numeric vector length 2. entries must positive. first indicates shape second rate Gamma hyperprior -lag coefficients. HMP_lambda1 specified prior=\"HMP\". HMP_lambda2 numeric vector length 2. entries must positive. first indicates shape second rate Gamma hyperprior cross-lag coefficients. HMP_lambda2 specified prior=\"HMP\". normal_sds numeric vector length \\(n\\), \\(n = lags M^2\\) number VAR coefficients (excluding intercept), indicating prior variances. single number recycled accordingly! Must positive. normal_sds specified prior=\"normal\". global_grouping One \"global\", \"equation-wise\", \"covariate-wise\", \"olcl-lagwise\" \"fol\" indicating sub-groups semi-global(-local) modifications HS, R2D2, NG, DL SSVS prior. Works also user-specified indicator matrix dimension c(lags*M,M). relevant prior=\"HS\", prior=\"DL\", prior=\"R2D2\", prior=\"NG\" prior=\"SSVS\". ... use!","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/specify_prior_phi.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Specify prior on PHI — specify_prior_phi","text":"baysianVARs_prior_phi-object.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/specify_prior_phi.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Specify prior on PHI — specify_prior_phi","text":"details concerning prior-elicitation VARs please see Gruber & Kastner (2023). Currently one can choose six hierarchical shrinkage priors normal prior: prior=\"HS\" stands Horseshoe-prior, prior=\"R2D2 R\\(^2\\)-induced-Dirichlet-decompostion-prior, prior=\"NG\" normal-gamma-prior, prior=\"DL\" Dirichlet-Laplace-prior, prior=\"SSVS\" stochastic-search-variable-selection-prior, prior=\"HMP\" semi-hierarchical Minnesota prior prior=normal normal-prior. Semi-global shrinkage, .e. group-specific shrinkage pre-specified subgroups coefficients, can achieved argument global_grouping.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/specify_prior_phi.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Specify prior on PHI — specify_prior_phi","text":"Gruber, L. Kastner, G. (2023). Forecasting macroeconomic data Bayesian VARs: Sparse dense? depends! arXiv:2206.04902.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/specify_prior_phi.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Specify prior on PHI — specify_prior_phi","text":"","code":"# Access a subset of the usmacro_growth dataset data <- usmacro_growth[,c(\"GDPC1\", \"CPIAUCSL\", \"FEDFUNDS\")] # Horseshoe prior for a VAR(2) phi_hs <- specify_prior_phi(data = data, lags = 2L ,prior = \"HS\") # Semi-global-local Horseshoe prior for a VAR(2) with semi-global shrinkage parameters for # cross-lag and own-lag coefficients in each lag phi_hs_sg <- specify_prior_phi(data = data, lags = 2L, prior = \"HS\", global_grouping = \"olcl-lagwise\") # Semi-global-local Horseshoe prior for a VAR(2) with equation-wise shrinkage # construct indicator matrix for equation-wise shrinkage semi_global_mat <- matrix(1:ncol(data), 2*ncol(data), ncol(data), byrow = TRUE) phi_hs_ew <- specify_prior_phi(data = data, lags = 2L, prior = \"HS\", global_grouping = semi_global_mat) # (for equation-wise shrinkage one can also use 'global_grouping = \"equation-wise\"') # \\donttest{ # Estimate model with your prior configuration of choice mod <- bvar(data, lags = 2L, prior_phi = phi_hs_sg, quiet = TRUE) # }"},{"path":"https://luisgruber.github.io/bayesianVARs/reference/specify_prior_sigma.html","id":null,"dir":"Reference","previous_headings":"","what":"Specify prior on Sigma — specify_prior_sigma","title":"Specify prior on Sigma — specify_prior_sigma","text":"Configures prior variance-covariance VAR.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/specify_prior_sigma.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Specify prior on Sigma — specify_prior_sigma","text":"","code":"specify_prior_sigma( data = NULL, M = ncol(data), type = c(\"factor\", \"cholesky\"), factor_factors = 1L, factor_restrict = c(\"none\", \"upper\"), factor_priorfacloadtype = c(\"rowwiseng\", \"colwiseng\", \"normal\"), factor_priorfacload = 0.1, factor_facloadtol = 1e-18, factor_priorng = c(1, 1), factor_priormu = c(0, 10), factor_priorphiidi = c(10, 3), factor_priorphifac = c(10, 3), factor_priorsigmaidi = 1, factor_priorsigmafac = 1, factor_priorh0idi = \"stationary\", factor_priorh0fac = \"stationary\", factor_heteroskedastic = TRUE, factor_priorhomoskedastic = NA, factor_interweaving = 4, cholesky_U_prior = c(\"HS\", \"DL\", \"R2D2\", \"NG\", \"SSVS\", \"normal\", \"HMP\"), cholesky_U_tol = 1e-18, cholesky_heteroscedastic = TRUE, cholesky_priormu = c(0, 100), cholesky_priorphi = c(20, 1.5), cholesky_priorsigma2 = c(0.5, 0.5), cholesky_priorh0 = \"stationary\", cholesky_priorhomoscedastic = as.numeric(NA), cholesky_DL_a = \"1/n\", cholesky_DL_tol = 0, cholesky_R2D2_a = 0.4, cholesky_R2D2_b = 0.5, cholesky_R2D2_tol = 0, cholesky_NG_a = 0.5, cholesky_NG_b = 0.5, cholesky_NG_c = 0.5, cholesky_NG_tol = 0, cholesky_SSVS_c0 = 0.001, cholesky_SSVS_c1 = 1, cholesky_SSVS_p = 0.5, cholesky_HMP_lambda3 = c(0.01, 0.01), cholesky_normal_sds = 10, expert_sv_offset = 0, quiet = FALSE, ... )"},{"path":"https://luisgruber.github.io/bayesianVARs/reference/specify_prior_sigma.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Specify prior on Sigma — specify_prior_sigma","text":"data Optional. Data matrix (can time series object). \\(M\\) columns assumed contain single time-series length \\(T\\). M positive integer indicating number time-series VAR. type character, one \"factor\" (default) \"cholesky\", indicating decomposition applied covariance-matrix. factor_factors Number latent factors estimated. required type=\"factor\". factor_restrict Either \"upper\" \"none\", indicating whether factor loadings matrix restricted zeros diagonal (\"upper\") whether elements estimated data (\"none\"). Setting restrict \"upper\" often stabilizes MCMC estimation can important identifying factor loadings matrix, however, generally strong prior assumption. Setting restrict \"none\" usually preferred option identification factor loadings matrix less concern covariance estimation prediction goal. required type=\"factor\". factor_priorfacloadtype Can \"normal\", \"rowwiseng\", \"colwiseng\". required type=\"factor\". \"normal\": Normal prior. value priorfacload interpreted standard deviations Gaussian prior distributions factor loadings. \"rowwiseng\": Row-wise Normal-Gamma prior. value priorfacload interpreted shrinkage parameter . \"colwiseng\": Column-wise Normal-Gamma prior. value priorfacload interpreted shrinkage parameter . details please see Kastner (2019). factor_priorfacload Either matrix dimensions M times factor_factors positive elements single number (recycled accordingly). required type=\"factor\". meaning factor_priorfacload depends setting factor_priorfacloadtype explained . factor_facloadtol Minimum number absolute value factor loadings draw can take. Prevents numerical issues can appear strong shrinkage enforced chosen greater zero. required type=\"factor\". factor_priorng Two-element vector positive entries indicating Normal-Gamma prior's hyperhyperparameters c d (cf. Kastner (2019)). required type=\"factor\". factor_priormu Vector length 2 denoting prior mean standard deviation unconditional levels idiosyncratic log variance processes. required type=\"factor\". factor_priorphiidi Vector length 2, indicating shape parameters Beta prior distributions transformed parameters (phi+1)/2, phi denotes persistence idiosyncratic log variances. required type=\"factor\". factor_priorphifac Vector length 2, indicating shape parameters Beta prior distributions transformed parameters (phi+1)/2, phi denotes persistence factor log variances. required type=\"factor\". factor_priorsigmaidi Vector length M containing prior volatilities log variances. factor_priorsigmaidi exactly one element, recycled idiosyncratic log variances. required type=\"factor\". factor_priorsigmafac Vector length factor_factors containing prior volatilities log variances. factor_priorsigmafac exactly one element, recycled factor log variances. required type=\"factor\". factor_priorh0idi Vector length 1 M, containing information Gaussian prior initial idiosyncratic log variances. required type=\"factor\". element factor_priorh0idi nonnegative number, conditional prior corresponding initial log variance h0 assumed Gaussian mean 0 standard deviation factor_priorh0idi times \\(sigma\\). element factor_priorh0idi string 'stationary', prior corresponding initial log volatility taken stationary distribution, .e. h0 assumed Gaussian mean 0 variance \\(sigma^2/(1-phi^2)\\). factor_priorh0fac Vector length 1 factor_factors, containing information Gaussian prior initial factor log variances. required type=\"factor\". element factor_priorh0fac nonnegative number, conditional prior corresponding initial log variance h0 assumed Gaussian mean 0 standard deviation factor_priorh0fac times \\(sigma\\). element factor_priorh0fac string 'stationary', prior corresponding initial log volatility taken stationary distribution, .e. h0 assumed Gaussian mean 0 variance \\(sigma^2/(1-phi^2)\\). factor_heteroskedastic Vector length 1, 2, M + factor_factors, containing logical values indicating whether time-varying (factor_heteroskedastic = TRUE) constant (factor_heteroskedastic = FALSE) variance estimated. factor_heteroskedastic length 2 recycled accordingly, whereby first element used idiosyncratic variances second element used factor variances. required type=\"factor\". factor_priorhomoskedastic used least one element factor_heteroskedastic set FALSE. case, factor_priorhomoskedastic must matrix positive entries dimension c(M, 2). Values column 1 interpreted shape values column 2 interpreted rate parameter corresponding inverse gamma prior distribution idiosyncratic variances. required type=\"factor\". factor_interweaving following values interweaving factor loadings accepted (required type=\"factor\"): 0: interweaving. 1: Shallow interweaving diagonal entries. 2: Deep interweaving diagonal entries. 3: Shallow interweaving largest absolute entries column. 4: Deep interweaving largest absolute entries column. details please see Kastner et al. (2017). value 4 highly recommended default. cholesky_U_prior character, one \"HS\", \"R2D2\", \"NG\", \"DL\", \"SSVS\", \"HMP\" \"normal\". required type=\"cholesky\". cholesky_U_tol Minimum number absolute value free -diagonal element \\(U\\)-draw can take. Prevents numerical issues can appear strong shrinkage enforced chosen greater zero. required type=\"cholesky\". cholesky_heteroscedastic single logical indicating whether time-varying (cholesky_heteroscedastic = TRUE) constant (cholesky_heteroscedastic = FALSE) variance estimated. required type=\"cholesky\". cholesky_priormu Vector length 2 denoting prior mean standard deviation unconditional levels log variance processes. required type=\"cholesky\". cholesky_priorphi Vector length 2, indicating shape parameters Beta prior distributions transformed parameters (phi+1)/2, phi denotes persistence log variances. required type=\"cholesky\". cholesky_priorsigma2 Vector length 2, indicating shape rate Gamma prior distributions variance log variance processes. (Currently one global setting \\(M\\) processes supported). required type=\"cholesky\". cholesky_priorh0 Vector length 1 M, containing information Gaussian prior initial idiosyncratic log variances. required type=\"cholesky\". element cholesky_priorh0 nonnegative number, conditional prior corresponding initial log variance h0 assumed Gaussian mean 0 standard deviation cholesky_priorh0 times \\(sigma\\). element cholesky_priorh0 string 'stationary', prior corresponding initial log volatility taken stationary distribution, .e. h0 assumed Gaussian mean 0 variance \\(sigma^2/(1-phi^2)\\). cholesky_priorhomoscedastic used cholesky_heteroscedastic=FALSE. case, cholesky_priorhomoscedastic must matrix positive entries dimension c(M, 2). Values column 1 interpreted shape values column 2 interpreted scale parameter corresponding inverse gamma prior distribution variances. required type=\"cholesky\". cholesky_DL_a (Single) positive real number. value interpreted concentration parameter local scales. Smaller values enforce heavier shrinkage. matrix dimension c(s,2) specifies discrete hyperprior, first column contains s support points second column contains associated prior probabilities. cholesky_DL_a specified cholesky_U_prior=\"DL\". cholesky_DL_tol Minimum number parameter draw one shrinking parameters Dirichlet Laplace prior can take. Prevents numerical issues can appear strong shrinkage enforced chosen greater zero. DL_tol specified cholesky_U_prior=\"DL\". cholesky_R2D2_a (Single) positive real number. value interpreted concentration parameter local scales. Smaller values enforce heavier shrinkage. matrix dimension c(s,2) specifies discrete hyperprior, first column contains s support points second column contains associated prior probabilities. cholesky_R2D2_a specified cholesky_U_prior=\"R2D2\". cholesky_R2D2_b single positive number, greater values indicate heavier regularization. cholesky_R2D2_b specified cholesky_U_prior=\"R2D2\". cholesky_R2D2_tol Minimum number parameter draw one shrinking parameters R2D2 prior can take. Prevents numerical issues can appear strong shrinkage enforced chosen greater zero. cholesky_R2D2_tol specified cholesky_U_prior=\"R2D2\". cholesky_NG_a (Single) positive real number. value interpreted concentration parameter local scales. Smaller values enforce heavier shrinkage. matrix dimension c(s,2) specifies discrete hyperprior, first column contains s support points second column contains associated prior probabilities. cholesky_NG_a specified cholesky_U_prior=\"NG\". cholesky_NG_b (Single) positive real number. value indicates shape parameter inverse gamma prior global scales. cholesky_NG_b specified cholesky_U_prior=\"NG\". cholesky_NG_c (Single) positive real number. value indicates scale parameter inverse gamma prior global scales. Expert option set scale parameter proportional NG_a. E.g. case discrete hyperprior NG_a chosen, desired proportion say 0.2 achieved setting NG_c=\"0.2a\" (character input!). cholesky_NG_c specified cholesky_U_prior=\"NG\". cholesky_NG_tol Minimum number parameter draw one shrinking parameters normal-gamma prior can take. Prevents numerical issues can appear strong shrinkage enforced chosen greater zero. cholesky_NG_tol specified cholesky_U_prior=\"NG\". cholesky_SSVS_c0 single positive number indicating (unscaled) standard deviation spike component. cholesky_SSVS_c0 specified choleksy_U_prior=\"SSVS\". \\(SSVS_{c0} \\ll SSVS_{c1}\\)! cholesky_SSVS_c1 single positive number indicating (unscaled) standard deviation slab component. cholesky_SSVS_c1 specified choleksy_U_prior=\"SSVS\". \\(SSVS_{c0} \\ll SSVS_{c1}\\)! cholesky_SSVS_p Either single positive number range (0,1) indicating (fixed) prior inclusion probability coefficient. numeric vector length 2 positive entries indicating shape parameters Beta distribution. case Beta hyperprior placed prior inclusion probability. cholesky_SSVS_p specified choleksy_U_prior=\"SSVS\". cholesky_HMP_lambda3 numeric vector length 2. entries must positive. first indicates shape second rate Gamma hyperprior contemporaneous coefficients. cholesky_HMP_lambda3 specified choleksy_U_prior=\"HMP\". cholesky_normal_sds numeric vector length \\(\\frac{M^2-M}{2}\\), indicating prior variances free -diagonal elements \\(U\\). single number recycled accordingly! Must positive. cholesky_normal_sds specified choleksy_U_prior=\"normal\". expert_sv_offset ... use! quiet logical indicating whether informative output omitted. ... use!","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/specify_prior_sigma.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Specify prior on Sigma — specify_prior_sigma","text":"Object class bayesianVARs_prior_sigma.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/specify_prior_sigma.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Specify prior on Sigma — specify_prior_sigma","text":"bvar offers two different specifications errors: user can choose factor stochastic volatility structure cholesky stochastic volatility structure. cases disturbances \\(\\boldsymbol{\\epsilon}_t\\) assumed follow \\(M\\)-dimensional multivariate normal distribution zero mean variance-covariance matrix \\(\\boldsymbol{\\Sigma}_t\\). case cholesky specification \\(\\boldsymbol{\\Sigma}_t = \\boldsymbol{U}^{\\prime -1} \\boldsymbol{D}_t \\boldsymbol{U}^{-1}\\), \\(\\boldsymbol{U}^{-1}\\) upper unitriangular (ones diagonal). diagonal matrix \\(\\boldsymbol{D}_t\\) depends upon latent log-variances, .e. \\(\\boldsymbol{D}_t=diag(exp(h_{1t}),\\dots, exp(h_{Mt})\\). log-variances follow priori independent autoregressive processes \\(h_{}\\sim N(\\mu_i + \\phi_i(h_{,t-1}-\\mu_i),\\sigma_i^2)\\) \\(=1,\\dots,M\\). case factor structure, \\(\\boldsymbol{\\Sigma}_t = \\boldsymbol{\\Lambda} \\boldsymbol{V}_t \\boldsymbol{\\Lambda}^\\prime + \\boldsymbol{G}_t\\). diagonal matrices \\(\\boldsymbol{V}_t\\) \\(\\boldsymbol{G}_t\\) depend upon latent log-variances, .e. \\(\\boldsymbol{G}_t=diag(exp(h_{1t}),\\dots, exp(h_{Mt})\\) \\(\\boldsymbol{V}_t=diag(exp(h_{M+1,t}),\\dots, exp(h_{M+r,t})\\). log-variances follow priori independent autoregressive processes \\(h_{}\\sim N(\\mu_i + \\phi_i(h_{,t-1}-\\mu_i),\\sigma_i^2)\\) \\(=1,\\dots,M\\) \\(h_{M+j,t}\\sim N(\\phi_ih_{M+j,t-1},\\sigma_{M+j}^2)\\) \\(j=1,\\dots,r\\).","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/specify_prior_sigma.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Specify prior on Sigma — specify_prior_sigma","text":"Kastner, G. (2019). Sparse Bayesian Time-Varying Covariance Estimation Many Dimensions Journal Econometrics, 210(1), 98--115, doi:10.1016/j.jeconom.2018.11.007 Kastner, G., Frühwirth-Schnatter, S., Lopes, H.F. (2017). Efficient Bayesian Inference Multivariate Factor Stochastic Volatility Models. Journal Computational Graphical Statistics, 26(4), 905--917, doi:10.1080/10618600.2017.1322091 .","code":""},{"path":[]},{"path":"https://luisgruber.github.io/bayesianVARs/reference/specify_prior_sigma.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Specify prior on Sigma — specify_prior_sigma","text":"","code":"# Access a subset of the usmacro_growth dataset data <- usmacro_growth[,c(\"GDPC1\", \"CPIAUCSL\", \"FEDFUNDS\")] # examples with stochastic volatility (heteroscedasticity) ----------------- # factor-decomposition with 2 factors and colwise normal-gamma prior on the loadings sigma_factor_cng_sv <- specify_prior_sigma(data = data, type = \"factor\", factor_factors = 2L, factor_priorfacloadtype = \"colwiseng\", factor_heteroskedastic = TRUE) #> #> Since argument 'type' is specified with 'factor', all arguments starting with 'cholesky_' are being ignored. # cholesky-decomposition with Dirichlet-Laplace prior on U sigma_cholesky_dl_sv <- specify_prior_sigma(data = data, type = \"cholesky\", cholesky_U_prior = \"DL\", cholesky_DL_a = 0.5, cholesky_heteroscedastic = TRUE) #> #> Since argument 'type' is specified with 'cholesky', all arguments starting with 'factor_' are being ignored. # examples without stochastic volatility (homoscedasticity) ---------------- # factor-decomposition with 2 factors and colwise normal-gamma prior on the loadings sigma_factor_cng <- specify_prior_sigma(data = data, type = \"factor\", factor_factors = 2L, factor_priorfacloadtype = \"colwiseng\", factor_heteroskedastic = FALSE, factor_priorhomoskedastic = matrix(c(0.5,0.5), ncol(data), 2)) #> #> Since argument 'type' is specified with 'factor', all arguments starting with 'cholesky_' are being ignored. #> #> Cannot do deep factor_interweaving if (some) factor_factors are homoskedastic. Setting 'factor_interweaving' to 3. # cholesky-decomposition with Horseshoe prior on U sigma_cholesky_dl <- specify_prior_sigma(data = data, type = \"cholesky\", cholesky_U_prior = \"HS\", cholesky_heteroscedastic = FALSE) #> #> Since argument 'type' is specified with 'cholesky', all arguments starting with 'factor_' are being ignored. #> #> Argument 'cholesky_priorhomoscedastic' not specified. Setting both shape and rate of inverse gamma prior equal to 0.01. # \\donttest{ # Estimate model with your prior configuration of choice mod <- bvar(data, prior_sigma = sigma_factor_cng_sv, quiet = TRUE) # }"},{"path":"https://luisgruber.github.io/bayesianVARs/reference/stable_bvar.html","id":null,"dir":"Reference","previous_headings":"","what":"Stable posterior draws — stable_bvar","title":"Stable posterior draws — stable_bvar","text":"stable_bvar() detects discards posterior draws bayesianVARs_bvar object fulfill stability condition: VAR(p) model considered stable eigenvalues companion form matrix lie inside unit circle.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/stable_bvar.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Stable posterior draws — stable_bvar","text":"","code":"stable_bvar(object, quiet = FALSE)"},{"path":"https://luisgruber.github.io/bayesianVARs/reference/stable_bvar.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Stable posterior draws — stable_bvar","text":"object bayesianVARs_bvar object obtained via bvar(). quiet logical indicating whether informative output omitted.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/stable_bvar.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Stable posterior draws — stable_bvar","text":"object type bayesianVARs_bvar.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/stable_bvar.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Stable posterior draws — stable_bvar","text":"","code":"# Access a subset of the usmacro_growth dataset data <- usmacro_growth[,c(\"GDPC1\", \"CPIAUCSL\", \"FEDFUNDS\")] # Estimate a model mod <- bvar(data, sv_keep = \"all\", quiet = TRUE) # Discard \"unstable\" draws stable_mod <- stable_bvar(mod) #> #> Original 'bayesianVARs_bvar' object consists of 1000 posterior draws. #> #> Detected 475 unstable draws. #> #> Remaining draws: 525 !"},{"path":"https://luisgruber.github.io/bayesianVARs/reference/sub-.bayesianVARs_coef.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract or Replace Parts of a bayesianVARs_coef object — [.bayesianVARs_coef","title":"Extract or Replace Parts of a bayesianVARs_coef object — [.bayesianVARs_coef","text":"Extract replace parts bayesianVARs_coef object.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/sub-.bayesianVARs_coef.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract or Replace Parts of a bayesianVARs_coef object — [.bayesianVARs_coef","text":"","code":"# S3 method for bayesianVARs_coef [(x, i, j, ...)"},{"path":"https://luisgruber.github.io/bayesianVARs/reference/sub-.bayesianVARs_coef.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract or Replace Parts of a bayesianVARs_coef object — [.bayesianVARs_coef","text":"x object type bayesianVARs_coef. indices j indices ... indices","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/sub-.bayesianVARs_coef.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extract or Replace Parts of a bayesianVARs_coef object — [.bayesianVARs_coef","text":"object type bayesianVARs_coef.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/sub-.bayesianVARs_coef.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Extract or Replace Parts of a bayesianVARs_coef object — [.bayesianVARs_coef","text":"","code":"# Access a subset of the usmacro_growth dataset data <- usmacro_growth[,c(\"GDPC1\", \"CPIAUCSL\", \"FEDFUNDS\")] # Estimate a model mod <- bvar(data, sv_keep = \"all\", quiet = TRUE) # Extract coefficients, which are of class bayesianVARs_coef phi <- coef(mod) phi[1,1,1] #> [1] 0.2644423 #> attr(,\"class\") #> [1] \"bayesianVARs_coef\" \"bayesianVARs_draws\""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/sub-.bayesianVARs_draws.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract or Replace Parts of a bayesianVARs_draws object — [.bayesianVARs_draws","title":"Extract or Replace Parts of a bayesianVARs_draws object — [.bayesianVARs_draws","text":"Extract replace parts bayesianVARs_draws object.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/sub-.bayesianVARs_draws.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract or Replace Parts of a bayesianVARs_draws object — [.bayesianVARs_draws","text":"","code":"# S3 method for bayesianVARs_draws [(x, i, j, ...)"},{"path":"https://luisgruber.github.io/bayesianVARs/reference/sub-.bayesianVARs_draws.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract or Replace Parts of a bayesianVARs_draws object — [.bayesianVARs_draws","text":"x object type bayesianVARs_draws. indices j indices ... indices","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/sub-.bayesianVARs_draws.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extract or Replace Parts of a bayesianVARs_draws object — [.bayesianVARs_draws","text":"object type bayesianVARs_draws.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/sub-.bayesianVARs_draws.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Extract or Replace Parts of a bayesianVARs_draws object — [.bayesianVARs_draws","text":"","code":"# Access a subset of the usmacro_growth dataset data <- usmacro_growth[,c(\"GDPC1\", \"CPIAUCSL\", \"FEDFUNDS\")] # Estimate a model mod <- bvar(data, sv_keep = \"all\", quiet = TRUE) # Extract coefficients, which are of class bayesianVARs_draws phi <- coef(mod) phi[1,1,1] #> [1] 0.2662653 #> attr(,\"class\") #> [1] \"bayesianVARs_coef\" \"bayesianVARs_draws\""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/summary.bayesianVARs_bvar.html","id":null,"dir":"Reference","previous_headings":"","what":"Summary method for bayesianVARs_bvar objects — summary.bayesianVARs_bvar","title":"Summary method for bayesianVARs_bvar objects — summary.bayesianVARs_bvar","text":"Summary method bayesianVARs_bvar objects.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/summary.bayesianVARs_bvar.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Summary method for bayesianVARs_bvar objects — summary.bayesianVARs_bvar","text":"","code":"# S3 method for bayesianVARs_bvar summary(object, quantiles = c(0.025, 0.25, 0.5, 0.75, 0.975), ...)"},{"path":"https://luisgruber.github.io/bayesianVARs/reference/summary.bayesianVARs_bvar.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Summary method for bayesianVARs_bvar objects — summary.bayesianVARs_bvar","text":"object bayesianVARs_bvar object obtained via bvar(). quantiles numeric vector quantiles compute. ... Currently ignored!","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/summary.bayesianVARs_bvar.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Summary method for bayesianVARs_bvar objects — summary.bayesianVARs_bvar","text":"object type summary.bayesianVARs_bvar.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/summary.bayesianVARs_bvar.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Summary method for bayesianVARs_bvar objects — summary.bayesianVARs_bvar","text":"","code":"# Access a subset of the usmacro_growth dataset data <- usmacro_growth[,c(\"GDPC1\", \"CPIAUCSL\", \"FEDFUNDS\")] # Estimate model mod <- bvar(data, quiet = TRUE) # Summary sum <- summary(mod)"},{"path":"https://luisgruber.github.io/bayesianVARs/reference/summary.bayesianVARs_draws.html","id":null,"dir":"Reference","previous_headings":"","what":"Summary statistics for bayesianVARs posterior draws. — summary.bayesianVARs_draws","title":"Summary statistics for bayesianVARs posterior draws. — summary.bayesianVARs_draws","text":"Summary statistics bayesianVARs posterior draws.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/summary.bayesianVARs_draws.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Summary statistics for bayesianVARs posterior draws. — summary.bayesianVARs_draws","text":"","code":"# S3 method for bayesianVARs_draws summary(object, quantiles = c(0.25, 0.5, 0.75), ...)"},{"path":"https://luisgruber.github.io/bayesianVARs/reference/summary.bayesianVARs_draws.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Summary statistics for bayesianVARs posterior draws. — summary.bayesianVARs_draws","text":"object object class bayesianVARs_draws usually obtained extractors like coef.bayesianVARs_bvar() vcov.bayesianVARs_bvar(). quantiles vector quantiles evaluate. ... Currently ignored.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/summary.bayesianVARs_draws.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Summary statistics for bayesianVARs posterior draws. — summary.bayesianVARs_draws","text":"list object class bayesianVARs_draws_summary holding mean: Vector matrix containing posterior mean. sd: Vector matrix containing posterior standard deviation . quantiles: Array containing posterior quantiles.","code":""},{"path":[]},{"path":"https://luisgruber.github.io/bayesianVARs/reference/summary.bayesianVARs_draws.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Summary statistics for bayesianVARs posterior draws. — summary.bayesianVARs_draws","text":"","code":"# Access a subset of the usmacro_growth dataset data <- usmacro_growth[,c(\"GDPC1\", \"CPIAUCSL\", \"FEDFUNDS\")] # Estimate a model mod <- bvar(data, sv_keep = \"all\", quiet = TRUE) # Extract posterior draws of VAR coefficients bvar_coefs <- coef(mod) # Compute summary statistics summary_stats <- summary(bvar_coefs) # Compute summary statistics of VAR coefficients without using coef() summary_stats <- summary(mod$PHI) # Test which list elements of 'mod' are of class 'bayesianVARs_draws'. names(mod)[sapply(names(mod), function(x) inherits(mod[[x]], \"bayesianVARs_draws\"))] #> [1] \"PHI\" \"U\" \"logvar\" \"sv_para\" \"facload\" \"fac\""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/summary.bayesianVARs_predict.html","id":null,"dir":"Reference","previous_headings":"","what":"Summary method for bayesianVARs_predict objects — summary.bayesianVARs_predict","title":"Summary method for bayesianVARs_predict objects — summary.bayesianVARs_predict","text":"Summary method bayesianVARs_predict objects.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/summary.bayesianVARs_predict.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Summary method for bayesianVARs_predict objects — summary.bayesianVARs_predict","text":"","code":"# S3 method for bayesianVARs_predict summary(object, ...)"},{"path":"https://luisgruber.github.io/bayesianVARs/reference/summary.bayesianVARs_predict.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Summary method for bayesianVARs_predict objects — summary.bayesianVARs_predict","text":"object bayesianVARs_predict object obtained via predict.bayesianVARs_bvar(). ... Currently ignored!","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/summary.bayesianVARs_predict.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Summary method for bayesianVARs_predict objects — summary.bayesianVARs_predict","text":"summary.bayesianVARs_predict object.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/summary.bayesianVARs_predict.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Summary method for bayesianVARs_predict objects — summary.bayesianVARs_predict","text":"","code":"# Access a subset of the usmacro_growth dataset data <- usmacro_growth[,c(\"GDPC1\", \"CPIAUCSL\", \"FEDFUNDS\")] # Split data in train and test train <- data[1:(nrow(data)-4),] test <- data[-c(1:(nrow(data)-4)),] # Estimate model using train data only mod <- bvar(train, quiet = TRUE) # Simulate from 1-step ahead posterior predictive predictions <- predict(mod, ahead = 1L) #> 'stable=TRUE': Calling 'stable_bvar()' to discard those posterior #> draws, that do not fulfill the stable criterion. #> #> 597 stable posterior draws remaining for prediction! summary(predictions) #> #> Prediction quantiles: #> , , GDPC1 #> #> t+1 #> 5% -0.06623 #> 50% -0.02089 #> 95% 0.02220 #> #> , , CPIAUCSL #> #> t+1 #> 5% -0.019613 #> 50% -0.008145 #> 95% 0.003785 #> #> , , FEDFUNDS #> #> t+1 #> 5% -0.022382 #> 50% -0.003965 #> 95% 0.013119 #>"},{"path":"https://luisgruber.github.io/bayesianVARs/reference/usmacro_growth.html","id":null,"dir":"Reference","previous_headings":"","what":"Data from the US-economy — usmacro_growth","title":"Data from the US-economy — usmacro_growth","text":"21 selected quarterly time-series 1953:Q1 2021:Q2. FRED-QD data base (McCracken Ng, 2021). Release date 2021-07. Data transformed interpreted growth-rates (first log-differences exception interest rates, already growth rates).","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/usmacro_growth.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Data from the US-economy — usmacro_growth","text":"","code":"usmacro_growth"},{"path":"https://luisgruber.github.io/bayesianVARs/reference/usmacro_growth.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Data from the US-economy — usmacro_growth","text":"matrix 247 rows 21 columns.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/usmacro_growth.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Data from the US-economy — usmacro_growth","text":"Raw (untransformed) data available https://research.stlouisfed.org/econ/mccracken/fred-databases/, https://files.stlouisfed.org/files/htdocs/fred-md/quarterly/2021-07.csv.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/usmacro_growth.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Data from the US-economy — usmacro_growth","text":"McCracken, M. W. Ng, S. (2021). FRED-QD: Quarterly Database Macroeconomic Research, Review, Federal Reserve Bank St. Louis, 103(1), 1--44, doi:10.20955/r.103.1-44 .","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/vcov.bayesianVARs_bvar.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract posterior draws of the (time-varying) variance-covariance matrix for\na VAR model — vcov.bayesianVARs_bvar","title":"Extract posterior draws of the (time-varying) variance-covariance matrix for\na VAR model — vcov.bayesianVARs_bvar","text":"Returns posterior draws possibly time-varying variance-covariance matrix VAR estimated via bvar(). Returns full paths sv_keep=\"\" calling bvar(). Otherwise, draws variance-covariance matrix last observation returned, .","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/vcov.bayesianVARs_bvar.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract posterior draws of the (time-varying) variance-covariance matrix for\na VAR model — vcov.bayesianVARs_bvar","text":"","code":"# S3 method for bayesianVARs_bvar vcov(object, ...)"},{"path":"https://luisgruber.github.io/bayesianVARs/reference/vcov.bayesianVARs_bvar.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract posterior draws of the (time-varying) variance-covariance matrix for\na VAR model — vcov.bayesianVARs_bvar","text":"object object class bayesianVARs_bvar obtained via bvar(). ... Currently ignored.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/vcov.bayesianVARs_bvar.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extract posterior draws of the (time-varying) variance-covariance matrix for\na VAR model — vcov.bayesianVARs_bvar","text":"array class bayesianVARs_draws dimension \\(T \\times M \\times M \\times draws\\), \\(T\\) number observations, \\(M\\) number time-series \\(draws\\) number stored posterior draws.","code":""},{"path":[]},{"path":"https://luisgruber.github.io/bayesianVARs/reference/vcov.bayesianVARs_bvar.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Extract posterior draws of the (time-varying) variance-covariance matrix for\na VAR model — vcov.bayesianVARs_bvar","text":"","code":"# Access a subset of the usmacro_growth dataset data <- usmacro_growth[,c(\"GDPC1\", \"CPIAUCSL\", \"FEDFUNDS\")] # Estimate a model mod <- bvar(data, sv_keep = \"all\", quiet = TRUE) # Extract posterior draws of the variance-covariance matrix bvar_vcov <- vcov(mod)"},{"path":"https://luisgruber.github.io/bayesianVARs/news/index.html","id":"bayesianvars-011","dir":"Changelog","previous_headings":"","what":"bayesianVARs 0.1.1","title":"bayesianVARs 0.1.1","text":"CRAN release: 2024-01-17 Fixed clang-UBSAN issue. Fixed undefined figure references vignette.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/news/index.html","id":"bayesianvars-010","dir":"Changelog","previous_headings":"","what":"bayesianVARs 0.1.0","title":"bayesianVARs 0.1.0","text":"CRAN release: 2024-01-13 Initial CRAN submission.","code":""}] +[{"path":"https://luisgruber.github.io/bayesianVARs/LICENSE.html","id":null,"dir":"","previous_headings":"","what":"GNU General Public License","title":"GNU General Public License","text":"Version 3, 29 June 2007Copyright © 2007 Free Software Foundation, Inc. Everyone permitted copy distribute verbatim copies license document, changing allowed.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/LICENSE.html","id":"preamble","dir":"","previous_headings":"","what":"Preamble","title":"GNU General Public License","text":"GNU General Public License free, copyleft license software kinds works. licenses software practical works designed take away freedom share change works. contrast, GNU General Public License intended guarantee freedom share change versions program–make sure remains free software users. , Free Software Foundation, use GNU General Public License software; applies also work released way authors. can apply programs, . speak free software, referring freedom, price. General Public Licenses designed make sure freedom distribute copies free software (charge wish), receive source code can get want , can change software use pieces new free programs, know can things. protect rights, need prevent others denying rights asking surrender rights. Therefore, certain responsibilities distribute copies software, modify : responsibilities respect freedom others. example, distribute copies program, whether gratis fee, must pass recipients freedoms received. must make sure , , receive can get source code. must show terms know rights. Developers use GNU GPL protect rights two steps: (1) assert copyright software, (2) offer License giving legal permission copy, distribute /modify . developers’ authors’ protection, GPL clearly explains warranty free software. users’ authors’ sake, GPL requires modified versions marked changed, problems attributed erroneously authors previous versions. devices designed deny users access install run modified versions software inside , although manufacturer can . fundamentally incompatible aim protecting users’ freedom change software. systematic pattern abuse occurs area products individuals use, precisely unacceptable. Therefore, designed version GPL prohibit practice products. problems arise substantially domains, stand ready extend provision domains future versions GPL, needed protect freedom users. Finally, every program threatened constantly software patents. States allow patents restrict development use software general-purpose computers, , wish avoid special danger patents applied free program make effectively proprietary. prevent , GPL assures patents used render program non-free. precise terms conditions copying, distribution modification follow.","code":""},{"path":[]},{"path":"https://luisgruber.github.io/bayesianVARs/LICENSE.html","id":"id_0-definitions","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"0. Definitions","title":"GNU General Public License","text":"“License” refers version 3 GNU General Public License. “Copyright” also means copyright-like laws apply kinds works, semiconductor masks. “Program” refers copyrightable work licensed License. licensee addressed “”. “Licensees” “recipients” may individuals organizations. “modify” work means copy adapt part work fashion requiring copyright permission, making exact copy. resulting work called “modified version” earlier work work “based ” earlier work. “covered work” means either unmodified Program work based Program. “propagate” work means anything , without permission, make directly secondarily liable infringement applicable copyright law, except executing computer modifying private copy. Propagation includes copying, distribution (without modification), making available public, countries activities well. “convey” work means kind propagation enables parties make receive copies. Mere interaction user computer network, transfer copy, conveying. interactive user interface displays “Appropriate Legal Notices” extent includes convenient prominently visible feature (1) displays appropriate copyright notice, (2) tells user warranty work (except extent warranties provided), licensees may convey work License, view copy License. interface presents list user commands options, menu, prominent item list meets criterion.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/LICENSE.html","id":"id_1-source-code","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"1. Source Code","title":"GNU General Public License","text":"“source code” work means preferred form work making modifications . “Object code” means non-source form work. “Standard Interface” means interface either official standard defined recognized standards body, , case interfaces specified particular programming language, one widely used among developers working language. “System Libraries” executable work include anything, work whole, () included normal form packaging Major Component, part Major Component, (b) serves enable use work Major Component, implement Standard Interface implementation available public source code form. “Major Component”, context, means major essential component (kernel, window system, ) specific operating system () executable work runs, compiler used produce work, object code interpreter used run . “Corresponding Source” work object code form means source code needed generate, install, (executable work) run object code modify work, including scripts control activities. However, include work’s System Libraries, general-purpose tools generally available free programs used unmodified performing activities part work. example, Corresponding Source includes interface definition files associated source files work, source code shared libraries dynamically linked subprograms work specifically designed require, intimate data communication control flow subprograms parts work. Corresponding Source need include anything users can regenerate automatically parts Corresponding Source. Corresponding Source work source code form work.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/LICENSE.html","id":"id_2-basic-permissions","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"2. Basic Permissions","title":"GNU General Public License","text":"rights granted License granted term copyright Program, irrevocable provided stated conditions met. License explicitly affirms unlimited permission run unmodified Program. output running covered work covered License output, given content, constitutes covered work. License acknowledges rights fair use equivalent, provided copyright law. may make, run propagate covered works convey, without conditions long license otherwise remains force. may convey covered works others sole purpose make modifications exclusively , provide facilities running works, provided comply terms License conveying material control copyright. thus making running covered works must exclusively behalf, direction control, terms prohibit making copies copyrighted material outside relationship . Conveying circumstances permitted solely conditions stated . Sublicensing allowed; section 10 makes unnecessary.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/LICENSE.html","id":"id_3-protecting-users-legal-rights-from-anti-circumvention-law","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"3. Protecting Users’ Legal Rights From Anti-Circumvention Law","title":"GNU General Public License","text":"covered work shall deemed part effective technological measure applicable law fulfilling obligations article 11 WIPO copyright treaty adopted 20 December 1996, similar laws prohibiting restricting circumvention measures. convey covered work, waive legal power forbid circumvention technological measures extent circumvention effected exercising rights License respect covered work, disclaim intention limit operation modification work means enforcing, work’s users, third parties’ legal rights forbid circumvention technological measures.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/LICENSE.html","id":"id_4-conveying-verbatim-copies","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"4. Conveying Verbatim Copies","title":"GNU General Public License","text":"may convey verbatim copies Program’s source code receive , medium, provided conspicuously appropriately publish copy appropriate copyright notice; keep intact notices stating License non-permissive terms added accord section 7 apply code; keep intact notices absence warranty; give recipients copy License along Program. may charge price price copy convey, may offer support warranty protection fee.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/LICENSE.html","id":"id_5-conveying-modified-source-versions","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"5. Conveying Modified Source Versions","title":"GNU General Public License","text":"may convey work based Program, modifications produce Program, form source code terms section 4, provided also meet conditions: ) work must carry prominent notices stating modified , giving relevant date. b) work must carry prominent notices stating released License conditions added section 7. requirement modifies requirement section 4 “keep intact notices”. c) must license entire work, whole, License anyone comes possession copy. License therefore apply, along applicable section 7 additional terms, whole work, parts, regardless packaged. License gives permission license work way, invalidate permission separately received . d) work interactive user interfaces, must display Appropriate Legal Notices; however, Program interactive interfaces display Appropriate Legal Notices, work need make . compilation covered work separate independent works, nature extensions covered work, combined form larger program, volume storage distribution medium, called “aggregate” compilation resulting copyright used limit access legal rights compilation’s users beyond individual works permit. Inclusion covered work aggregate cause License apply parts aggregate.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/LICENSE.html","id":"id_6-conveying-non-source-forms","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"6. Conveying Non-Source Forms","title":"GNU General Public License","text":"may convey covered work object code form terms sections 4 5, provided also convey machine-readable Corresponding Source terms License, one ways: ) Convey object code , embodied , physical product (including physical distribution medium), accompanied Corresponding Source fixed durable physical medium customarily used software interchange. b) Convey object code , embodied , physical product (including physical distribution medium), accompanied written offer, valid least three years valid long offer spare parts customer support product model, give anyone possesses object code either (1) copy Corresponding Source software product covered License, durable physical medium customarily used software interchange, price reasonable cost physically performing conveying source, (2) access copy Corresponding Source network server charge. c) Convey individual copies object code copy written offer provide Corresponding Source. alternative allowed occasionally noncommercially, received object code offer, accord subsection 6b. d) Convey object code offering access designated place (gratis charge), offer equivalent access Corresponding Source way place charge. need require recipients copy Corresponding Source along object code. place copy object code network server, Corresponding Source may different server (operated third party) supports equivalent copying facilities, provided maintain clear directions next object code saying find Corresponding Source. Regardless server hosts Corresponding Source, remain obligated ensure available long needed satisfy requirements. e) Convey object code using peer--peer transmission, provided inform peers object code Corresponding Source work offered general public charge subsection 6d. separable portion object code, whose source code excluded Corresponding Source System Library, need included conveying object code work. “User Product” either (1) “consumer product”, means tangible personal property normally used personal, family, household purposes, (2) anything designed sold incorporation dwelling. determining whether product consumer product, doubtful cases shall resolved favor coverage. particular product received particular user, “normally used” refers typical common use class product, regardless status particular user way particular user actually uses, expects expected use, product. product consumer product regardless whether product substantial commercial, industrial non-consumer uses, unless uses represent significant mode use product. “Installation Information” User Product means methods, procedures, authorization keys, information required install execute modified versions covered work User Product modified version Corresponding Source. information must suffice ensure continued functioning modified object code case prevented interfered solely modification made. convey object code work section , , specifically use , User Product, conveying occurs part transaction right possession use User Product transferred recipient perpetuity fixed term (regardless transaction characterized), Corresponding Source conveyed section must accompanied Installation Information. requirement apply neither third party retains ability install modified object code User Product (example, work installed ROM). requirement provide Installation Information include requirement continue provide support service, warranty, updates work modified installed recipient, User Product modified installed. Access network may denied modification materially adversely affects operation network violates rules protocols communication across network. Corresponding Source conveyed, Installation Information provided, accord section must format publicly documented (implementation available public source code form), must require special password key unpacking, reading copying.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/LICENSE.html","id":"id_7-additional-terms","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"7. Additional Terms","title":"GNU General Public License","text":"“Additional permissions” terms supplement terms License making exceptions one conditions. Additional permissions applicable entire Program shall treated though included License, extent valid applicable law. additional permissions apply part Program, part may used separately permissions, entire Program remains governed License without regard additional permissions. convey copy covered work, may option remove additional permissions copy, part . (Additional permissions may written require removal certain cases modify work.) may place additional permissions material, added covered work, can give appropriate copyright permission. Notwithstanding provision License, material add covered work, may (authorized copyright holders material) supplement terms License terms: ) Disclaiming warranty limiting liability differently terms sections 15 16 License; b) Requiring preservation specified reasonable legal notices author attributions material Appropriate Legal Notices displayed works containing ; c) Prohibiting misrepresentation origin material, requiring modified versions material marked reasonable ways different original version; d) Limiting use publicity purposes names licensors authors material; e) Declining grant rights trademark law use trade names, trademarks, service marks; f) Requiring indemnification licensors authors material anyone conveys material (modified versions ) contractual assumptions liability recipient, liability contractual assumptions directly impose licensors authors. non-permissive additional terms considered “restrictions” within meaning section 10. Program received , part , contains notice stating governed License along term restriction, may remove term. license document contains restriction permits relicensing conveying License, may add covered work material governed terms license document, provided restriction survive relicensing conveying. add terms covered work accord section, must place, relevant source files, statement additional terms apply files, notice indicating find applicable terms. Additional terms, permissive non-permissive, may stated form separately written license, stated exceptions; requirements apply either way.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/LICENSE.html","id":"id_8-termination","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"8. Termination","title":"GNU General Public License","text":"may propagate modify covered work except expressly provided License. attempt otherwise propagate modify void, automatically terminate rights License (including patent licenses granted third paragraph section 11). However, cease violation License, license particular copyright holder reinstated () provisionally, unless copyright holder explicitly finally terminates license, (b) permanently, copyright holder fails notify violation reasonable means prior 60 days cessation. Moreover, license particular copyright holder reinstated permanently copyright holder notifies violation reasonable means, first time received notice violation License (work) copyright holder, cure violation prior 30 days receipt notice. Termination rights section terminate licenses parties received copies rights License. rights terminated permanently reinstated, qualify receive new licenses material section 10.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/LICENSE.html","id":"id_9-acceptance-not-required-for-having-copies","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"9. Acceptance Not Required for Having Copies","title":"GNU General Public License","text":"required accept License order receive run copy Program. Ancillary propagation covered work occurring solely consequence using peer--peer transmission receive copy likewise require acceptance. However, nothing License grants permission propagate modify covered work. actions infringe copyright accept License. Therefore, modifying propagating covered work, indicate acceptance License .","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/LICENSE.html","id":"id_10-automatic-licensing-of-downstream-recipients","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"10. Automatic Licensing of Downstream Recipients","title":"GNU General Public License","text":"time convey covered work, recipient automatically receives license original licensors, run, modify propagate work, subject License. responsible enforcing compliance third parties License. “entity transaction” transaction transferring control organization, substantially assets one, subdividing organization, merging organizations. propagation covered work results entity transaction, party transaction receives copy work also receives whatever licenses work party’s predecessor interest give previous paragraph, plus right possession Corresponding Source work predecessor interest, predecessor can get reasonable efforts. may impose restrictions exercise rights granted affirmed License. example, may impose license fee, royalty, charge exercise rights granted License, may initiate litigation (including cross-claim counterclaim lawsuit) alleging patent claim infringed making, using, selling, offering sale, importing Program portion .","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/LICENSE.html","id":"id_11-patents","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"11. Patents","title":"GNU General Public License","text":"“contributor” copyright holder authorizes use License Program work Program based. work thus licensed called contributor’s “contributor version”. contributor’s “essential patent claims” patent claims owned controlled contributor, whether already acquired hereafter acquired, infringed manner, permitted License, making, using, selling contributor version, include claims infringed consequence modification contributor version. purposes definition, “control” includes right grant patent sublicenses manner consistent requirements License. contributor grants non-exclusive, worldwide, royalty-free patent license contributor’s essential patent claims, make, use, sell, offer sale, import otherwise run, modify propagate contents contributor version. following three paragraphs, “patent license” express agreement commitment, however denominated, enforce patent (express permission practice patent covenant sue patent infringement). “grant” patent license party means make agreement commitment enforce patent party. convey covered work, knowingly relying patent license, Corresponding Source work available anyone copy, free charge terms License, publicly available network server readily accessible means, must either (1) cause Corresponding Source available, (2) arrange deprive benefit patent license particular work, (3) arrange, manner consistent requirements License, extend patent license downstream recipients. “Knowingly relying” means actual knowledge , patent license, conveying covered work country, recipient’s use covered work country, infringe one identifiable patents country reason believe valid. , pursuant connection single transaction arrangement, convey, propagate procuring conveyance , covered work, grant patent license parties receiving covered work authorizing use, propagate, modify convey specific copy covered work, patent license grant automatically extended recipients covered work works based . patent license “discriminatory” include within scope coverage, prohibits exercise , conditioned non-exercise one rights specifically granted License. may convey covered work party arrangement third party business distributing software, make payment third party based extent activity conveying work, third party grants, parties receive covered work , discriminatory patent license () connection copies covered work conveyed (copies made copies), (b) primarily connection specific products compilations contain covered work, unless entered arrangement, patent license granted, prior 28 March 2007. Nothing License shall construed excluding limiting implied license defenses infringement may otherwise available applicable patent law.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/LICENSE.html","id":"id_12-no-surrender-of-others-freedom","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"12. No Surrender of Others’ Freedom","title":"GNU General Public License","text":"conditions imposed (whether court order, agreement otherwise) contradict conditions License, excuse conditions License. convey covered work satisfy simultaneously obligations License pertinent obligations, consequence may convey . example, agree terms obligate collect royalty conveying convey Program, way satisfy terms License refrain entirely conveying Program.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/LICENSE.html","id":"id_13-use-with-the-gnu-affero-general-public-license","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"13. Use with the GNU Affero General Public License","title":"GNU General Public License","text":"Notwithstanding provision License, permission link combine covered work work licensed version 3 GNU Affero General Public License single combined work, convey resulting work. terms License continue apply part covered work, special requirements GNU Affero General Public License, section 13, concerning interaction network apply combination .","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/LICENSE.html","id":"id_14-revised-versions-of-this-license","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"14. Revised Versions of this License","title":"GNU General Public License","text":"Free Software Foundation may publish revised /new versions GNU General Public License time time. new versions similar spirit present version, may differ detail address new problems concerns. version given distinguishing version number. Program specifies certain numbered version GNU General Public License “later version” applies , option following terms conditions either numbered version later version published Free Software Foundation. Program specify version number GNU General Public License, may choose version ever published Free Software Foundation. Program specifies proxy can decide future versions GNU General Public License can used, proxy’s public statement acceptance version permanently authorizes choose version Program. Later license versions may give additional different permissions. However, additional obligations imposed author copyright holder result choosing follow later version.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/LICENSE.html","id":"id_15-disclaimer-of-warranty","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"15. Disclaimer of Warranty","title":"GNU General Public License","text":"WARRANTY PROGRAM, EXTENT PERMITTED APPLICABLE LAW. EXCEPT OTHERWISE STATED WRITING COPYRIGHT HOLDERS /PARTIES PROVIDE PROGRAM “” WITHOUT WARRANTY KIND, EITHER EXPRESSED IMPLIED, INCLUDING, LIMITED , IMPLIED WARRANTIES MERCHANTABILITY FITNESS PARTICULAR PURPOSE. ENTIRE RISK QUALITY PERFORMANCE PROGRAM . PROGRAM PROVE DEFECTIVE, ASSUME COST NECESSARY SERVICING, REPAIR CORRECTION.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/LICENSE.html","id":"id_16-limitation-of-liability","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"16. Limitation of Liability","title":"GNU General Public License","text":"EVENT UNLESS REQUIRED APPLICABLE LAW AGREED WRITING COPYRIGHT HOLDER, PARTY MODIFIES /CONVEYS PROGRAM PERMITTED , LIABLE DAMAGES, INCLUDING GENERAL, SPECIAL, INCIDENTAL CONSEQUENTIAL DAMAGES ARISING USE INABILITY USE PROGRAM (INCLUDING LIMITED LOSS DATA DATA RENDERED INACCURATE LOSSES SUSTAINED THIRD PARTIES FAILURE PROGRAM OPERATE PROGRAMS), EVEN HOLDER PARTY ADVISED POSSIBILITY DAMAGES.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/LICENSE.html","id":"id_17-interpretation-of-sections-15-and-16","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"17. Interpretation of Sections 15 and 16","title":"GNU General Public License","text":"disclaimer warranty limitation liability provided given local legal effect according terms, reviewing courts shall apply local law closely approximates absolute waiver civil liability connection Program, unless warranty assumption liability accompanies copy Program return fee. END TERMS CONDITIONS","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/LICENSE.html","id":"how-to-apply-these-terms-to-your-new-programs","dir":"","previous_headings":"","what":"How to Apply These Terms to Your New Programs","title":"GNU General Public License","text":"develop new program, want greatest possible use public, best way achieve make free software everyone can redistribute change terms. , attach following notices program. safest attach start source file effectively state exclusion warranty; file least “copyright” line pointer full notice found. Also add information contact electronic paper mail. program terminal interaction, make output short notice like starts interactive mode: hypothetical commands show w show c show appropriate parts General Public License. course, program’s commands might different; GUI interface, use “box”. also get employer (work programmer) school, , sign “copyright disclaimer” program, necessary. information , apply follow GNU GPL, see . GNU General Public License permit incorporating program proprietary programs. program subroutine library, may consider useful permit linking proprietary applications library. want , use GNU Lesser General Public License instead License. first, please read .","code":" Copyright (C) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type 'show w'. This is free software, and you are welcome to redistribute it under certain conditions; type 'show c' for details."},{"path":"https://luisgruber.github.io/bayesianVARs/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Luis Gruber. Copyright holder, author, maintainer.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Gruber L (2024). bayesianVARs: MCMC Estimation Bayesian Vectorautoregressions. R package version 0.1.0.9000, https://luisgruber.github.io/bayesianVARs/, https://github.com/luisgruber/bayesianVARs.","code":"@Manual{, title = {bayesianVARs: MCMC Estimation of Bayesian Vectorautoregressions}, author = {Luis Gruber}, year = {2024}, note = {R package version 0.1.0.9000, https://luisgruber.github.io/bayesianVARs/}, url = {https://github.com/luisgruber/bayesianVARs}, }"},{"path":"https://luisgruber.github.io/bayesianVARs/index.html","id":"bayesianvars-","dir":"","previous_headings":"","what":"MCMC Estimation of Bayesian Vectorautoregressions","title":"MCMC Estimation of Bayesian Vectorautoregressions","text":"Estimation Bayesian vectorautoregressions /without stochastic volatility. Implements several modern hierarchical shrinkage priors, amongst Dirichlet-Laplace prior (DL), hierarchical Minnesota prior (HM), Horseshoe prior (HS), normal-gamma prior (NG), R2-induced-Dirichlet-decomposition prior (R2D2) stochastic search variable selection prior (SSVS). Concerning error-term, user can either specify order-invariant factor structure order-variant cholesky structure.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"MCMC Estimation of Bayesian Vectorautoregressions","text":"Install CRAN version: Install latest development version directly GitHub:","code":"install.packages(\"bayesianVARs\") devtools::install_github(\"luisgruber/bayesianVARs\")"},{"path":"https://luisgruber.github.io/bayesianVARs/index.html","id":"usage","dir":"","previous_headings":"","what":"Usage","title":"MCMC Estimation of Bayesian Vectorautoregressions","text":"main workhorse conduct Bayesian inference vectorautoregression models package function bvar(). features: Prediction, plotting, extraction model parameters extraction fitted values usual generic functions predict(), plot(), coef(), vcov() fitted(). Configure prior distributions helper functions specify_prior_phi() specify_prior_sigma().","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/index.html","id":"demonstration","dir":"","previous_headings":"","what":"Demonstration","title":"MCMC Estimation of Bayesian Vectorautoregressions","text":"","code":"set.seed(537) # load package library(bayesianVARs) # Load data train_data <-100 * usmacro_growth[1:237,c(\"GDPC1\", \"PCECC96\", \"GPDIC1\", \"AWHMAN\", \"GDPCTPI\", \"CES2000000008x\", \"FEDFUNDS\", \"GS10\", \"EXUSUKx\", \"S&P 500\")] test_data <-100 * usmacro_growth[238:241,c(\"GDPC1\", \"PCECC96\", \"GPDIC1\", \"AWHMAN\", \"GDPCTPI\", \"CES2000000008x\", \"FEDFUNDS\", \"GS10\", \"EXUSUKx\", \"S&P 500\")] # Estimate model using default prior settings mod <- bvar(train_data, lags = 2L, draws = 2000, burnin = 1000, sv_keep = \"all\") # Out of sample prediction and log-predictive-likelihood evaluation pred <- predict(mod, ahead = 1:4, LPL = TRUE, Y_obs = test_data) # Visualize in-sample fit plus out-of-sample prediction intervals plot(mod, predictions = pred)"},{"path":"https://luisgruber.github.io/bayesianVARs/index.html","id":"documentation","dir":"","previous_headings":"","what":"Documentation","title":"MCMC Estimation of Bayesian Vectorautoregressions","text":"bayesianVARs - Shrinkage Priors Bayesian Vectorautoregressions R","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/bvar.html","id":null,"dir":"Reference","previous_headings":"","what":"Markov Chain Monte Carlo Sampling for Bayesian Vectorautoregressions — bvar","title":"Markov Chain Monte Carlo Sampling for Bayesian Vectorautoregressions — bvar","text":"bvar simulates joint posterior distribution parameters latent variables returns posterior draws.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/bvar.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Markov Chain Monte Carlo Sampling for Bayesian Vectorautoregressions — bvar","text":"","code":"bvar( data, lags = 1L, draws = 1000L, burnin = 1000L, thin = 1L, prior_intercept = 100, prior_phi = specify_prior_phi(data = data, lags = lags, prior = \"HS\"), prior_sigma = specify_prior_sigma(data = data, type = \"factor\", quiet = TRUE), sv_keep = \"last\", quiet = FALSE, startvals = list(), expert = list() )"},{"path":"https://luisgruber.github.io/bayesianVARs/reference/bvar.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Markov Chain Monte Carlo Sampling for Bayesian Vectorautoregressions — bvar","text":"data Data matrix (can time series object). \\(M\\) columns assumed contain single time-series length \\(T\\). lags Integer indicating order VAR, .e. number lags dependent variables included predictors. draws single integer indicating number draws burnin burnin single integer indicating number draws discarded burnin thin single integer. Every \\(thin\\)th draw stored. Default thin=1L. prior_intercept Either prior_intercept=FALSE constant term (intercept) included. numeric vector length \\(M\\) indicating (fixed) prior variances constant term. single number recycled accordingly. Default prior_intercept=100. prior_phi bayesianVARs_prior_phi object specifying prior reduced form VAR coefficients. Best use constructor specify_prior_phi. prior_sigma bayesianVARs_prior_sigma object specifying prior variance-covariance matrix VAR. Best use constructor specify_prior_sigma. sv_keep String equal \"\" \"last\". case sv_keep = \"last\", default, draws last log-variance \\(h_T\\) stored. quiet logical value indicating whether information progress sampling displayed sampling (default TRUE). startvals optional list starting values. expert optional list expert settings.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/bvar.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Markov Chain Monte Carlo Sampling for Bayesian Vectorautoregressions — bvar","text":"object type bayesianVARs_bvar, list containing following objects: PHI: bayesianVARs_coef object, array, containing posterior draws VAR coefficients (including intercept). U: bayesianVARs_draws object, matrix, containing posterior draws contemporaneous coefficients (cholesky decomposition sigma specified). logvar: bayesianVARs_draws object containing log-variance draws. sv_para: baysesianVARs_draws object containing posterior draws stochastic volatility related parameters. phi_hyperparameter: matrix containing posterior draws hyperparameters conditional normal prior VAR coefficients. u_hyperparameter: matrix containing posterior draws hyperparameters conditional normal prior U (cholesky decomposition sigma specified). bench: Numerical indicating average time took generate one single draw joint posterior distribution parameters. V_prior: array containing posterior draws variances conditional normal prior VAR coefficients. facload: bayesianVARs_draws object, array, containing draws posterior distribution factor loadings matrix (factor decomposition sigma specified). fac: bayesianVARs_draws object, array, containing factor draws posterior distribution (factor decomposition sigma specified). Y: Matrix containing dependent variables used estimation. X matrix containing lagged values dependent variables, .e. covariates. lags: Integer indicating lag order VAR. intercept: Logical indicating whether constant term included. heteroscedastic logical indicating whether heteroscedasticity assumed. Yraw: Matrix containing dependent variables, including initial 'lags' observations. Traw: Integer indicating total number observations. sigma_type: Character specifying decomposition variance-covariance matrix. datamat: Matrix containing 'Y' 'X'. config: List containing information configuration parameters.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/bvar.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Markov Chain Monte Carlo Sampling for Bayesian Vectorautoregressions — bvar","text":"VAR(p) model following form: \\( \\boldsymbol{y}^\\prime_t = \\boldsymbol{\\iota}^\\prime + \\boldsymbol{x}^\\prime_t\\boldsymbol{\\Phi} + \\boldsymbol{\\epsilon}^\\prime_t\\), \\(\\boldsymbol{y}_t\\) \\(M\\)-dimensional vector dependent variables \\(\\boldsymbol{\\epsilon}_t\\) error term dimension. \\(\\boldsymbol{x}_t\\) \\(K=pM\\)-dimensional vector containing lagged/past values dependent variables \\(\\boldsymbol{y}_{t-l}\\) \\(l=1,\\dots,p\\) \\(\\boldsymbol{\\iota}\\) constant term (intercept) dimension \\(M\\times 1\\). reduced-form coefficient matrix \\(\\boldsymbol{\\Phi}\\) dimension \\(K \\times M\\). bvar offers two different specifications errors: user can choose factor stochastic volatility structure cholesky stochastic volatility structure. cases disturbances \\(\\boldsymbol{\\epsilon}_t\\) assumed follow \\(M\\)-dimensional multivariate normal distribution zero mean variance-covariance matrix \\(\\boldsymbol{\\Sigma}_t\\). case cholesky specification \\(\\boldsymbol{\\Sigma}_t = \\boldsymbol{U}^{\\prime -1} \\boldsymbol{D}_t \\boldsymbol{U}^{-1}\\), \\(\\boldsymbol{U}^{-1}\\) upper unitriangular (ones diagonal). diagonal matrix \\(\\boldsymbol{D}_t\\) depends upon latent log-variances, .e. \\(\\boldsymbol{D}_t=diag(exp(h_{1t}),\\dots, exp(h_{Mt})\\). log-variances follow priori independent autoregressive processes \\(h_{}\\sim N(\\mu_i + \\phi_i(h_{,t-1}-\\mu_i),\\sigma_i^2)\\) \\(=1,\\dots,M\\). case factor structure, \\(\\boldsymbol{\\Sigma}_t = \\boldsymbol{\\Lambda} \\boldsymbol{V}_t \\boldsymbol{\\Lambda}^\\prime + \\boldsymbol{G}_t\\). diagonal matrices \\(\\boldsymbol{V}_t\\) \\(\\boldsymbol{G}_t\\) depend upon latent log-variances, .e. \\(\\boldsymbol{G}_t=diag(exp(h_{1t}),\\dots, exp(h_{Mt})\\) \\(\\boldsymbol{V}_t=diag(exp(h_{M+1,t}),\\dots, exp(h_{M+r,t})\\). log-variances follow priori independent autoregressive processes \\(h_{}\\sim N(\\mu_i + \\phi_i(h_{,t-1}-\\mu_i),\\sigma_i^2)\\) \\(=1,\\dots,M\\) \\(h_{M+j,t}\\sim N(\\phi_ih_{M+j,t-1},\\sigma_{M+j}^2)\\) \\(j=1,\\dots,r\\).","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/bvar.html","id":"mcmc-algorithm","dir":"Reference","previous_headings":"","what":"MCMC algorithm","title":"Markov Chain Monte Carlo Sampling for Bayesian Vectorautoregressions — bvar","text":"sample efficiently reduced-form VAR coefficients assuming factor structure errors, equation per equation algorithm Kastner & Huber (2020) implemented. parameters latent variables associated factor-structure sampled using package factorstochvol-package's function update_fsv callable C-level . sample efficiently reduced-form VAR coefficients, assuming cholesky-structure errors, corrected triangular algorithm Carriero et al. (2021) implemented. SV parameters latent variables sampled using package stochvol's update_fast_sv function. precision parameters, .e. free -diagonal elements \\(\\boldsymbol{U}\\), sampled Cogley Sargent (2005).","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/bvar.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Markov Chain Monte Carlo Sampling for Bayesian Vectorautoregressions — bvar","text":"Gruber, L. Kastner, G. (2023). Forecasting macroeconomic data Bayesian VARs: Sparse dense? depends! arXiv:2206.04902. Kastner, G. Huber, F. Sparse (2020). Bayesian vector autoregressions huge dimensions. Journal Forecasting. 39, 1142--1165, doi:10.1002/.2680 . Kastner, G. (2019). Sparse Bayesian Time-Varying Covariance Estimation Many Dimensions Journal Econometrics, 210(1), 98--115, doi:10.1016/j.jeconom.2018.11.007 . Carriero, . Chan, J. Clark, T. E. Marcellino, M. (2021). Corrigendum “Large Bayesian vector autoregressions stochastic volatility non-conjugate priors” [J. Econometrics 212 (1) (2019) 137–154]. Journal Econometrics, doi:10.1016/j.jeconom.2021.11.010 . Cogley, S. Sargent, T. (2005). Drifts volatilities: monetary policies outcomes post WWII US. Review Economic Dynamics, 8, 262--302, doi:10.1016/j.red.2004.10.009 . Hosszejni, D. Kastner, G. (2021). Modeling Univariate Multivariate Stochastic Volatility R stochvol factorstochvol. Journal Statistical Software, 100, 1–-34. doi:10.18637/jss.v100.i12 .","code":""},{"path":[]},{"path":"https://luisgruber.github.io/bayesianVARs/reference/bvar.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Markov Chain Monte Carlo Sampling for Bayesian Vectorautoregressions — bvar","text":"","code":"# Access a subset of the usmacro_growth dataset data <- usmacro_growth[,c(\"GDPC1\", \"CPIAUCSL\", \"FEDFUNDS\")] # Estimate a model mod <- bvar(data, sv_keep = \"all\", quiet = TRUE) # Plot plot(mod) # Summary summary(mod) #> #> Posterior median of reduced-form coefficients: #> GDPC1 CPIAUCSL FEDFUNDS #> GDPC1.l1 0.236588 0.006926 2.109e-02 #> CPIAUCSL.l1 -0.053390 0.616162 -3.646e-03 #> FEDFUNDS.l1 0.007874 0.037088 1.001e+00 #> intercept 0.005874 0.001291 -8.055e-05 #> #> Posterior interquartile range of of reduced-form coefficients: #> GDPC1 CPIAUCSL FEDFUNDS #> GDPC1.l1 0.089598 0.0290897 0.0252782 #> CPIAUCSL.l1 0.111515 0.0904426 0.0150976 #> FEDFUNDS.l1 0.018416 0.0141909 0.0076726 #> intercept 0.001135 0.0007528 0.0001651"},{"path":"https://luisgruber.github.io/bayesianVARs/reference/coef.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract VAR coefficients — coef","title":"Extract VAR coefficients — coef","text":"Extracts posterior draws VAR coefficients VAR model estimated bvar().","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/coef.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract VAR coefficients — coef","text":"","code":"# S3 method for bayesianVARs_bvar coef(object, ...)"},{"path":"https://luisgruber.github.io/bayesianVARs/reference/coef.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract VAR coefficients — coef","text":"object bayesianVARs_bvar object obtained bvar(). ... Currently ignored.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/coef.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extract VAR coefficients — coef","text":"Returns numeric array dimension \\(M \\times K \\times draws\\), M number time-series, K number covariates per equation (including intercept) draws number stored posterior draws.","code":""},{"path":[]},{"path":"https://luisgruber.github.io/bayesianVARs/reference/coef.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Extract VAR coefficients — coef","text":"","code":"# Access a subset of the usmacro_growth dataset data <- usmacro_growth[,c(\"GDPC1\", \"CPIAUCSL\", \"FEDFUNDS\")] # Estimate a model mod <- bvar(data, sv_keep = \"all\", quiet = TRUE) # Extract posterior draws of VAR coefficients bvar_coefs <- coef(mod)"},{"path":"https://luisgruber.github.io/bayesianVARs/reference/fitted.bayesianVARs_bvar.html","id":null,"dir":"Reference","previous_headings":"","what":"Simulate fitted/predicted historical values for an estimated VAR model — fitted.bayesianVARs_bvar","title":"Simulate fitted/predicted historical values for an estimated VAR model — fitted.bayesianVARs_bvar","text":"Simulates fitted/predicted (-sample) values estimated VAR model.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/fitted.bayesianVARs_bvar.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Simulate fitted/predicted historical values for an estimated VAR model — fitted.bayesianVARs_bvar","text":"","code":"# S3 method for bayesianVARs_bvar fitted(object, error_term = TRUE, ...)"},{"path":"https://luisgruber.github.io/bayesianVARs/reference/fitted.bayesianVARs_bvar.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Simulate fitted/predicted historical values for an estimated VAR model — fitted.bayesianVARs_bvar","text":"object bayesianVARs_bvar object estimated via bvar(). error_term logical indicating whether include error term . ... Currently ignored.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/fitted.bayesianVARs_bvar.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Simulate fitted/predicted historical values for an estimated VAR model — fitted.bayesianVARs_bvar","text":"object class bayesianVARs_fitted.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/fitted.bayesianVARs_bvar.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Simulate fitted/predicted historical values for an estimated VAR model — fitted.bayesianVARs_bvar","text":"","code":"# Access a subset of the usmacro_growth dataset data <- usmacro_growth[,c(\"GDPC1\", \"CPIAUCSL\", \"FEDFUNDS\")] # Estimate a model mod <- bvar(data, sv_keep = \"all\", quiet = TRUE) # Simulate predicted historical values including the error term. pred <- fitted(mod, error_term = TRUE) # Simulate fitted historical values not including the error term. fit <- fitted(mod, error_term = FALSE) # Visualize plot(pred) plot(fit)"},{"path":"https://luisgruber.github.io/bayesianVARs/reference/my_gig.html","id":null,"dir":"Reference","previous_headings":"","what":"Draw from generalized inverse Gaussian — my_gig","title":"Draw from generalized inverse Gaussian — my_gig","text":"Vectorized version rgig","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/my_gig.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Draw from generalized inverse Gaussian — my_gig","text":"","code":"my_gig(n, lambda, chi, psi)"},{"path":"https://luisgruber.github.io/bayesianVARs/reference/my_gig.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Draw from generalized inverse Gaussian — my_gig","text":"n single integer indicating number draws generate. lambda vector shape parameters. chi vector shape/scale parameters. Must nonnegative positive lambdas positive else. psi vector shape/scale parameters. Must nonnegative negative lambdas positive else.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/my_gig.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Draw from generalized inverse Gaussian — my_gig","text":"Matrix dimension c(n,m), m maximum length lambda, psi chi.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/my_gig.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Draw from generalized inverse Gaussian — my_gig","text":"","code":"gigsamples <- my_gig(2, c(1,1), c(1,1), c(1,1))"},{"path":"https://luisgruber.github.io/bayesianVARs/reference/pairs_predict.html","id":null,"dir":"Reference","previous_headings":"","what":"Pairwise visualization of out-of-sample posterior predictive\ndensities. — pairs_predict","title":"Pairwise visualization of out-of-sample posterior predictive\ndensities. — pairs_predict","text":"Pairwise visualization --sample posterior predictive densities.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/pairs_predict.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Pairwise visualization of out-of-sample posterior predictive\ndensities. — pairs_predict","text":"","code":"# S3 method for bayesianVARs_predict pairs(x, vars, ahead, ...)"},{"path":"https://luisgruber.github.io/bayesianVARs/reference/pairs_predict.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Pairwise visualization of out-of-sample posterior predictive\ndensities. — pairs_predict","text":"x object class bayesianVARs_predict obtained via predict.bayesianVARs_bvar(). vars Integer vector (coercible ) indicating variables plot. ahead Integer vector (coercible ) indicating step ahead plot. max(ahead) must smaller equal dim(x$predictions)[1]. ... Currently ignored!","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/pairs_predict.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Pairwise visualization of out-of-sample posterior predictive\ndensities. — pairs_predict","text":"Returns x invisibly.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/pairs_predict.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Pairwise visualization of out-of-sample posterior predictive\ndensities. — pairs_predict","text":"Note bayesianVARs_predict can also used withing plot.bayesianVARs_bvar().","code":""},{"path":[]},{"path":"https://luisgruber.github.io/bayesianVARs/reference/pairs_predict.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Pairwise visualization of out-of-sample posterior predictive\ndensities. — pairs_predict","text":"","code":"# Access a subset of the usmacro_growth dataset data <- usmacro_growth[,c(\"GDPC1\", \"CPIAUCSL\", \"FEDFUNDS\")] # Estimate a model mod <- bvar(data, sv_keep = \"all\", quiet = TRUE) # Simulate from posterior predictive predictions <- predict(mod, ahead = 1:3) #> 'stable=TRUE': Calling 'stable_bvar()' to discard those posterior #> draws, that do not fulfill the stable criterion. #> #> 485 stable posterior draws remaining for prediction! # Visualize pairs(predictions, vars = 1:3, ahead = 1:3)"},{"path":"https://luisgruber.github.io/bayesianVARs/reference/plot.bayesianVARs_bvar.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot method for bayesianVARs_bvar — plot.bayesianVARs_bvar","title":"Plot method for bayesianVARs_bvar — plot.bayesianVARs_bvar","text":"Visualization -sample fit. Can also used display prediction intervals future values.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/plot.bayesianVARs_bvar.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot method for bayesianVARs_bvar — plot.bayesianVARs_bvar","text":"","code":"# S3 method for bayesianVARs_bvar plot( x, predictions = NULL, quantiles = c(0.05, 0.5, 0.95), dates = NULL, n_col = 1, ... )"},{"path":"https://luisgruber.github.io/bayesianVARs/reference/plot.bayesianVARs_bvar.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot method for bayesianVARs_bvar — plot.bayesianVARs_bvar","text":"x object class bayesianVARs_bvar obtained via bvar(). predictions Optional array sample predictions, e.g. obtained via predict.bayesianVARs_bvar(). quantiles numeric vector indicating quantiles plot. dates optional vector dates labelling x-axis. default values NULL; case, axis labeled numbers. n_col integer indicating number columns use plotting. ... Currently ignored!","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/plot.bayesianVARs_bvar.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Plot method for bayesianVARs_bvar — plot.bayesianVARs_bvar","text":"Returns x invisibly.","code":""},{"path":[]},{"path":"https://luisgruber.github.io/bayesianVARs/reference/plot.bayesianVARs_bvar.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Plot method for bayesianVARs_bvar — plot.bayesianVARs_bvar","text":"","code":"# Access a subset of the usmacro_growth dataset data <- usmacro_growth[,c(\"GDPC1\", \"CPIAUCSL\", \"FEDFUNDS\")] # Estimate a model mod <- bvar(data, sv_keep = \"all\", quiet = TRUE) # Simulate from posterior predictive predictions <- predict(mod, ahead = 1:3) #> 'stable=TRUE': Calling 'stable_bvar()' to discard those posterior #> draws, that do not fulfill the stable criterion. #> #> 626 stable posterior draws remaining for prediction! # Visualize plot(mod, predictions = predictions)"},{"path":"https://luisgruber.github.io/bayesianVARs/reference/plot.bayesianVARs_fitted.html","id":null,"dir":"Reference","previous_headings":"","what":"Visualization of in-sample fit of an estimated VAR. — plot.bayesianVARs_fitted","title":"Visualization of in-sample fit of an estimated VAR. — plot.bayesianVARs_fitted","text":"Visualization -sample fit estimated VAR.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/plot.bayesianVARs_fitted.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Visualization of in-sample fit of an estimated VAR. — plot.bayesianVARs_fitted","text":"","code":"# S3 method for bayesianVARs_fitted plot( x, dates = NULL, vars = \"all\", quantiles = c(0.05, 0.5, 0.95), n_col = 1L, ... )"},{"path":"https://luisgruber.github.io/bayesianVARs/reference/plot.bayesianVARs_fitted.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Visualization of in-sample fit of an estimated VAR. — plot.bayesianVARs_fitted","text":"x bayesianVARs_fitted object. dates optional vector dates labelling x-axis. default values NULL; case, axis labeled numbers. vars character vector containing names variables visualized. default \"\" indicating fit variables visualized. quantiles numeric vector indicating quantiles plot. n_col integer indicating number columns use plotting. ... Currently ignored.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/plot.bayesianVARs_fitted.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Visualization of in-sample fit of an estimated VAR. — plot.bayesianVARs_fitted","text":"returns x invisibly","code":""},{"path":[]},{"path":"https://luisgruber.github.io/bayesianVARs/reference/plot.bayesianVARs_fitted.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Visualization of in-sample fit of an estimated VAR. — plot.bayesianVARs_fitted","text":"","code":"# Access a subset of the usmacro_growth dataset data <- usmacro_growth[,c(\"GDPC1\", \"CPIAUCSL\", \"FEDFUNDS\")] # Estimate a model mod <- bvar(data, sv_keep = \"all\", quiet = TRUE) # Simulate predicted historical values including the error term. pred <- fitted(mod, error_term = TRUE) # Visualize plot(pred)"},{"path":"https://luisgruber.github.io/bayesianVARs/reference/plot.bayesianVARs_predict.html","id":null,"dir":"Reference","previous_headings":"","what":"Fan chart — plot.bayesianVARs_predict","title":"Fan chart — plot.bayesianVARs_predict","text":"Visualization (--sample) predictive distribution.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/plot.bayesianVARs_predict.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Fan chart — plot.bayesianVARs_predict","text":"","code":"# S3 method for bayesianVARs_predict plot( x, dates = NULL, vars = \"all\", ahead = NULL, quantiles = c(0.05, 0.25, 0.5, 0.75, 0.95), n_col = 1L, first_obs = 1L, ... )"},{"path":"https://luisgruber.github.io/bayesianVARs/reference/plot.bayesianVARs_predict.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Fan chart — plot.bayesianVARs_predict","text":"x object type bayesianVARs_predict obtained via predict.bayesianVARs_bvar(). dates optional vector dates labeling x-axis. default values NULL; case, axis labeled numbers. vars character vector containing names variables visualized. default \"\" indicating variables visualized. ahead Integer vector (coercible ) indicating step ahead plot. max(ahead) must smaller equal dim(x$predictions)[1]. quantiles numeric vector indicating quantiles plot. n_col integer indicating number columns use plotting. first_obs integer indicating first observation used plotting. ... Currently ignored!","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/plot.bayesianVARs_predict.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Fan chart — plot.bayesianVARs_predict","text":"Returns x invisibly!","code":""},{"path":[]},{"path":"https://luisgruber.github.io/bayesianVARs/reference/plot.bayesianVARs_predict.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Fan chart — plot.bayesianVARs_predict","text":"","code":"# Access a subset of the usmacro_growth dataset data <- usmacro_growth[,c(\"GDPC1\", \"CPIAUCSL\", \"FEDFUNDS\")] # Estimate a model mod <- bvar(data, sv_keep = \"all\", quiet = TRUE) # Simulate from posterior predictive predictions <- predict(mod, ahead = 1:3) #> 'stable=TRUE': Calling 'stable_bvar()' to discard those posterior #> draws, that do not fulfill the stable criterion. #> #> 385 stable posterior draws remaining for prediction! # Visualize plot(predictions, vars = 1:3, ahead = 1:3)"},{"path":"https://luisgruber.github.io/bayesianVARs/reference/posterior_heatmap.html","id":null,"dir":"Reference","previous_headings":"","what":"Posterior heatmaps for VAR coefficients or variance-covariance matrices — posterior_heatmap","title":"Posterior heatmaps for VAR coefficients or variance-covariance matrices — posterior_heatmap","text":"Posterior heatmaps VAR coefficients variance-covariance matrices","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/posterior_heatmap.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Posterior heatmaps for VAR coefficients or variance-covariance matrices — posterior_heatmap","text":"","code":"posterior_heatmap( x, FUN, ..., colorbar = TRUE, xlabels = NULL, ylabels = NULL, add_numbers = FALSE, zlim = NULL, colspace = NULL, main = \"\", cex.axis = 0.75, cex.colbar = 1, cex.numbers = 1, asp = NULL )"},{"path":"https://luisgruber.github.io/bayesianVARs/reference/posterior_heatmap.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Posterior heatmaps for VAR coefficients or variance-covariance matrices — posterior_heatmap","text":"x array dimension \\(\\times b \\times draws\\), \\( \\times b\\) dimension parameter visualize draws number posterior draws. FUN summary function applied margins c(1,2) x. E.g. \"median\", \"mean\", \"IQR\", \"sd\" \"var\". apply(x, 1:2, FUN, ...) must return matrix! ... optional arguments FUN. colorbar logical indicating whether display colorbar . Default TRUE. xlabels ylabels=NULL, default, indicates names dependent variables displayed. ylabels=\"\" indicates ylabels displayed. ylabels xlabels=NULL, default, indicates labels covariables (lagged values dependent variables) displayed. xlabels=\"lags\" indicates lags marked. xlabels=\"\" indicates ylabels displayed. add_numbers logical. add_numbers=TRUE, default indicates actual values summary displayed. zlim numeric vector length two indicating minimum maximum values colors plotted. default range determined maximum absolute values selected summary. colspace Optional argument. main main title plot. cex.axis magnification used y-axis annotation relative current setting cex. cex.colbar magnification used colorbar annotation relative current setting cex. cex.numbers magnification used actual values (add_numbers=TRUE) relative current setting cex. asp aspect ratio.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/posterior_heatmap.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Posterior heatmaps for VAR coefficients or variance-covariance matrices — posterior_heatmap","text":"Returns x invisibly.","code":""},{"path":[]},{"path":"https://luisgruber.github.io/bayesianVARs/reference/posterior_heatmap.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Posterior heatmaps for VAR coefficients or variance-covariance matrices — posterior_heatmap","text":"","code":"# Access a subset of the usmacro_growth dataset data <- usmacro_growth[,c(\"GDPC1\", \"CPIAUCSL\", \"FEDFUNDS\")] # Estimate a model mod <- bvar(100*data, sv_keep = \"all\", quiet = TRUE) # Extract posterior draws of VAR coefficients phi_post <- coef(mod) # Visualize posterior median of VAR coefficients posterior_heatmap(phi_post, median) # Extract posterior draws of variance-covariance matrices (for each point in time) sigma_post <- vcov(mod) # Visualize posterior interquartile-range of variance-covariance matrix of the first observation posterior_heatmap(sigma_post[1,,,], IQR)"},{"path":"https://luisgruber.github.io/bayesianVARs/reference/predict.bayesianVARs_bvar.html","id":null,"dir":"Reference","previous_headings":"","what":"Predict method for Bayesian VARs — predict.bayesianVARs_bvar","title":"Predict method for Bayesian VARs — predict.bayesianVARs_bvar","text":"Simulates (--sample) predictive density Bayesian VARs estimated via bvar() computes log predictive likelhoods ex-post observed data supplied.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/predict.bayesianVARs_bvar.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Predict method for Bayesian VARs — predict.bayesianVARs_bvar","text":"","code":"# S3 method for bayesianVARs_bvar predict( object, ahead = 1L, each = 1L, stable = TRUE, simulate_predictive = TRUE, LPL = FALSE, Y_obs = NA, LPL_VoI = NA, ... )"},{"path":"https://luisgruber.github.io/bayesianVARs/reference/predict.bayesianVARs_bvar.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Predict method for Bayesian VARs — predict.bayesianVARs_bvar","text":"object bayesianVARs_bvar object, obtained bvar(). ahead Integer vector (coercible ), indicating number steps ahead predict. Single integer (coercible ) indicating often drawn posterior predictive distribution draw stored MCMC sampling. stable logical indicating whether consider draws posterior fulfill 'stable' criterion. Default TRUE. simulate_predictive logical, indicating whether posterior predictive distribution simulated. LPL logical indicating whether ahead-step-ahead log predictive likelihoods computed. LPL=TRUE, Y_obs specified. Y_obs Data matrix observed values computation log predictive likelihood. ncol(object$Yraw) columns assumed contain single time-series length length(ahead). LPL_VoI either integer vector character vector column-names indicating subgroup time-series object$Yraw joint log predictive likelihood shall computed. ... Currently ignored!","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/predict.bayesianVARs_bvar.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Predict method for Bayesian VARs — predict.bayesianVARs_bvar","text":"Object class bayesianVARs_predict, list may contain following elements: predictions array dimensions c(length(ahead), ncol(object$Yraw), * dim(object$PHI)[3]) containing simulations predictive density (simulate_predictive=TRUE). LPL vector length length(ahead) containing log-predictive-likelihoods (taking account joint distribution variables) (LPL=TRUE). LPL_univariate matrix dimension c(length(ahead), ncol(object$Yraw) containing marginalized univariate log-predictive-likelihoods series (LPL=TRUE). LPL_VoI vector length length(ahead) containing log-predictive-likelihoods subset variables (LPL=TRUE LPL_VoI != NA). Yraw matrix containing data used estimation VAR. LPL_draws matrix containing simulations log-predictive-likelihood (LPL=TRUE). PL_univariate_draws array containing simulations univariate predictive-likelihoods (LPL=TRUE). LPL_sub_draws matrix containing simulations log-predictive-likelihood subset variables (LPL=TRUE LPL_VoI != NA).","code":""},{"path":[]},{"path":"https://luisgruber.github.io/bayesianVARs/reference/predict.bayesianVARs_bvar.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Predict method for Bayesian VARs — predict.bayesianVARs_bvar","text":"","code":"# Access a subset of the usmacro_growth dataset data <- usmacro_growth[,c(\"GDPC1\", \"CPIAUCSL\", \"FEDFUNDS\")] # Split data in train and test train <- data[1:(nrow(data)-4),] test <- data[-c(1:(nrow(data)-4)),] # Estimate model using train data only mod <- bvar(train, quiet = TRUE) # Simulate from 1-step to 4-steps ahead posterior predictive and compute # log-predictive-likelihoods predictions <- predict(mod, ahead = 1:4, LPL = TRUE, Y_obs = test) #> 'stable=TRUE': Calling 'stable_bvar()' to discard those posterior #> draws, that do not fulfill the stable criterion. #> #> 617 stable posterior draws remaining for prediction! # Summary summary(predictions) #> #> LPL: #> t+1 t+2 t+3 t+4 #> 5.114 9.665 9.092 6.526 #> #> Marginal univariate LPLs: #> GDPC1 CPIAUCSL FEDFUNDS #> t+1 -0.8729 0.4109 3.541 #> t+2 2.8555 2.6739 3.391 #> t+3 2.8363 2.4370 3.349 #> t+4 2.8931 0.2959 3.326 #> #> Prediction quantiles: #> , , GDPC1 #> #> t+1 t+2 t+3 t+4 #> 5% -0.07875 -0.0329135 -0.021393 -0.011870 #> 50% -0.01851 0.0009099 0.005688 0.006618 #> 95% 0.03798 0.0429166 0.034118 0.024602 #> #> , , CPIAUCSL #> #> t+1 t+2 t+3 t+4 #> 5% -0.018515 -0.017824 -0.015592 -0.0140807 #> 50% -0.007656 -0.005287 -0.002413 -0.0005886 #> 95% 0.002679 0.006747 0.009743 0.0106464 #> #> , , FEDFUNDS #> #> t+1 t+2 t+3 t+4 #> 5% -0.016214 -0.022544 -0.026463 -0.030055 #> 50% -0.004527 -0.005249 -0.006258 -0.006404 #> 95% 0.005912 0.011279 0.016238 0.018100 #> # Visualize via fan-charts plot(predictions) # \\donttest{ # In order to evaluate the joint predictive density of a subset of the # variables (variables of interest), consider specifying 'LPL_VoI': predictions <- predict(mod, ahead = 1:4, LPL = TRUE, Y_obs = test, LPL_VoI = c(\"GDPC1\",\"FEDFUNDS\")) #> 'stable=TRUE': Calling 'stable_bvar()' to discard those posterior #> draws, that do not fulfill the stable criterion. #> #> 617 stable posterior draws remaining for prediction! predictions$LPL_VoI #> t+1 t+2 t+3 t+4 #> 2.542386 6.712653 6.548112 6.391536 # }"},{"path":"https://luisgruber.github.io/bayesianVARs/reference/print.bayesianVARs_bvar.html","id":null,"dir":"Reference","previous_headings":"","what":"Pretty printing of a bvar object — print.bayesianVARs_bvar","title":"Pretty printing of a bvar object — print.bayesianVARs_bvar","text":"Pretty printing bvar object","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/print.bayesianVARs_bvar.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Pretty printing of a bvar object — print.bayesianVARs_bvar","text":"","code":"# S3 method for bayesianVARs_bvar print(x, ...)"},{"path":"https://luisgruber.github.io/bayesianVARs/reference/print.bayesianVARs_bvar.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Pretty printing of a bvar object — print.bayesianVARs_bvar","text":"x Object class bayesianVARs_bvar, usually resulting call bvar(). ... Ignored.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/print.bayesianVARs_bvar.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Pretty printing of a bvar object — print.bayesianVARs_bvar","text":"Returns x invisibly.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/print.bayesianVARs_bvar.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Pretty printing of a bvar object — print.bayesianVARs_bvar","text":"","code":"# Access a subset of the usmacro_growth dataset data <- usmacro_growth[,c(\"GDPC1\", \"CPIAUCSL\", \"FEDFUNDS\")] # Estimate a model mod <- bvar(data, sv_keep = \"all\", quiet = TRUE) # Print model mod #> #> Fitted bayesianVARs_bvar object with #> - 3 series #> - 1 lag(s) #> - 246 used observations #> - 247 total observations #> - 1000 MCMC draws #> - 1 thinning #> - 1000 burn-in #>"},{"path":"https://luisgruber.github.io/bayesianVARs/reference/print.bayesianVARs_predict.html","id":null,"dir":"Reference","previous_headings":"","what":"Print method for bayesianVARs_predict objects — print.bayesianVARs_predict","title":"Print method for bayesianVARs_predict objects — print.bayesianVARs_predict","text":"Print method bayesianVARs_predict objects.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/print.bayesianVARs_predict.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Print method for bayesianVARs_predict objects — print.bayesianVARs_predict","text":"","code":"# S3 method for bayesianVARs_predict print(x, ...)"},{"path":"https://luisgruber.github.io/bayesianVARs/reference/print.bayesianVARs_predict.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Print method for bayesianVARs_predict objects — print.bayesianVARs_predict","text":"x bayesianVARs_predict object obtained via predict.bayesianVARs_bvar(). ... Currently ignored!","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/print.bayesianVARs_predict.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Print method for bayesianVARs_predict objects — print.bayesianVARs_predict","text":"Returns x invisibly.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/print.bayesianVARs_predict.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Print method for bayesianVARs_predict objects — print.bayesianVARs_predict","text":"","code":"# Access a subset of the usmacro_growth dataset data <- usmacro_growth[,c(\"GDPC1\", \"CPIAUCSL\", \"FEDFUNDS\")] # Split data in train and test train <- data[1:(nrow(data)-4),] test <- data[-c(1:(nrow(data)-4)),] # Estimate model using train data only mod <- bvar(train, quiet = TRUE) # Simulate from 1-step ahead posterior predictive predictions <- predict(mod, ahead = 1L) #> 'stable=TRUE': Calling 'stable_bvar()' to discard those posterior #> draws, that do not fulfill the stable criterion. #> #> 595 stable posterior draws remaining for prediction! print(predictions) #> #> Generic functions for bayesianVARs_predict objects: #> - summary.bayesianVARs_predict(), #> - pairs.bayesianVARs_predict(), #> - plot.bayesianVARs_predict() (alias for pairs.bayesianVARs_predict())."},{"path":"https://luisgruber.github.io/bayesianVARs/reference/print.summary.bayesianVARs_bvar.html","id":null,"dir":"Reference","previous_headings":"","what":"Print method for summary.bayesianVARs_bvar objects — print.summary.bayesianVARs_bvar","title":"Print method for summary.bayesianVARs_bvar objects — print.summary.bayesianVARs_bvar","text":"Print method summary.bayesianVARs_bvar objects.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/print.summary.bayesianVARs_bvar.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Print method for summary.bayesianVARs_bvar objects — print.summary.bayesianVARs_bvar","text":"","code":"# S3 method for summary.bayesianVARs_bvar print(x, ...)"},{"path":"https://luisgruber.github.io/bayesianVARs/reference/print.summary.bayesianVARs_bvar.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Print method for summary.bayesianVARs_bvar objects — print.summary.bayesianVARs_bvar","text":"x summary.bayesianVARs_bvar object obtained via summary.bayesianVARs_bvar(). ... Currently ignored!","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/print.summary.bayesianVARs_bvar.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Print method for summary.bayesianVARs_bvar objects — print.summary.bayesianVARs_bvar","text":"Returns x invisibly!","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/print.summary.bayesianVARs_bvar.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Print method for summary.bayesianVARs_bvar objects — print.summary.bayesianVARs_bvar","text":"","code":"# Access a subset of the usmacro_growth dataset data <- usmacro_growth[,c(\"GDPC1\", \"CPIAUCSL\", \"FEDFUNDS\")] # Estimate model mod <- bvar(data, quiet = TRUE) # Print summary summary(mod) #> #> Posterior median of reduced-form coefficients: #> GDPC1 CPIAUCSL FEDFUNDS #> GDPC1.l1 0.226152 0.00604 1.362e-02 #> CPIAUCSL.l1 -0.063468 0.62045 -4.773e-03 #> FEDFUNDS.l1 0.009492 0.03717 1.001e+00 #> intercept 0.005959 0.00120 -4.555e-05 #> #> Posterior interquartile range of of reduced-form coefficients: #> GDPC1 CPIAUCSL FEDFUNDS #> GDPC1.l1 0.105445 0.0271618 0.0208810 #> CPIAUCSL.l1 0.118059 0.0930382 0.0131568 #> FEDFUNDS.l1 0.019176 0.0145773 0.0065391 #> intercept 0.001173 0.0007342 0.0001668"},{"path":"https://luisgruber.github.io/bayesianVARs/reference/print.summary.bayesianVARs_predict.html","id":null,"dir":"Reference","previous_headings":"","what":"Print method for summary.bayesianVARs_predict objects — print.summary.bayesianVARs_predict","title":"Print method for summary.bayesianVARs_predict objects — print.summary.bayesianVARs_predict","text":"Print method summary.bayesianVARs_predict objects.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/print.summary.bayesianVARs_predict.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Print method for summary.bayesianVARs_predict objects — print.summary.bayesianVARs_predict","text":"","code":"# S3 method for summary.bayesianVARs_predict print(x, ...)"},{"path":"https://luisgruber.github.io/bayesianVARs/reference/print.summary.bayesianVARs_predict.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Print method for summary.bayesianVARs_predict objects — print.summary.bayesianVARs_predict","text":"x summary.bayesianVARs_predict object obtained via summary.bayesianVARs_predict(). ... Currently ignored.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/print.summary.bayesianVARs_predict.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Print method for summary.bayesianVARs_predict objects — print.summary.bayesianVARs_predict","text":"Returns x invisibly.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/print.summary.bayesianVARs_predict.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Print method for summary.bayesianVARs_predict objects — print.summary.bayesianVARs_predict","text":"","code":"# Access a subset of the usmacro_growth dataset data <- usmacro_growth[,c(\"GDPC1\", \"CPIAUCSL\", \"FEDFUNDS\")] # Split data in train and test train <- data[1:(nrow(data)-4),] test <- data[-c(1:(nrow(data)-4)),] # Estimate model using train data only mod <- bvar(train, quiet = TRUE) # Simulate from 1-step ahead posterior predictive predictions <- predict(mod, ahead = 1L) #> 'stable=TRUE': Calling 'stable_bvar()' to discard those posterior #> draws, that do not fulfill the stable criterion. #> #> 586 stable posterior draws remaining for prediction! sum <- summary(predictions) print(sum) #> #> Prediction quantiles: #> , , GDPC1 #> #> t+1 #> 5% -0.06812 #> 50% -0.01798 #> 95% 0.02909 #> #> , , CPIAUCSL #> #> t+1 #> 5% -0.018438 #> 50% -0.008339 #> 95% 0.003312 #> #> , , FEDFUNDS #> #> t+1 #> 5% -0.021399 #> 50% -0.004006 #> 95% 0.009963 #>"},{"path":"https://luisgruber.github.io/bayesianVARs/reference/specify_prior_phi.html","id":null,"dir":"Reference","previous_headings":"","what":"Specify prior on PHI — specify_prior_phi","title":"Specify prior on PHI — specify_prior_phi","text":"Configures prior PHI, matrix reduced-form VAR coefficients.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/specify_prior_phi.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Specify prior on PHI — specify_prior_phi","text":"","code":"specify_prior_phi( data = NULL, M = ncol(data), lags = 1L, prior = \"HS\", priormean = 0, PHI_tol = 1e-18, DL_a = \"1/K\", DL_tol = 0, R2D2_a = 0.1, R2D2_b = 0.5, R2D2_tol = 0, NG_a = 0.1, NG_b = 1, NG_c = 1, NG_tol = 0, SSVS_c0 = 0.01, SSVS_c1 = 100, SSVS_semiautomatic = TRUE, SSVS_p = 0.5, HMP_lambda1 = c(0.01, 0.01), HMP_lambda2 = c(0.01, 0.01), normal_sds = 10, global_grouping = \"global\", ... )"},{"path":"https://luisgruber.github.io/bayesianVARs/reference/specify_prior_phi.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Specify prior on PHI — specify_prior_phi","text":"data Optional. Data matrix (can time series object). \\(M\\) columns assumed contain single time-series length \\(T\\). M positive integer indicating number time-series VAR. lags positive integer indicating order VAR, .e. number lags dependent variables included predictors. prior character, one \"HS\", \"R2D2\", \"NG\", \"DL\", \"SSVS\", \"HMP\" \"normal\". priormean real numbers indicating prior means VAR coefficients. One single number means prior mean -lag coefficients w.r.t. first lag equals priormean 0 else. vector length M means prior mean -lag coefficients w.r.t. first lag equals priormean 0 else. priormean matrix dimension c(lags*M,M), \\(M\\) columns assumed contain lags*M prior means VAR coefficients respective VAR equations. PHI_tol Minimum number absolute value VAR coefficient draw can take. Prevents numerical issues can appear strong shrinkage enforced chosen greater zero. DL_a (Single) positive real number. value interpreted concentration parameter local scales. Smaller values enforce heavier shrinkage. argument global_grouping specifies e.g. k groups, DL_a can numeric vector length k elements indicate shrinkage group. matrix dimension c(s,2) specifies discrete hyperprior, first column contains s support points second column contains associated prior probabilities. DL_a specified prior=\"DL\". DL_tol Minimum number parameter draw one shrinking parameters Dirichlet Laplace prior can take. Prevents numerical issues can appear strong shrinkage enforced chosen greater zero. DL_tol specified prior=\"DL\". R2D2_a (Single) positive real number. value interpreted concentration parameter local scales. Smaller values enforce heavier shrinkage. argument global_grouping specifies e.g. k groups, R2D2_a can numeric vector length k elements indicate shrinkage group. matrix dimension c(s,2) specifies discrete hyperprior, first column contains s support points second column contains associated prior probabilities. R2D2_a specified prior=\"R2D2\". R2D2_b (Single) positive real number. value indicates shape parameter inverse gamma prior (semi-)global scales. argument global_grouping specifies e.g. k groups, NG_b can numeric vector length k elements determine shape parameter group. R2D2_b specified prior=\"R2D2\". R2D2_tol Minimum number parameter draw one shrinking parameters R2D2 prior can take. Prevents numerical issues can appear strong shrinkage enforced chosen greater zero. R2D2_tol specified prior=\"R2D2\". NG_a (Single) positive real number. value interpreted concentration parameter local scales. Smaller values enforce heavier shrinkage. argument global_grouping specifies e.g. k groups, NG_a can numeric vector length k elements indicate shrinkage group. matrix dimension c(s,2) specifies discrete hyperprior, first column contains s support points second column contains associated prior probabilities. NG_a specified prior=\"NG\". NG_b (Single) positive real number. value indicates shape parameter inverse gamma prior (semi-)global scales. argument global_grouping specifies e.g. k groups, NG_b can numeric vector length k elements determine shape parameter group. NG_b specified prior=\"NG\". NG_c (Single) positive real number. value indicates scale parameter inverse gamma prior (semi-)global scales. argument global_grouping specifies e.g. k groups, NG_c can numeric vector length k elements determine scale parameter group. Expert option set scale parameter proportional NG_a. E.g. case discrete hyperprior NG_a chosen, desired proportion say 0.2 achieved setting NG_c=\"0.2a\" (character input!). NG_c specified prior=\"NG\". NG_tol Minimum number parameter draw one shrinking parameters normal-gamma prior can take. Prevents numerical issues can appear strong shrinkage enforced chosen greater zero. NG_tol specified prior=\"NG\". SSVS_c0 single positive number indicating (unscaled) standard deviation spike component. SSVS_c0 specified prior=\"SSVS\". \\(SSVS_{c0} \\ll SSVS_{c1}\\)! SSVS_c0 specified prior=\"SSVS\". SSVS_c1 single positive number indicating (unscaled) standard deviation slab component. SSVS_c0 specified prior=\"SSVS\". \\(SSVS_{c0} \\ll SSVS_{c1}\\)! SSVS_semiautomatic logical. SSVS_semiautomatic=TRUE SSVS_c0 SSVS_c1 scaled variances posterior PHI FLAT conjugate (dependent Normal-Wishart prior). SSVS_semiautomatic specified prior=\"SSVS\". SSVS_p Either single positive number range (0,1) indicating (fixed) prior inclusion probability coefficient. numeric vector length 2 positive entries indicating shape parameters Beta distribution. case Beta hyperprior placed prior inclusion probability. SSVS_p specified prior=\"SSVS\". HMP_lambda1 numeric vector length 2. entries must positive. first indicates shape second rate Gamma hyperprior -lag coefficients. HMP_lambda1 specified prior=\"HMP\". HMP_lambda2 numeric vector length 2. entries must positive. first indicates shape second rate Gamma hyperprior cross-lag coefficients. HMP_lambda2 specified prior=\"HMP\". normal_sds numeric vector length \\(n\\), \\(n = lags M^2\\) number VAR coefficients (excluding intercept), indicating prior variances. single number recycled accordingly! Must positive. normal_sds specified prior=\"normal\". global_grouping One \"global\", \"equation-wise\", \"covariate-wise\", \"olcl-lagwise\" \"fol\" indicating sub-groups semi-global(-local) modifications HS, R2D2, NG, DL SSVS prior. Works also user-specified indicator matrix dimension c(lags*M,M). relevant prior=\"HS\", prior=\"DL\", prior=\"R2D2\", prior=\"NG\" prior=\"SSVS\". ... use!","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/specify_prior_phi.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Specify prior on PHI — specify_prior_phi","text":"baysianVARs_prior_phi-object.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/specify_prior_phi.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Specify prior on PHI — specify_prior_phi","text":"details concerning prior-elicitation VARs please see Gruber & Kastner (2023). Currently one can choose six hierarchical shrinkage priors normal prior: prior=\"HS\" stands Horseshoe-prior, prior=\"R2D2 R\\(^2\\)-induced-Dirichlet-decompostion-prior, prior=\"NG\" normal-gamma-prior, prior=\"DL\" Dirichlet-Laplace-prior, prior=\"SSVS\" stochastic-search-variable-selection-prior, prior=\"HMP\" semi-hierarchical Minnesota prior prior=normal normal-prior. Semi-global shrinkage, .e. group-specific shrinkage pre-specified subgroups coefficients, can achieved argument global_grouping.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/specify_prior_phi.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Specify prior on PHI — specify_prior_phi","text":"Gruber, L. Kastner, G. (2023). Forecasting macroeconomic data Bayesian VARs: Sparse dense? depends! arXiv:2206.04902.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/specify_prior_phi.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Specify prior on PHI — specify_prior_phi","text":"","code":"# Access a subset of the usmacro_growth dataset data <- usmacro_growth[,c(\"GDPC1\", \"CPIAUCSL\", \"FEDFUNDS\")] # Horseshoe prior for a VAR(2) phi_hs <- specify_prior_phi(data = data, lags = 2L ,prior = \"HS\") # Semi-global-local Horseshoe prior for a VAR(2) with semi-global shrinkage parameters for # cross-lag and own-lag coefficients in each lag phi_hs_sg <- specify_prior_phi(data = data, lags = 2L, prior = \"HS\", global_grouping = \"olcl-lagwise\") # Semi-global-local Horseshoe prior for a VAR(2) with equation-wise shrinkage # construct indicator matrix for equation-wise shrinkage semi_global_mat <- matrix(1:ncol(data), 2*ncol(data), ncol(data), byrow = TRUE) phi_hs_ew <- specify_prior_phi(data = data, lags = 2L, prior = \"HS\", global_grouping = semi_global_mat) # (for equation-wise shrinkage one can also use 'global_grouping = \"equation-wise\"') # \\donttest{ # Estimate model with your prior configuration of choice mod <- bvar(data, lags = 2L, prior_phi = phi_hs_sg, quiet = TRUE) # }"},{"path":"https://luisgruber.github.io/bayesianVARs/reference/specify_prior_sigma.html","id":null,"dir":"Reference","previous_headings":"","what":"Specify prior on Sigma — specify_prior_sigma","title":"Specify prior on Sigma — specify_prior_sigma","text":"Configures prior variance-covariance VAR.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/specify_prior_sigma.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Specify prior on Sigma — specify_prior_sigma","text":"","code":"specify_prior_sigma( data = NULL, M = ncol(data), type = c(\"factor\", \"cholesky\"), factor_factors = 1L, factor_restrict = c(\"none\", \"upper\"), factor_priorfacloadtype = c(\"rowwiseng\", \"colwiseng\", \"normal\"), factor_priorfacload = 0.1, factor_facloadtol = 1e-18, factor_priorng = c(1, 1), factor_priormu = c(0, 10), factor_priorphiidi = c(10, 3), factor_priorphifac = c(10, 3), factor_priorsigmaidi = 1, factor_priorsigmafac = 1, factor_priorh0idi = \"stationary\", factor_priorh0fac = \"stationary\", factor_heteroskedastic = TRUE, factor_priorhomoskedastic = NA, factor_interweaving = 4, cholesky_U_prior = c(\"HS\", \"DL\", \"R2D2\", \"NG\", \"SSVS\", \"normal\", \"HMP\"), cholesky_U_tol = 1e-18, cholesky_heteroscedastic = TRUE, cholesky_priormu = c(0, 100), cholesky_priorphi = c(20, 1.5), cholesky_priorsigma2 = c(0.5, 0.5), cholesky_priorh0 = \"stationary\", cholesky_priorhomoscedastic = as.numeric(NA), cholesky_DL_a = \"1/n\", cholesky_DL_tol = 0, cholesky_R2D2_a = 0.4, cholesky_R2D2_b = 0.5, cholesky_R2D2_tol = 0, cholesky_NG_a = 0.5, cholesky_NG_b = 0.5, cholesky_NG_c = 0.5, cholesky_NG_tol = 0, cholesky_SSVS_c0 = 0.001, cholesky_SSVS_c1 = 1, cholesky_SSVS_p = 0.5, cholesky_HMP_lambda3 = c(0.01, 0.01), cholesky_normal_sds = 10, expert_sv_offset = 0, quiet = FALSE, ... )"},{"path":"https://luisgruber.github.io/bayesianVARs/reference/specify_prior_sigma.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Specify prior on Sigma — specify_prior_sigma","text":"data Optional. Data matrix (can time series object). \\(M\\) columns assumed contain single time-series length \\(T\\). M positive integer indicating number time-series VAR. type character, one \"factor\" (default) \"cholesky\", indicating decomposition applied covariance-matrix. factor_factors Number latent factors estimated. required type=\"factor\". factor_restrict Either \"upper\" \"none\", indicating whether factor loadings matrix restricted zeros diagonal (\"upper\") whether elements estimated data (\"none\"). Setting restrict \"upper\" often stabilizes MCMC estimation can important identifying factor loadings matrix, however, generally strong prior assumption. Setting restrict \"none\" usually preferred option identification factor loadings matrix less concern covariance estimation prediction goal. required type=\"factor\". factor_priorfacloadtype Can \"normal\", \"rowwiseng\", \"colwiseng\". required type=\"factor\". \"normal\": Normal prior. value priorfacload interpreted standard deviations Gaussian prior distributions factor loadings. \"rowwiseng\": Row-wise Normal-Gamma prior. value priorfacload interpreted shrinkage parameter . \"colwiseng\": Column-wise Normal-Gamma prior. value priorfacload interpreted shrinkage parameter . details please see Kastner (2019). factor_priorfacload Either matrix dimensions M times factor_factors positive elements single number (recycled accordingly). required type=\"factor\". meaning factor_priorfacload depends setting factor_priorfacloadtype explained . factor_facloadtol Minimum number absolute value factor loadings draw can take. Prevents numerical issues can appear strong shrinkage enforced chosen greater zero. required type=\"factor\". factor_priorng Two-element vector positive entries indicating Normal-Gamma prior's hyperhyperparameters c d (cf. Kastner (2019)). required type=\"factor\". factor_priormu Vector length 2 denoting prior mean standard deviation unconditional levels idiosyncratic log variance processes. required type=\"factor\". factor_priorphiidi Vector length 2, indicating shape parameters Beta prior distributions transformed parameters (phi+1)/2, phi denotes persistence idiosyncratic log variances. required type=\"factor\". factor_priorphifac Vector length 2, indicating shape parameters Beta prior distributions transformed parameters (phi+1)/2, phi denotes persistence factor log variances. required type=\"factor\". factor_priorsigmaidi Vector length M containing prior volatilities log variances. factor_priorsigmaidi exactly one element, recycled idiosyncratic log variances. required type=\"factor\". factor_priorsigmafac Vector length factor_factors containing prior volatilities log variances. factor_priorsigmafac exactly one element, recycled factor log variances. required type=\"factor\". factor_priorh0idi Vector length 1 M, containing information Gaussian prior initial idiosyncratic log variances. required type=\"factor\". element factor_priorh0idi nonnegative number, conditional prior corresponding initial log variance h0 assumed Gaussian mean 0 standard deviation factor_priorh0idi times \\(sigma\\). element factor_priorh0idi string 'stationary', prior corresponding initial log volatility taken stationary distribution, .e. h0 assumed Gaussian mean 0 variance \\(sigma^2/(1-phi^2)\\). factor_priorh0fac Vector length 1 factor_factors, containing information Gaussian prior initial factor log variances. required type=\"factor\". element factor_priorh0fac nonnegative number, conditional prior corresponding initial log variance h0 assumed Gaussian mean 0 standard deviation factor_priorh0fac times \\(sigma\\). element factor_priorh0fac string 'stationary', prior corresponding initial log volatility taken stationary distribution, .e. h0 assumed Gaussian mean 0 variance \\(sigma^2/(1-phi^2)\\). factor_heteroskedastic Vector length 1, 2, M + factor_factors, containing logical values indicating whether time-varying (factor_heteroskedastic = TRUE) constant (factor_heteroskedastic = FALSE) variance estimated. factor_heteroskedastic length 2 recycled accordingly, whereby first element used idiosyncratic variances second element used factor variances. required type=\"factor\". factor_priorhomoskedastic used least one element factor_heteroskedastic set FALSE. case, factor_priorhomoskedastic must matrix positive entries dimension c(M, 2). Values column 1 interpreted shape values column 2 interpreted rate parameter corresponding inverse gamma prior distribution idiosyncratic variances. required type=\"factor\". factor_interweaving following values interweaving factor loadings accepted (required type=\"factor\"): 0: interweaving. 1: Shallow interweaving diagonal entries. 2: Deep interweaving diagonal entries. 3: Shallow interweaving largest absolute entries column. 4: Deep interweaving largest absolute entries column. details please see Kastner et al. (2017). value 4 highly recommended default. cholesky_U_prior character, one \"HS\", \"R2D2\", \"NG\", \"DL\", \"SSVS\", \"HMP\" \"normal\". required type=\"cholesky\". cholesky_U_tol Minimum number absolute value free -diagonal element \\(U\\)-draw can take. Prevents numerical issues can appear strong shrinkage enforced chosen greater zero. required type=\"cholesky\". cholesky_heteroscedastic single logical indicating whether time-varying (cholesky_heteroscedastic = TRUE) constant (cholesky_heteroscedastic = FALSE) variance estimated. required type=\"cholesky\". cholesky_priormu Vector length 2 denoting prior mean standard deviation unconditional levels log variance processes. required type=\"cholesky\". cholesky_priorphi Vector length 2, indicating shape parameters Beta prior distributions transformed parameters (phi+1)/2, phi denotes persistence log variances. required type=\"cholesky\". cholesky_priorsigma2 Vector length 2, indicating shape rate Gamma prior distributions variance log variance processes. (Currently one global setting \\(M\\) processes supported). required type=\"cholesky\". cholesky_priorh0 Vector length 1 M, containing information Gaussian prior initial idiosyncratic log variances. required type=\"cholesky\". element cholesky_priorh0 nonnegative number, conditional prior corresponding initial log variance h0 assumed Gaussian mean 0 standard deviation cholesky_priorh0 times \\(sigma\\). element cholesky_priorh0 string 'stationary', prior corresponding initial log volatility taken stationary distribution, .e. h0 assumed Gaussian mean 0 variance \\(sigma^2/(1-phi^2)\\). cholesky_priorhomoscedastic used cholesky_heteroscedastic=FALSE. case, cholesky_priorhomoscedastic must matrix positive entries dimension c(M, 2). Values column 1 interpreted shape values column 2 interpreted scale parameter corresponding inverse gamma prior distribution variances. required type=\"cholesky\". cholesky_DL_a (Single) positive real number. value interpreted concentration parameter local scales. Smaller values enforce heavier shrinkage. matrix dimension c(s,2) specifies discrete hyperprior, first column contains s support points second column contains associated prior probabilities. cholesky_DL_a specified cholesky_U_prior=\"DL\". cholesky_DL_tol Minimum number parameter draw one shrinking parameters Dirichlet Laplace prior can take. Prevents numerical issues can appear strong shrinkage enforced chosen greater zero. DL_tol specified cholesky_U_prior=\"DL\". cholesky_R2D2_a (Single) positive real number. value interpreted concentration parameter local scales. Smaller values enforce heavier shrinkage. matrix dimension c(s,2) specifies discrete hyperprior, first column contains s support points second column contains associated prior probabilities. cholesky_R2D2_a specified cholesky_U_prior=\"R2D2\". cholesky_R2D2_b single positive number, greater values indicate heavier regularization. cholesky_R2D2_b specified cholesky_U_prior=\"R2D2\". cholesky_R2D2_tol Minimum number parameter draw one shrinking parameters R2D2 prior can take. Prevents numerical issues can appear strong shrinkage enforced chosen greater zero. cholesky_R2D2_tol specified cholesky_U_prior=\"R2D2\". cholesky_NG_a (Single) positive real number. value interpreted concentration parameter local scales. Smaller values enforce heavier shrinkage. matrix dimension c(s,2) specifies discrete hyperprior, first column contains s support points second column contains associated prior probabilities. cholesky_NG_a specified cholesky_U_prior=\"NG\". cholesky_NG_b (Single) positive real number. value indicates shape parameter inverse gamma prior global scales. cholesky_NG_b specified cholesky_U_prior=\"NG\". cholesky_NG_c (Single) positive real number. value indicates scale parameter inverse gamma prior global scales. Expert option set scale parameter proportional NG_a. E.g. case discrete hyperprior NG_a chosen, desired proportion say 0.2 achieved setting NG_c=\"0.2a\" (character input!). cholesky_NG_c specified cholesky_U_prior=\"NG\". cholesky_NG_tol Minimum number parameter draw one shrinking parameters normal-gamma prior can take. Prevents numerical issues can appear strong shrinkage enforced chosen greater zero. cholesky_NG_tol specified cholesky_U_prior=\"NG\". cholesky_SSVS_c0 single positive number indicating (unscaled) standard deviation spike component. cholesky_SSVS_c0 specified choleksy_U_prior=\"SSVS\". \\(SSVS_{c0} \\ll SSVS_{c1}\\)! cholesky_SSVS_c1 single positive number indicating (unscaled) standard deviation slab component. cholesky_SSVS_c1 specified choleksy_U_prior=\"SSVS\". \\(SSVS_{c0} \\ll SSVS_{c1}\\)! cholesky_SSVS_p Either single positive number range (0,1) indicating (fixed) prior inclusion probability coefficient. numeric vector length 2 positive entries indicating shape parameters Beta distribution. case Beta hyperprior placed prior inclusion probability. cholesky_SSVS_p specified choleksy_U_prior=\"SSVS\". cholesky_HMP_lambda3 numeric vector length 2. entries must positive. first indicates shape second rate Gamma hyperprior contemporaneous coefficients. cholesky_HMP_lambda3 specified choleksy_U_prior=\"HMP\". cholesky_normal_sds numeric vector length \\(\\frac{M^2-M}{2}\\), indicating prior variances free -diagonal elements \\(U\\). single number recycled accordingly! Must positive. cholesky_normal_sds specified choleksy_U_prior=\"normal\". expert_sv_offset ... use! quiet logical indicating whether informative output omitted. ... use!","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/specify_prior_sigma.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Specify prior on Sigma — specify_prior_sigma","text":"Object class bayesianVARs_prior_sigma.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/specify_prior_sigma.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Specify prior on Sigma — specify_prior_sigma","text":"bvar offers two different specifications errors: user can choose factor stochastic volatility structure cholesky stochastic volatility structure. cases disturbances \\(\\boldsymbol{\\epsilon}_t\\) assumed follow \\(M\\)-dimensional multivariate normal distribution zero mean variance-covariance matrix \\(\\boldsymbol{\\Sigma}_t\\). case cholesky specification \\(\\boldsymbol{\\Sigma}_t = \\boldsymbol{U}^{\\prime -1} \\boldsymbol{D}_t \\boldsymbol{U}^{-1}\\), \\(\\boldsymbol{U}^{-1}\\) upper unitriangular (ones diagonal). diagonal matrix \\(\\boldsymbol{D}_t\\) depends upon latent log-variances, .e. \\(\\boldsymbol{D}_t=diag(exp(h_{1t}),\\dots, exp(h_{Mt})\\). log-variances follow priori independent autoregressive processes \\(h_{}\\sim N(\\mu_i + \\phi_i(h_{,t-1}-\\mu_i),\\sigma_i^2)\\) \\(=1,\\dots,M\\). case factor structure, \\(\\boldsymbol{\\Sigma}_t = \\boldsymbol{\\Lambda} \\boldsymbol{V}_t \\boldsymbol{\\Lambda}^\\prime + \\boldsymbol{G}_t\\). diagonal matrices \\(\\boldsymbol{V}_t\\) \\(\\boldsymbol{G}_t\\) depend upon latent log-variances, .e. \\(\\boldsymbol{G}_t=diag(exp(h_{1t}),\\dots, exp(h_{Mt})\\) \\(\\boldsymbol{V}_t=diag(exp(h_{M+1,t}),\\dots, exp(h_{M+r,t})\\). log-variances follow priori independent autoregressive processes \\(h_{}\\sim N(\\mu_i + \\phi_i(h_{,t-1}-\\mu_i),\\sigma_i^2)\\) \\(=1,\\dots,M\\) \\(h_{M+j,t}\\sim N(\\phi_ih_{M+j,t-1},\\sigma_{M+j}^2)\\) \\(j=1,\\dots,r\\).","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/specify_prior_sigma.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Specify prior on Sigma — specify_prior_sigma","text":"Kastner, G. (2019). Sparse Bayesian Time-Varying Covariance Estimation Many Dimensions Journal Econometrics, 210(1), 98--115, doi:10.1016/j.jeconom.2018.11.007 Kastner, G., Frühwirth-Schnatter, S., Lopes, H.F. (2017). Efficient Bayesian Inference Multivariate Factor Stochastic Volatility Models. Journal Computational Graphical Statistics, 26(4), 905--917, doi:10.1080/10618600.2017.1322091 .","code":""},{"path":[]},{"path":"https://luisgruber.github.io/bayesianVARs/reference/specify_prior_sigma.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Specify prior on Sigma — specify_prior_sigma","text":"","code":"# Access a subset of the usmacro_growth dataset data <- usmacro_growth[,c(\"GDPC1\", \"CPIAUCSL\", \"FEDFUNDS\")] # examples with stochastic volatility (heteroscedasticity) ----------------- # factor-decomposition with 2 factors and colwise normal-gamma prior on the loadings sigma_factor_cng_sv <- specify_prior_sigma(data = data, type = \"factor\", factor_factors = 2L, factor_priorfacloadtype = \"colwiseng\", factor_heteroskedastic = TRUE) #> #> Since argument 'type' is specified with 'factor', all arguments starting with 'cholesky_' are being ignored. # cholesky-decomposition with Dirichlet-Laplace prior on U sigma_cholesky_dl_sv <- specify_prior_sigma(data = data, type = \"cholesky\", cholesky_U_prior = \"DL\", cholesky_DL_a = 0.5, cholesky_heteroscedastic = TRUE) #> #> Since argument 'type' is specified with 'cholesky', all arguments starting with 'factor_' are being ignored. # examples without stochastic volatility (homoscedasticity) ---------------- # factor-decomposition with 2 factors and colwise normal-gamma prior on the loadings sigma_factor_cng <- specify_prior_sigma(data = data, type = \"factor\", factor_factors = 2L, factor_priorfacloadtype = \"colwiseng\", factor_heteroskedastic = FALSE, factor_priorhomoskedastic = matrix(c(0.5,0.5), ncol(data), 2)) #> #> Since argument 'type' is specified with 'factor', all arguments starting with 'cholesky_' are being ignored. #> #> Cannot do deep factor_interweaving if (some) factor_factors are homoskedastic. Setting 'factor_interweaving' to 3. # cholesky-decomposition with Horseshoe prior on U sigma_cholesky_dl <- specify_prior_sigma(data = data, type = \"cholesky\", cholesky_U_prior = \"HS\", cholesky_heteroscedastic = FALSE) #> #> Since argument 'type' is specified with 'cholesky', all arguments starting with 'factor_' are being ignored. #> #> Argument 'cholesky_priorhomoscedastic' not specified. Setting both shape and rate of inverse gamma prior equal to 0.01. # \\donttest{ # Estimate model with your prior configuration of choice mod <- bvar(data, prior_sigma = sigma_factor_cng_sv, quiet = TRUE) # }"},{"path":"https://luisgruber.github.io/bayesianVARs/reference/stable_bvar.html","id":null,"dir":"Reference","previous_headings":"","what":"Stable posterior draws — stable_bvar","title":"Stable posterior draws — stable_bvar","text":"stable_bvar() detects discards posterior draws bayesianVARs_bvar object fulfill stability condition: VAR(p) model considered stable eigenvalues companion form matrix lie inside unit circle.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/stable_bvar.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Stable posterior draws — stable_bvar","text":"","code":"stable_bvar(object, quiet = FALSE)"},{"path":"https://luisgruber.github.io/bayesianVARs/reference/stable_bvar.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Stable posterior draws — stable_bvar","text":"object bayesianVARs_bvar object obtained via bvar(). quiet logical indicating whether informative output omitted.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/stable_bvar.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Stable posterior draws — stable_bvar","text":"object type bayesianVARs_bvar.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/stable_bvar.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Stable posterior draws — stable_bvar","text":"","code":"# Access a subset of the usmacro_growth dataset data <- usmacro_growth[,c(\"GDPC1\", \"CPIAUCSL\", \"FEDFUNDS\")] # Estimate a model mod <- bvar(data, sv_keep = \"all\", quiet = TRUE) # Discard \"unstable\" draws stable_mod <- stable_bvar(mod) #> #> Original 'bayesianVARs_bvar' object consists of 1000 posterior draws. #> #> Detected 475 unstable draws. #> #> Remaining draws: 525 !"},{"path":"https://luisgruber.github.io/bayesianVARs/reference/sub-.bayesianVARs_coef.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract or Replace Parts of a bayesianVARs_coef object — [.bayesianVARs_coef","title":"Extract or Replace Parts of a bayesianVARs_coef object — [.bayesianVARs_coef","text":"Extract replace parts bayesianVARs_coef object.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/sub-.bayesianVARs_coef.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract or Replace Parts of a bayesianVARs_coef object — [.bayesianVARs_coef","text":"","code":"# S3 method for bayesianVARs_coef [(x, i, j, ...)"},{"path":"https://luisgruber.github.io/bayesianVARs/reference/sub-.bayesianVARs_coef.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract or Replace Parts of a bayesianVARs_coef object — [.bayesianVARs_coef","text":"x object type bayesianVARs_coef. indices j indices ... indices","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/sub-.bayesianVARs_coef.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extract or Replace Parts of a bayesianVARs_coef object — [.bayesianVARs_coef","text":"object type bayesianVARs_coef.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/sub-.bayesianVARs_coef.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Extract or Replace Parts of a bayesianVARs_coef object — [.bayesianVARs_coef","text":"","code":"# Access a subset of the usmacro_growth dataset data <- usmacro_growth[,c(\"GDPC1\", \"CPIAUCSL\", \"FEDFUNDS\")] # Estimate a model mod <- bvar(data, sv_keep = \"all\", quiet = TRUE) # Extract coefficients, which are of class bayesianVARs_coef phi <- coef(mod) phi[1,1,1] #> [1] 0.2644423 #> attr(,\"class\") #> [1] \"bayesianVARs_coef\" \"bayesianVARs_draws\""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/sub-.bayesianVARs_draws.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract or Replace Parts of a bayesianVARs_draws object — [.bayesianVARs_draws","title":"Extract or Replace Parts of a bayesianVARs_draws object — [.bayesianVARs_draws","text":"Extract replace parts bayesianVARs_draws object.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/sub-.bayesianVARs_draws.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract or Replace Parts of a bayesianVARs_draws object — [.bayesianVARs_draws","text":"","code":"# S3 method for bayesianVARs_draws [(x, i, j, ...)"},{"path":"https://luisgruber.github.io/bayesianVARs/reference/sub-.bayesianVARs_draws.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract or Replace Parts of a bayesianVARs_draws object — [.bayesianVARs_draws","text":"x object type bayesianVARs_draws. indices j indices ... indices","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/sub-.bayesianVARs_draws.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extract or Replace Parts of a bayesianVARs_draws object — [.bayesianVARs_draws","text":"object type bayesianVARs_draws.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/sub-.bayesianVARs_draws.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Extract or Replace Parts of a bayesianVARs_draws object — [.bayesianVARs_draws","text":"","code":"# Access a subset of the usmacro_growth dataset data <- usmacro_growth[,c(\"GDPC1\", \"CPIAUCSL\", \"FEDFUNDS\")] # Estimate a model mod <- bvar(data, sv_keep = \"all\", quiet = TRUE) # Extract coefficients, which are of class bayesianVARs_draws phi <- coef(mod) phi[1,1,1] #> [1] 0.2662653 #> attr(,\"class\") #> [1] \"bayesianVARs_coef\" \"bayesianVARs_draws\""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/summary.bayesianVARs_bvar.html","id":null,"dir":"Reference","previous_headings":"","what":"Summary method for bayesianVARs_bvar objects — summary.bayesianVARs_bvar","title":"Summary method for bayesianVARs_bvar objects — summary.bayesianVARs_bvar","text":"Summary method bayesianVARs_bvar objects.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/summary.bayesianVARs_bvar.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Summary method for bayesianVARs_bvar objects — summary.bayesianVARs_bvar","text":"","code":"# S3 method for bayesianVARs_bvar summary(object, quantiles = c(0.025, 0.25, 0.5, 0.75, 0.975), ...)"},{"path":"https://luisgruber.github.io/bayesianVARs/reference/summary.bayesianVARs_bvar.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Summary method for bayesianVARs_bvar objects — summary.bayesianVARs_bvar","text":"object bayesianVARs_bvar object obtained via bvar(). quantiles numeric vector quantiles compute. ... Currently ignored!","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/summary.bayesianVARs_bvar.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Summary method for bayesianVARs_bvar objects — summary.bayesianVARs_bvar","text":"object type summary.bayesianVARs_bvar.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/summary.bayesianVARs_bvar.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Summary method for bayesianVARs_bvar objects — summary.bayesianVARs_bvar","text":"","code":"# Access a subset of the usmacro_growth dataset data <- usmacro_growth[,c(\"GDPC1\", \"CPIAUCSL\", \"FEDFUNDS\")] # Estimate model mod <- bvar(data, quiet = TRUE) # Summary sum <- summary(mod)"},{"path":"https://luisgruber.github.io/bayesianVARs/reference/summary.bayesianVARs_draws.html","id":null,"dir":"Reference","previous_headings":"","what":"Summary statistics for bayesianVARs posterior draws. — summary.bayesianVARs_draws","title":"Summary statistics for bayesianVARs posterior draws. — summary.bayesianVARs_draws","text":"Summary statistics bayesianVARs posterior draws.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/summary.bayesianVARs_draws.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Summary statistics for bayesianVARs posterior draws. — summary.bayesianVARs_draws","text":"","code":"# S3 method for bayesianVARs_draws summary(object, quantiles = c(0.25, 0.5, 0.75), ...)"},{"path":"https://luisgruber.github.io/bayesianVARs/reference/summary.bayesianVARs_draws.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Summary statistics for bayesianVARs posterior draws. — summary.bayesianVARs_draws","text":"object object class bayesianVARs_draws usually obtained extractors like coef.bayesianVARs_bvar() vcov.bayesianVARs_bvar(). quantiles vector quantiles evaluate. ... Currently ignored.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/summary.bayesianVARs_draws.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Summary statistics for bayesianVARs posterior draws. — summary.bayesianVARs_draws","text":"list object class bayesianVARs_draws_summary holding mean: Vector matrix containing posterior mean. sd: Vector matrix containing posterior standard deviation . quantiles: Array containing posterior quantiles.","code":""},{"path":[]},{"path":"https://luisgruber.github.io/bayesianVARs/reference/summary.bayesianVARs_draws.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Summary statistics for bayesianVARs posterior draws. — summary.bayesianVARs_draws","text":"","code":"# Access a subset of the usmacro_growth dataset data <- usmacro_growth[,c(\"GDPC1\", \"CPIAUCSL\", \"FEDFUNDS\")] # Estimate a model mod <- bvar(data, sv_keep = \"all\", quiet = TRUE) # Extract posterior draws of VAR coefficients bvar_coefs <- coef(mod) # Compute summary statistics summary_stats <- summary(bvar_coefs) # Compute summary statistics of VAR coefficients without using coef() summary_stats <- summary(mod$PHI) # Test which list elements of 'mod' are of class 'bayesianVARs_draws'. names(mod)[sapply(names(mod), function(x) inherits(mod[[x]], \"bayesianVARs_draws\"))] #> [1] \"PHI\" \"U\" \"logvar\" \"sv_para\" \"facload\" \"fac\""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/summary.bayesianVARs_predict.html","id":null,"dir":"Reference","previous_headings":"","what":"Summary method for bayesianVARs_predict objects — summary.bayesianVARs_predict","title":"Summary method for bayesianVARs_predict objects — summary.bayesianVARs_predict","text":"Summary method bayesianVARs_predict objects.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/summary.bayesianVARs_predict.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Summary method for bayesianVARs_predict objects — summary.bayesianVARs_predict","text":"","code":"# S3 method for bayesianVARs_predict summary(object, ...)"},{"path":"https://luisgruber.github.io/bayesianVARs/reference/summary.bayesianVARs_predict.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Summary method for bayesianVARs_predict objects — summary.bayesianVARs_predict","text":"object bayesianVARs_predict object obtained via predict.bayesianVARs_bvar(). ... Currently ignored!","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/summary.bayesianVARs_predict.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Summary method for bayesianVARs_predict objects — summary.bayesianVARs_predict","text":"summary.bayesianVARs_predict object.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/summary.bayesianVARs_predict.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Summary method for bayesianVARs_predict objects — summary.bayesianVARs_predict","text":"","code":"# Access a subset of the usmacro_growth dataset data <- usmacro_growth[,c(\"GDPC1\", \"CPIAUCSL\", \"FEDFUNDS\")] # Split data in train and test train <- data[1:(nrow(data)-4),] test <- data[-c(1:(nrow(data)-4)),] # Estimate model using train data only mod <- bvar(train, quiet = TRUE) # Simulate from 1-step ahead posterior predictive predictions <- predict(mod, ahead = 1L) #> 'stable=TRUE': Calling 'stable_bvar()' to discard those posterior #> draws, that do not fulfill the stable criterion. #> #> 597 stable posterior draws remaining for prediction! summary(predictions) #> #> Prediction quantiles: #> , , GDPC1 #> #> t+1 #> 5% -0.06623 #> 50% -0.02089 #> 95% 0.02220 #> #> , , CPIAUCSL #> #> t+1 #> 5% -0.019613 #> 50% -0.008145 #> 95% 0.003785 #> #> , , FEDFUNDS #> #> t+1 #> 5% -0.022382 #> 50% -0.003965 #> 95% 0.013119 #>"},{"path":"https://luisgruber.github.io/bayesianVARs/reference/usmacro_growth.html","id":null,"dir":"Reference","previous_headings":"","what":"Data from the US-economy — usmacro_growth","title":"Data from the US-economy — usmacro_growth","text":"21 selected quarterly time-series 1953:Q1 2021:Q2. FRED-QD data base (McCracken Ng, 2021). Release date 2021-07. Data transformed interpreted growth-rates (first log-differences exception interest rates, already growth rates).","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/usmacro_growth.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Data from the US-economy — usmacro_growth","text":"","code":"usmacro_growth"},{"path":"https://luisgruber.github.io/bayesianVARs/reference/usmacro_growth.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Data from the US-economy — usmacro_growth","text":"matrix 247 rows 21 columns.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/usmacro_growth.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Data from the US-economy — usmacro_growth","text":"Raw (untransformed) data available https://research.stlouisfed.org/econ/mccracken/fred-databases/, https://files.stlouisfed.org/files/htdocs/fred-md/quarterly/2021-07.csv.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/usmacro_growth.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Data from the US-economy — usmacro_growth","text":"McCracken, M. W. Ng, S. (2021). FRED-QD: Quarterly Database Macroeconomic Research, Review, Federal Reserve Bank St. Louis, 103(1), 1--44, doi:10.20955/r.103.1-44 .","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/vcov.bayesianVARs_bvar.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract posterior draws of the (time-varying) variance-covariance matrix for\na VAR model — vcov.bayesianVARs_bvar","title":"Extract posterior draws of the (time-varying) variance-covariance matrix for\na VAR model — vcov.bayesianVARs_bvar","text":"Returns posterior draws possibly time-varying variance-covariance matrix VAR estimated via bvar(). Returns full paths sv_keep=\"\" calling bvar(). Otherwise, draws variance-covariance matrix last observation returned, .","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/vcov.bayesianVARs_bvar.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract posterior draws of the (time-varying) variance-covariance matrix for\na VAR model — vcov.bayesianVARs_bvar","text":"","code":"# S3 method for bayesianVARs_bvar vcov(object, ...)"},{"path":"https://luisgruber.github.io/bayesianVARs/reference/vcov.bayesianVARs_bvar.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract posterior draws of the (time-varying) variance-covariance matrix for\na VAR model — vcov.bayesianVARs_bvar","text":"object object class bayesianVARs_bvar obtained via bvar(). ... Currently ignored.","code":""},{"path":"https://luisgruber.github.io/bayesianVARs/reference/vcov.bayesianVARs_bvar.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extract posterior draws of the (time-varying) variance-covariance matrix for\na VAR model — vcov.bayesianVARs_bvar","text":"array class bayesianVARs_draws dimension \\(T \\times M \\times M \\times draws\\), \\(T\\) number observations, \\(M\\) number time-series \\(draws\\) number stored posterior draws.","code":""},{"path":[]},{"path":"https://luisgruber.github.io/bayesianVARs/reference/vcov.bayesianVARs_bvar.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Extract posterior draws of the (time-varying) variance-covariance matrix for\na VAR model — vcov.bayesianVARs_bvar","text":"","code":"# Access a subset of the usmacro_growth dataset data <- usmacro_growth[,c(\"GDPC1\", \"CPIAUCSL\", \"FEDFUNDS\")] # Estimate a model mod <- bvar(data, sv_keep = \"all\", quiet = TRUE) # Extract posterior draws of the variance-covariance matrix bvar_vcov <- vcov(mod)"},{"path":[]},{"path":"https://luisgruber.github.io/bayesianVARs/news/index.html","id":"bayesianvars-010","dir":"Changelog","previous_headings":"","what":"bayesianVARs 0.1.0","title":"bayesianVARs 0.1.0","text":"CRAN release: 2024-01-13 Initial CRAN submission.","code":""}]
Gruber L (2024). bayesianVARs: MCMC Estimation of Bayesian Vectorautoregressions. -R package version 0.1.1, https://luisgruber.github.io/bayesianVARs/, https://github.com/luisgruber/bayesianVARs. +R package version 0.1.0.9000, https://luisgruber.github.io/bayesianVARs/, https://github.com/luisgruber/bayesianVARs.
@Manual{, title = {bayesianVARs: MCMC Estimation of Bayesian Vectorautoregressions}, author = {Luis Gruber}, year = {2024}, - note = {R package version 0.1.1, https://luisgruber.github.io/bayesianVARs/}, + note = {R package version 0.1.0.9000, https://luisgruber.github.io/bayesianVARs/}, url = {https://github.com/luisgruber/bayesianVARs}, }
CRAN release: 2024-01-17
CRAN release: 2024-01-13