Skip to content

Commit

Permalink
Merge pull request #23 from lehmasve/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
lehmasve authored Jun 5, 2023
2 parents 139e61d + f0840fe commit ca54bc6
Show file tree
Hide file tree
Showing 13 changed files with 55 additions and 47 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@
^CRAN-SUBMISSION$
^\.github$
^codecov\.yml$
^cran-comments\.md$
46 changes: 21 additions & 25 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,35 +1,31 @@
Package: hdflex
Type: Package
Package: hdflex
Title: High-Dimensional Density Forecast Combinations
Version: 0.1.0
Date: 2023-02-06
Authors@R: c(
person("Sven", "Lehmann",
email = "sven.lehmann@uni-rostock.de",
role = c("aut", "cre")),
person("Philipp", "Adämmer",
email = "philipp.adaemmer@uni-greifswald.de",
role = "aut"),
person("Rainer", "Schüssler",
email = "Rainer.schüssler@uni-rostock.de",
role = "aut"))
person("Sven", "Lehmann", , "sven.lehmann@uni-rostock.de", role = c("aut", "cre")),
person("Philipp", "Adämmer", , "philipp.adaemmer@uni-greifswald.de", role = "aut"),
person("Rainer", "Schüssler", , "Rainer.schüssler@uni-rostock.de", role = "aut"))
Maintainer: Sven Lehmann <sven.lehmann@uni-rostock.de>
Description: Provides functions to estimate and evaluate density forecast combinations in a high-dimensional setting. The methods are explained in detail in Adämmer et al (2023) <http://dx.doi.org/10.2139/ssrn.4342487>.
Description: Provides functions to estimate and evaluate density forecast
combinations in a high-dimensional setting. The methods are explained
in detail in Adaemmer et al. (2023) <doi:10.2139/ssrn.4342487>.
License: GPL (>= 2)
Depends: R (>= 4.1.0)
NeedsCompilation: Yes
Depends:
R (>= 4.1.0)
Imports:
parallel (>= 4.1.0),
dplyr (>= 1.1.0),
Rcpp (>= 1.0.10),
roll (>= 1.1.6),
stringr (>= 1.5.0),
checkmate (>= 2.1.0)
LinkingTo: Rcpp, RcppArmadillo
RoxygenNote: 7.2.3
Encoding: UTF-8
checkmate (>= 2.1.0),
dplyr (>= 1.1.0),
parallel (>= 4.1.0),
Rcpp (>= 1.0.10),
roll (>= 1.1.6),
stats (>= 4.1.0),
stringr (>= 1.5.0)
Suggests:
covr,
testthat (>= 3.0.0)
testthat (>= 3.0.0)
LinkingTo: Rcpp, RcppArmadillo
Config/testthat/edition: 3
Encoding: UTF-8
LazyData: true
NeedsCompilation: Yes
RoxygenNote: 7.2.3
3 changes: 3 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# hdflex 0.1.0

* Added a `NEWS.md` file to track changes to the package.
4 changes: 2 additions & 2 deletions R/data-documentation.R
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
#' Welch, I. and Goyal, A. (2008) "A comprehensive look at the empirical performance of equity premium prediction."
#' \emph{The Review of Financial Studies}, 21 (4): 1455–1508.
#'
#' @source \url{https://onlinelibrary.wiley.com/doi/full/10.1111/iere.12623}
#' @source <https://doi.org/10.1111/iere.12623>
"inflation_data"


Expand All @@ -89,7 +89,7 @@
#' Koop, G. and Korobilis, D. (2023) "Bayesian dynamic variable selection in high dimensions."
#' \emph{International Economic Review}.
#'
#' @source \url{https://onlinelibrary.wiley.com/doi/full/10.1111/iere.12623}
#' @source <https://doi.org/10.1111/iere.12623>
"benchmark_ar2"


12 changes: 6 additions & 6 deletions R/dsc.R
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@
#' to down-weight the past predictive performance of the subset combinations.
#' @param n_cores An integer that denotes the number of CPU-cores
#' used for the computational estimation.
#' @return A list that contains
#' (1) a vector with the first moments (point forecasts) of the STSC-Model,
#' (2) a vector with the the second moments (variance) of the STSC-Model,
#' (3) a vector that contains the selected values for gamma,
#' (4) a vector that contains the selected values for psi and
#' (5) a matrix that indicates the selected signals for every point in time.
#' @return A list that contains:
#' * (1) a vector with the first moments (point forecasts) of the STSC-Model,
#' * (2) a vector with the the second moments (variance) of the STSC-Model,
#' * (3) a vector that contains the selected values for gamma,
#' * (4) a vector that contains the selected values for psi and
#' * (5) a matrix that indicates the selected signals for every point in time.
#' @export
#' @import parallel
#' @import checkmate
Expand Down
10 changes: 5 additions & 5 deletions R/summary_stsc.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
#' or numeric vector of length `T` containing the
#' out-of-sample forecasts of dsc().
#' @export
#' @return List that contains
#' (1) the Clark-West-Statistic,
#' (2) the Out-of-Sample R2,
#' (3) a vector with the CSSED between the STSC-Forecast and the benchmark and
#' (4) a list with the MSE of the STSC-Model and the benchmark.
#' @return List that contains:
#' * (1) the Clark-West-Statistic,
#' * (2) the Out-of-Sample R2,
#' * (3) a vector with the CSSED between the STSC-Forecast and the benchmark and
#' * (4) a list with the MSE of the STSC-Model and the benchmark.
#' @import checkmate
#' @importFrom stats t.test
#' @examples
Expand Down
11 changes: 7 additions & 4 deletions R/tvc.R
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#' Each signal in combination with each value of
#' lambda provides a separate candidate forecast.
#' Constant coefficients are nested for the case `lambda = 1`.
#' @param kappa_grid A numeric vector to accomodate time-varying volatility.
#' @param kappa_grid A numeric vector to accommodate time-varying volatility.
#' The observational variance is estimated via
#' Exponentially Weighted Moving Average.
#' Constant variance is nested for the case `kappa = 1`.
Expand All @@ -31,11 +31,14 @@
#' to initialize the observational variance and the coefficients' variance.
#' @param n_cores An integer that denotes the number of CPU-cores used
#' for the computation.
#' @return A list that contains
#' (1) a matrix with the first moments (point forecasts)
#' @return A list that contains:
#'
#' * (1) a matrix with the first moments (point forecasts)
#' of the conditionally normal predictive distributions and
#' (2) a matrix with the second moments (variance)
#'
#' * (2) a matrix with the second moments (variance)
#' of the conditionally normal predictive distributions.
#'
#' @export
#' @import parallel
#' @import checkmate
Expand Down
2 changes: 1 addition & 1 deletion README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ output: github_document

<!-- badges: start -->
[![R-CMD-check](https://github.com/lehmasve/hdflex/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/lehmasve/hdflex/actions/workflows/R-CMD-check.yaml)
[![codecov](https://codecov.io/gh/lehmasve/hdflex/branch/dev/graph/badge.svg?token=leKtsb0Kub)](https://codecov.io/gh/lehmasve/hdflex)
[![codecov](https://codecov.io/gh/lehmasve/hdflex/branch/dev/graph/badge.svg?token=leKtsb0Kub)](https://app.codecov.io/gh/lehmasve/hdflex)
<!-- badges: end -->

```{r setup, include = FALSE}
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<!-- badges: start -->
[![R-CMD-check](https://github.com/lehmasve/hdflex/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/lehmasve/hdflex/actions/workflows/R-CMD-check.yaml)
[![codecov](https://codecov.io/gh/lehmasve/hdflex/branch/dev/graph/badge.svg?token=leKtsb0Kub)](https://codecov.io/gh/lehmasve/hdflex)
[![codecov](https://codecov.io/gh/lehmasve/hdflex/branch/dev/graph/badge.svg?token=leKtsb0Kub)](https://app.codecov.io/gh/lehmasve/hdflex)
<!-- badges: end -->

## About
Expand Down
5 changes: 5 additions & 0 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
## R CMD check results

0 errors | 0 warnings | 1 note

* This is a new release.
2 changes: 1 addition & 1 deletion man/inflation_data.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/tvc.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/Makevars.win
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
##
## And with R 3.4.0, and RcppArmadillo 0.7.960.*, we turn C++11 on as OpenMP
## support within Armadillo prefers / requires it
CXX_STD = CXX11
## CXX_STD = CXX11

PKG_CXXFLAGS = $(SHLIB_OPENMP_CXXFLAGS)
PKG_LIBS = $(SHLIB_OPENMP_CXXFLAGS) $(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS)

0 comments on commit ca54bc6

Please sign in to comment.