Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
7560831
Fixed a bug with a discontinuity in the forecast when plotting. See #6.
ankargren Apr 17, 2019
2a66e7b
Bugs in ss when multiple deterministic variables used fixed. See #7.
ankargren May 9, 2019
518f77b
Roxygen version updated.
ankargren May 9, 2019
1880c86
Adding fsv changes.
ankargren Jun 26, 2019
85a53a9
iw prepared for new mcmc generic.
Jun 26, 2019
9b42e38
Updating functions for new API
Jun 26, 2019
e3fefe4
Making package more lightweight by combining functions.
Jun 26, 2019
1f5ee2d
Fixed some bugs. Diffuse not tested yet.
Jun 28, 2019
6d3dd8b
Minor updates
Jul 1, 2019
9bed5de
Preparing for CRAN
ankargren Aug 18, 2019
6b45a34
Merge branch 'master' into 0.5.1.9000
ankargren Aug 18, 2019
ad813fa
Merge pull request #11 from ankargren/0.5.1.9000
ankargren Aug 18, 2019
6a40bc3
Updated interface.
ankargren Aug 22, 2019
f6e830e
Temporarily removing cleanup/configure
ankargren Aug 22, 2019
6cf9b6f
Adding cleanup/configure.
ankargren Aug 22, 2019
e1e05c4
Testing
ankargren Aug 23, 2019
a9b178b
Testing 2
ankargren Aug 23, 2019
0015ec7
Testing before_install.
ankargren Aug 26, 2019
6148e4b
Added tinytex.
ankargren Aug 26, 2019
5994813
No vignettes on Travis.
ankargren Aug 27, 2019
9537dfa
ignoring vignettes on travis
ankargren Aug 27, 2019
d636136
Travis changed
ankargren Aug 27, 2019
fd663f0
Release
ankargren Aug 27, 2019
87f81e2
Decreased number of draws in tests to avoid time out.
ankargren Aug 27, 2019
abd76ff
Ready for CRAN.
ankargren Aug 30, 2019
bf9b364
Ready for CRAN.
ankargren Aug 30, 2019
c017496
Bug fix.
ankargren Nov 19, 2019
8fe2734
Fixed some remaining issues.
ankargren Nov 20, 2019
ce5a893
dl prior is very experimental.
ankargren Dec 3, 2019
25079d4
Updated vignette.
ankargren Jan 6, 2020
5e06f93
Updated date.
ankargren Jan 8, 2020
4714e1e
Updated vignette to run faster.
ankargren Jan 8, 2020
6275ba1
Updated references. Submitted to CRAN.
ankargren Jan 9, 2020
b34a38a
Fixed a bug caused by a change in ggplot2 3.3.0.
ankargren Mar 18, 2020
85f25f0
Updated cran comments.
ankargren Mar 19, 2020
405153b
Updated interface. Now takes a list as input.
ankargren May 5, 2020
de017db
Additional update.
ankargren May 5, 2020
d5e8aff
First commit that includes extension to support weekly data. Untested.
ankargren Jun 25, 2020
9780d01
Added ridge to OLS initialization to avoid reduced rank
ankargren Aug 25, 2020
93d0ecf
Updated vignette to not retrieve data online. Fixed error with single…
ankargren Feb 1, 2021
cb0b72b
Updated how Lambda is handled. Improved interface to handle w, m, q.
ankargren Feb 3, 2021
e90882a
New version prepared. Fixed some references.
ankargren Feb 4, 2021
b6880ec
Minor documentation fixes
ankargren Feb 9, 2021
85c543a
Improved numerical stability for mdd
ankargren Feb 10, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified .DS_Store
Binary file not shown.
17 changes: 10 additions & 7 deletions .Rbuildignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
^.*\.Rproj$
^\.Rproj\.user$
README.rmd
README_cache/
codecov.yml
README.md
cran-comments.md
man-roxygen
\.travis.yml
_config.yml
^README\.Rmd$
^README-.*\.png$
README_cache
^\.travis\.yml$
^_config\.yml$
^codecov\.yml$
^cran-comments\.md$
^/\.gitattributes$
^doc$
^Meta$
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Declare files that will always have LF line endings on checkout.
^configure\.ac$ text eol=lf
^cleanup$ text eol=lf
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
.Rproj.user
.Rhistory
.RData
.Ruserdata
src/*.o
src/*.so
src/*.dll
autom4te.cache/
README_cache/
src/.DS_Store
Meta
.DS_Store
doc
24 changes: 13 additions & 11 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,21 @@
# R for travis: see documentation at https://docs.travis-ci.com/user/languages/r

language: R
sudo: false
sudo: true
cache: packages
warnings_are_errors: true
os:
- linux
- osx
r:
- oldrel
- release
- devel

r_check_args: --as-cran

matrix:
exclude:
- os: osx
r: devel

branches:
only:
- master

r_github_packages:
- jimhester/covr
- r-lib/covr
r_binary_packages:
- Rcpp
- RcppArmadillo
Expand All @@ -32,6 +24,16 @@ r_binary_packages:
- testthat
- roxygen2
- devtools
- factorstochvol
- tinytex

before_install:
- chmod +x configure
- chmod +x cleanup

r_build_args: --no-build-vignettes --no-manual --no-resave-data
r_check_args: --ignore-vignettes --no-manual


after_success:
- tar -C .. -xf $PKG_TARBALL
Expand Down
35 changes: 26 additions & 9 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,21 +1,38 @@
Package: mfbvar
Type: Package
Title: Mixed-Frequency Bayesian VAR Models
Version: 0.5.0.9000
Date: 2019-05-09
Version: 0.5.6
Date: 2021-02-09
Authors@R: c(
person("Sebastian", "Ankargren", email = "[email protected]", role = c("cre", "aut"), comment = c(ORCID = "0000-0003-4415-8734")),
person("Yukai", "Yang", email = "[email protected]", role = c("aut"), comment=c(ORCID="0000-0002-2623-8549")))
Description: Estimation of mixed-frequency Bayesian vector autoregressive (VAR) models with Minnesota or steady-state priors. The package implements a state space-based VAR model that handles mixed frequencies of the data. The model is estimated using Markov Chain Monte Carlo to numerically approximate the posterior distribution, where the prior can be either the Minnesota prior, as used by Schorfheide and Song (2015) <doi:10.1080/07350015.2014.954707>, or the steady-state prior, as advocated by Ankargren, Unosson and Yang (2018) <http://uu.diva-portal.org/smash/get/diva2:1260262/FULLTEXT01.pdf>.
person("Yukai", "Yang", email = "[email protected]", role = c("aut"), comment=c(ORCID="0000-0002-2623-8549")),
person("Gregor", "Kastner", role = "ctb", comment = c(ORCID="0000-0002-8237-8271")))
Description: Functions and tools for estimation of mixed-frequency Bayesian vector autoregressive (VAR) models. The package implements a state space-based VAR model that handles mixed frequencies of the data as proposed by Schorfheide and Song (2015) <doi:10.1080/07350015.2014.954707>, and extensions thereof developed by Ankargren, Unosson and Yang (2020) <doi:10.1515/jtse-2018-0034>, Ankargren and Joneus (2019) <arXiv:1912.02231>, and Ankargren and Joneus (2020) <doi:10.1016/j.ecosta.2020.05.007>. The models are estimated using Markov Chain Monte Carlo to numerically approximate the posterior distribution. Prior distributions that can be used include normal-inverse Wishart and normal-diffuse priors as well as steady-state priors. Stochastic volatility can be handled by common or factor stochastic volatility models.
License: GPL-3
LazyData: TRUE
URL: https://github.com/ankargren/mfbvar
BugReports: https://github.com/ankargren/mfbvar/issues
Imports:
Rcpp (>= 0.12.7), ggplot2 (>= 2.2.1), methods, pbapply, utils, factorstochvol, progress, lubridate, GIGrvg
Rcpp (>= 0.12.7),
ggplot2 (>= 3.3.0),
methods,
lubridate,
GIGrvg,
stochvol (>= 2.0.3),
RcppParallel,
dplyr,
magrittr,
tibble,
zoo
LinkingTo:
Rcpp, RcppArmadillo, RcppProgress
Depends: R (>= 2.10)
Suggests: testthat, covr, tidyverse
RoxygenNote: 6.1.1
Rcpp,
RcppArmadillo,
RcppProgress,
stochvol (>= 2.0.3),
RcppParallel
Depends: R (>= 3.5.0)
Suggests: testthat, covr, knitr, ggridges, alfred, factorstochvol
RoxygenNote: 7.1.1
Encoding: UTF-8
SystemRequirements: GNU make
VignetteBuilder: knitr
6 changes: 4 additions & 2 deletions MFBVAR.Rproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ StripTrailingWhitespace: Yes

BuildType: Package
PackageUseDevtools: Yes
PackageInstallArgs: --no-multiarch --with-keep.source --clean
PackageCheckArgs: --as-cran --clean
PackageInstallArgs: --no-multiarch --with-keep.source --clean --compact-vignettes=both
PackageBuildArgs: --compact-vignettes=both
PackageBuildBinaryArgs: --compact-vignettes=both
PackageCheckArgs: --as-cran --clean --compact-vignettes=both
PackageRoxygenize: rd,collate
36 changes: 25 additions & 11 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,34 +1,48 @@
importFrom(Rcpp, evalCpp)
useDynLib(mfbvar, .registration = TRUE)
import(stats)
importFrom("utils", "setTxtProgressBar", "txtProgressBar")
importFrom("pbapply", "setTimerProgressBar", "timerProgressBar")
importFrom("progress", "progress_bar")
importFrom(magrittr,"%>%")
importFrom(tibble,"tibble")
importFrom(dplyr, "group_by", "summarize", "ungroup", "mutate", "transmute", "bind_rows")
importFrom(lubridate, "%m-%", "%m+%", "days", "ymd", "quarter", "month", "year")
importFrom(dplyr, "group_by", "summarize", "ungroup", "mutate", "transmute", "bind_rows", "pull")
importFrom(lubridate, "%m-%", "%m+%", "days", "ymd", "quarter", "month", "year",
"as_date", "day", "days_in_month", "ceiling_date", "floor_date")
import(ggplot2)
importFrom(zoo, "as.Date", "zoo", "as.Date.ts", "index", "merge.zoo")
importFrom(stochvol,svsample)
S3method(print, mfbvar_prior)
S3method(summary, mfbvar_prior)
S3method(mdd, mfbvar_minn_iw)
S3method(mdd, mfbvar_ss_iw)
S3method(mcmc_sampler, mfbvar_minn_iw)
S3method(mcmc_sampler, mfbvar_ss_iw)
S3method(print, mfbvar)
S3method(summary, mfbvar)
S3method(plot, mfbvar_minn)
S3method(plot, mfbvar_ss)
S3method(plot, mfbvar_ssng)
S3method(plot, mfbvar_dl)
S3method(plot, mfbvar_prior)
S3method(mcmc_sampler, mfbvar_minn_fsv)
S3method(mcmc_sampler, mfbvar_dl_fsv)
S3method(mcmc_sampler, mfbvar_ss_fsv)
S3method(mcmc_sampler, mfbvar_ssng_fsv)
S3method(mcmc_sampler, mfbvar_minn_diffuse)
S3method(mcmc_sampler, mfbvar_dl_diffuse)
S3method(mcmc_sampler, mfbvar_ss_diffuse)
S3method(mcmc_sampler, mfbvar_ssng_diffuse)
S3method(mcmc_sampler, mfbvar_minn_csv)
S3method(mcmc_sampler, mfbvar_ss_csv)
S3method(mcmc_sampler, mfbvar_ssng_csv)
S3method(mcmc_sampler, mfbvar_minn_iw)
S3method(mcmc_sampler, mfbvar_ss_iw)
S3method(mcmc_sampler, mfbvar_ssng_iw)
S3method(mdd, mfbvar_ss_iw)
S3method(mdd, mfbvar_minn_iw)
S3method(predict, mfbvar)
S3method(predict, sfbvar)
importFrom("methods", "hasArg")
export(mdd)
export(set_prior)
export(update_prior)
export(estimate_mfbvar)
export(interval_to_moments)
export(mdd)
export(mcmc_sampler)
export(varplot)
importFrom(GIGrvg,rgig)
importFrom(RcppParallel, RcppParallelLibs)

23 changes: 23 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# mfbvar 0.5.6 (2021-02-03)
* Removed use of internet connection in vignette
* Enabled use of weekly-monthly frequency mix

# mfbvar 0.5.4 (2020-05-14)
* Changes to the main interface. Data can (and should) now be given as a list of `zooreg` or `ts` objects.

# mfbvar 0.5.3 (2020-03-18)
* Fixed a bug caused by the plotting functions

# mfbvar 0.5.1 (2019-08-16)
* Support for more priors
* Stochastic volatility models
* Better `predict` functions
* Faster implementations
* Some support for quarterly/monthly (i.e. single-frequency) models
* Vignette added

# TODO
* Impulse responses
* Marginal data densities for more specifications (currently `minn`-`iw` with `average` only), and in C++
* Enable use of less lags than what the aggregations need

Loading