Skip to content

Commit

Permalink
Fix for an issue with interval type
Browse files Browse the repository at this point in the history
  • Loading branch information
config-i1 committed May 2, 2023
1 parent 29ea9e5 commit d49850c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Package: smooth
Type: Package
Title: Forecasting Using State Space Models
Version: 3.2.1.41008
Date: 2023-04-02
Version: 3.2.1.41009
Date: 2023-05-02
Authors@R: person("Ivan", "Svetunkov", email = "ivan@svetunkov.ru", role = c("aut", "cre"),
comment="Lecturer at Centre for Marketing Analytics and Forecasting, Lancaster University, UK")
URL: https://github.com/config-i1/smooth
Expand Down
5 changes: 3 additions & 2 deletions NEWS
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
smooth v3.2.1 (Release data: 2023-04-02)
smooth v3.2.1 (Release data: 2023-05-02)
=======

Changes:
Expand All @@ -13,7 +13,8 @@ Bugfixes:
* sma() with order selection would not work on data with number of observations lower than the frequency.
* Fix in simulate.adam(), which would ignore the states of the model.
* sm() now works with pure regression and regressors="select". But we now rely on greybox 1.0.8.
* formula is now properly used in adam() in regressors="select"
* formula is now properly used in adam() in regressors="select".
* smoothCombine() wouldn't work because of the wrong interval type.


smooth v3.2.0 (Release data: 2023-01-18)
Expand Down
3 changes: 2 additions & 1 deletion R/smoothCombine.R
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ smoothCombine <- function(y, models=NULL,
persistenceX <- transitionX <- NULL;
occurrence <- "none";
oesmodel <- "MNN";
intervalOriginal <- interval;

# Add all the variables in ellipsis to current environment
thisEnvironment <- environment();
Expand Down Expand Up @@ -203,7 +204,7 @@ smoothCombine <- function(y, models=NULL,
icBest <- min(ICs);
icWeights <- exp(-0.5*(ICs-icBest)) / sum(exp(-0.5*(ICs-icBest)));

modelsForecasts <- lapply(models,forecast,h=h,interval=interval,
modelsForecasts <- lapply(models,forecast,h=h,interval=intervalOriginal,
level=0,holdout=holdout,cumulative=cumulative,
xreg=xreg);

Expand Down

0 comments on commit d49850c

Please sign in to comment.