From a13a71fcadd41957a97bbee8e5942d056678455f Mon Sep 17 00:00:00 2001 From: dani Date: Sun, 18 Aug 2024 16:20:33 +0200 Subject: [PATCH] pre-release --- R/boot.R | 4 ++-- R/cov_cs.R | 2 +- R/cov_ct.R | 2 +- R/data.R | 4 ++-- R/fun_residuals.R | 2 +- R/proj_matrix.R | 2 +- R/reco_opt.R | 4 ++-- docs/articles/Replicate-the-thief-package.html | 15 ++++++++------- docs/pkgdown.yml | 2 +- docs/reference/cscov.html | 2 +- docs/reference/csprojmat.html | 2 +- docs/reference/csrec.html | 4 ++-- docs/reference/ctboot.html | 2 +- docs/reference/ctcov.html | 2 +- docs/reference/ctprojmat.html | 2 +- docs/reference/ctrec.html | 4 ++-- docs/reference/residuals.html | 2 +- docs/reference/teboot.html | 2 +- docs/reference/teprojmat.html | 2 +- docs/reference/vndata.html | 4 ++-- docs/search.json | 2 +- man/cscov.Rd | 2 +- man/csprojmat.Rd | 2 +- man/csrec.Rd | 2 +- man/ctboot.Rd | 2 +- man/ctcov.Rd | 2 +- man/ctprojmat.Rd | 2 +- man/ctrec.Rd | 2 +- man/residuals.Rd | 2 +- man/teboot.Rd | 2 +- man/teprojmat.Rd | 2 +- man/vndata.Rd | 4 ++-- .../articles/Replicate-the-thief-package.qmd | 10 +++++----- 33 files changed, 51 insertions(+), 50 deletions(-) diff --git a/R/boot.R b/R/boot.R index fd02811..7f86686 100755 --- a/R/boot.R +++ b/R/boot.R @@ -75,7 +75,7 @@ csboot <- function(model_list, boot_size, block_size, seed = NULL){ #' @references #' Girolimetto, D., Athanasopoulos, G., Di Fonzo, T. and Hyndman, R.J. (2023), Cross-temporal #' probabilistic forecast reconciliation: Methodological and practical issues. -#' \emph{International Journal of Forecasting}, in press. \doi{10.1016/j.ijforecast.2023. 10.003} +#' \emph{International Journal of Forecasting}, in press. \doi{10.1016/j.ijforecast.2023.10.003} #' #' @family Bootstrap samples #' @family Framework: temporal @@ -135,7 +135,7 @@ teboot <- function(model_list, boot_size, agg_order, block_size = 1, seed = NULL #' @references #' Girolimetto, D., Athanasopoulos, G., Di Fonzo, T. and Hyndman, R.J. (2023), Cross-temporal #' probabilistic forecast reconciliation: Methodological and practical issues. -#' \emph{International Journal of Forecasting}, in press. \doi{10.1016/j.ijforecast.2023. 10.003} +#' \emph{International Journal of Forecasting}, in press. \doi{10.1016/j.ijforecast.2023.10.003} #' #' @family Bootstrap samples #' @family Framework: cross-temporal diff --git a/R/cov_cs.R b/R/cov_cs.R index 640f2b6..259c8c0 100755 --- a/R/cov_cs.R +++ b/R/cov_cs.R @@ -60,7 +60,7 @@ #' Wickramasuriya, S.L., Athanasopoulos, G. and Hyndman, R.J. (2019), Optimal forecast #' reconciliation for hierarchical and grouped time series through trace minimization, #' \emph{Journal of the American Statistical Association}, 114, 526, 804-819. -#' \doi{10.1080/01621459. 2018.1448825} +#' \doi{10.1080/01621459.2018.1448825} #' #' @export cscov <- function(comb = "ols", n = NULL, agg_mat = NULL, res = NULL, mse = TRUE, diff --git a/R/cov_ct.R b/R/cov_ct.R index 06982a1..fc91059 100755 --- a/R/cov_ct.R +++ b/R/cov_ct.R @@ -51,7 +51,7 @@ #' Girolimetto, D., Athanasopoulos, G., Di Fonzo, T. and Hyndman, R.J. (2024), #' Cross-temporal probabilistic forecast reconciliation: Methodological and #' practical issues. \emph{International Journal of Forecasting}, 40, 3, 1134-1151. -#' \doi{10.1016/j.ijforecast.2023. 10.003} +#' \doi{10.1016/j.ijforecast.2023.10.003} #' #' @examples #' set.seed(123) diff --git a/R/data.R b/R/data.R index 1bc0cbe..534e6c6 100644 --- a/R/data.R +++ b/R/data.R @@ -92,12 +92,12 @@ #' Girolimetto, D., Athanasopoulos, G., Di Fonzo, T. and Hyndman, R.J. (2024), #' Cross-temporal probabilistic forecast reconciliation: Methodological and #' practical issues. \emph{International Journal of Forecasting}, 40, 3, 1134-1151. -#' \doi{10.1016/j.ijforecast.2023. 10.003} +#' \doi{10.1016/j.ijforecast.2023.10.003} #' #' Wickramasuriya, S.L., Athanasopoulos, G. and Hyndman, R.J. (2019), Optimal forecast #' reconciliation for hierarchical and grouped time series through trace minimization, #' \emph{Journal of the American Statistical Association}, 114, 526, 804-819. -#' \doi{10.1080/ 01621459.2018.1448825} +#' \doi{10.1080/01621459.2018.1448825} #' #' @source "vndata" diff --git a/R/fun_residuals.R b/R/fun_residuals.R index 1046904..0739976 100755 --- a/R/fun_residuals.R +++ b/R/fun_residuals.R @@ -26,7 +26,7 @@ #' Girolimetto, D., Athanasopoulos, G., Di Fonzo, T. and Hyndman, R.J. (2024), #' Cross-temporal probabilistic forecast reconciliation: Methodological and #' practical issues. \emph{International Journal of Forecasting}, 40, 3, 1134-1151. -#' \doi{10.1016/j.ijforecast.2023. 10.003} +#' \doi{10.1016/j.ijforecast.2023.10.003} #' #' @family Utilities #' @rdname residuals diff --git a/R/proj_matrix.R b/R/proj_matrix.R index 676deb2..d69480f 100755 --- a/R/proj_matrix.R +++ b/R/proj_matrix.R @@ -21,7 +21,7 @@ #' Girolimetto, D., Athanasopoulos, G., Di Fonzo, T. and Hyndman, R.J. (2024), #' Cross-temporal probabilistic forecast reconciliation: Methodological and #' practical issues. \emph{International Journal of Forecasting}, 40, 3, 1134-1151. -#' \doi{10.1016/j.ijforecast.2023. 10.003} +#' \doi{10.1016/j.ijforecast.2023.10.003} #' #' @examples #' # Cross-sectional framework diff --git a/R/reco_opt.R b/R/reco_opt.R index 79fa838..2a65fb7 100755 --- a/R/reco_opt.R +++ b/R/reco_opt.R @@ -62,7 +62,7 @@ #' Wickramasuriya, S.L., Athanasopoulos, G. and Hyndman, R.J. (2019), Optimal forecast #' reconciliation for hierarchical and grouped time series through trace minimization, #' \emph{Journal of the American Statistical Association}, 114, 526, 804-819. -#' \doi{10.1080/ 01621459.2018.1448825} +#' \doi{10.1080/01621459.2018.1448825} #' #' Zhang, B., Kang, Y., Panagiotelis, A. and Li, F. (2023), Optimal reconciliation with #' immutable forecasts, \emph{European Journal of Operational Research}, 308(2), 650–660. @@ -467,7 +467,7 @@ terec <- function(base, agg_order, comb = "ols", res = NULL, tew = "sum", #' Girolimetto, D., Athanasopoulos, G., Di Fonzo, T. and Hyndman, R.J. (2024), #' Cross-temporal probabilistic forecast reconciliation: Methodological and #' practical issues. \emph{International Journal of Forecasting}, 40, 3, 1134-1151. -#' \doi{10.1016/j.ijforecast.2023. 10.003} +#' \doi{10.1016/j.ijforecast.2023.10.003} #' #' Hyndman, R.J., Ahmed, R.A., Athanasopoulos, G. and Shang, H.L. (2011), #' Optimal combination forecasts for hierarchical time series, diff --git a/docs/articles/Replicate-the-thief-package.html b/docs/articles/Replicate-the-thief-package.html index a0d18d6..60ba615 100644 --- a/docs/articles/Replicate-the-thief-package.html +++ b/docs/articles/Replicate-the-thief-package.html @@ -112,7 +112,7 @@

Daniele Girolimetto

-

2024-06-07

+

2024-08-16

Source: vignettes/articles/Replicate-the-thief-package.qmd
Replicate-the-thief-package.qmd
@@ -123,8 +123,9 @@

2024-06-07

Introduction

-

The dataset in the thief package is used to show how to -get the same results with the FoReco package. In +

The dataset AEdemand +in the thief package +is used to show how to get the same results with FoReco. In particular, we take the weekly data of Accident and Emergency demand in the UK, AEdemand, from 1 January 2011 to 31 December 2014.

@@ -172,25 +173,25 @@ 

Comparisons## Bottom-up thief_bu <- reconcilethief(fc_obj, comb="bu") FoReco_bu <- tebu(fc_obj[[1]]$mean, agg_order = 52) -sum(abs(FoReco_bu - extract_thief(thief_bu)) > 1e-10) +sum(abs(FoReco_bu - extract_thief(thief_bu)) > tol) #> [1] 0 ## Ordinary least squares (identity error covariance matrix) thief_ols <- reconcilethief(fc_obj, comb="ols") FoReco_ols <- terec(base, 52, comb = "ols") -sum(abs(FoReco_ols - extract_thief(thief_ols)) > 1e-10) +sum(abs(FoReco_ols - extract_thief(thief_ols)) > tol) #> [1] 0 ## Weighted least squares (structural variances) thief_str <- reconcilethief(fc_obj, comb="struc") FoReco_str <- terec(base, 52, comb = "str") -sum(abs(FoReco_str - extract_thief(thief_str)) > 1e-10) +sum(abs(FoReco_str - extract_thief(thief_str)) > tol) #> [1] 0 ## Generalized least squares (shrunk covariance matrix) thief_shr <- reconcilethief(fc_obj, comb="shr") FoReco_shr <- terec(base, 52, comb = "shr", res = res) -sum(abs(FoReco_shr - extract_thief(thief_shr)) > 1e-10) +sum(abs(FoReco_shr - extract_thief(thief_shr)) > tol) #> [1] 0