Skip to content

Commit

Permalink
version 2.6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
config-i1 authored and cran-robot committed Jun 17, 2020
1 parent 31251b9 commit 5a8da09
Show file tree
Hide file tree
Showing 59 changed files with 1,375 additions and 790 deletions.
10 changes: 5 additions & 5 deletions DESCRIPTION
@@ -1,8 +1,8 @@
Package: smooth
Type: Package
Title: Forecasting Using State Space Models
Version: 2.5.6
Date: 2020-03-31
Version: 2.6.0
Date: 2020-06-16
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 All @@ -23,12 +23,12 @@ Imports: Rcpp (>= 0.12.3), stats, graphics, forecast (>= 7.0), nloptr,
LinkingTo: Rcpp, RcppArmadillo (>= 0.8.100.0.0)
Suggests: Mcomp, numDeriv, testthat, knitr, rmarkdown
VignetteBuilder: knitr
RoxygenNote: 7.0.2
RoxygenNote: 7.1.0
Encoding: UTF-8
NeedsCompilation: yes
Packaged: 2020-04-04 16:18:34 UTC; config
Packaged: 2020-06-16 10:00:33 UTC; isvetunkov
Author: Ivan Svetunkov [aut, cre] (Lecturer at Centre for Marketing Analytics
and Forecasting, Lancaster University, UK)
Maintainer: Ivan Svetunkov <ivan@svetunkov.ru>
Repository: CRAN
Date/Publication: 2020-04-05 05:00:06 UTC
Date/Publication: 2020-06-17 04:10:03 UTC
114 changes: 58 additions & 56 deletions MD5
@@ -1,104 +1,106 @@
7b6eec447ba62d9c1cfc24fb28eb2d59 *DESCRIPTION
7abc2e3841ba1acdbba753e4fb4d763f *NAMESPACE
0851f7a72b2e05700b0abc9895037ac6 *NEWS
4e19c32dbd7d9b6b555ddf2b8e1c4b73 *DESCRIPTION
f417e9b553cc4211d9408c699744645a *NAMESPACE
c3aae7a2ce06b338ea6c182ddecc9d11 *NEWS
d9088ff66316b45f851e337df4fba4af *R/RcppExports.R
1d265b8f027460368c53274d9882f656 *R/autoces.R
8832154f6f265898fb02d236c42cfd4c *R/autoces.R
1d62d880eae0b769b9c3d0d7435049ae *R/autogum.R
c4202447725b45b7590e4257c37705c7 *R/automsarima.R
6f35d3693509babf8173701fe8b17561 *R/autossarima.R
1007a147ea583f2486f5565c3edc011e *R/ces.R
26937f97910af23c8b915f73cbf33c22 *R/cma.R
31f124a4c711e51c07a755ad2ae4e88a *R/depricator.R
b094535f72ec1e0231a7e31eed412887 *R/es.R
ac25a8906465f13a5ae84477121face5 *R/es.R
9037b5e178c13ec7ca636b94feccc6b8 *R/gum.R
0bfe1ae12561a730e437ea4c5975dcdf *R/isFunctions.R
409cd8f916b16bad8a68e99934709ad2 *R/iss.R
bf276925b626ad3f480b38f18311b617 *R/methods.R
7e2bdd4e4f50f5de6f3b6bd39c00d8e5 *R/msarima.R
042054bdccea5d886ecdb3d6f055ef13 *R/methods.R
b565a6dc4d5b4b9710e6cf7dcd51dc2f *R/msarima.R
28bbc5bd3d6c2363cdd9a5cd5806aed9 *R/msdecompose.R
858ad55a53c0e16896c50a7e7d482cb3 *R/oes.R
81ba7c2724bef4f2698c078515a4e75a *R/oesg.R
7f55e841ba619b27d0ded7b452321022 *R/simces.R
7c7d3f7f8b9202992575aa94c1a43b62 *R/simes.R
facd86a5dc5cc1ae85a0b8aa8e520abb *R/simgum.R
e032b99453b0ff4312e6ef2226bb519d *R/simsma.R
ee5a8a54f252d8cba8e602b7104e1b87 *R/simssarima.R
e5629697c68011cc3d6177c3a239c6ba *R/simves.R
954e4c488d6c57d6fd15f7fe08ff5891 *R/oes.R
cb8248d37b3af03facbf4dc7cdae5faf *R/oesg.R
c33c6f90b47a2ac3850d5722f4681449 *R/simces.R
7a3bcee0d989c0618248bc4f4cfc0841 *R/simes.R
a26210beaf498241d089d307cb553e10 *R/simgum.R
4e30016793fba87e7e847e4568ad3e82 *R/simoes.R
a6f68a1f475d6df9ec9dc95cc90f23c3 *R/simsma.R
faa27efef29581dd559aa3071a898bc3 *R/simssarima.R
9af9ab5443ed428295e42c847c0b40c0 *R/simves.R
1076b44a5145ba457fc7981a1b714ed1 *R/sma.R
6659a7ec1aa09b3b5da8e69cf26fce67 *R/smooth-package.R
71bd7aebdee6ea94290f30ea4ae60b7a *R/smooth-package.R
a3df50ed57000a2b2023ac49a9d38aaa *R/smoothCombine.R
24d42f1698e1f50eb27f1a32ecab61c8 *R/sowhat.R
34cc3e79e8b10f15c8c42d47f9b64176 *R/ssarima.R
a3c6243555211090108c97b94032f232 *R/ssfunctions.R
2ec9ba93f9bddc37042d153e74514ec4 *R/ssarima.R
2e193e86978edc1b8d6b7a6faf4ed501 *R/ssfunctions.R
b45db627556532cfdf6e20ccc1ff34dc *R/variance-covariance.R
6e4483bdba7e91e47f7d2a7ecc9b36fa *R/ves.R
4e7980c86537fd5a8602b63764f88d6b *R/ves.R
5c6a7c4259702efbb80b34c0012d09aa *R/viss.R
b686e8434f3ae2d0a126af58a373547a *R/vmethods.R
6993ab9575ae8214a7af7aa144cc04a2 *R/vssFunctions.R
610aa6e94baefba0b4e4d9dc07966ffd *R/vssFunctions.R
3113d776d98ddd16e1ee1c7cfe5ba513 *R/zzz.R
9a07de36550f53ed8081d20206d96444 *README.md
c016a83e23cbf726a9d475ece3b5bdba *build/partial.rdb
b468ec762f4ed484053855ba9ed57a09 *build/vignette.rds
abd03f54600bd12d9eb2ca4edcda421f *build/partial.rdb
05d18aca4c90d9f1b6b57137066b9a93 *build/vignette.rds
d96771d8815bb6aedd3d28203e6e1643 *inst/doc/ces.R
63102e1de32a1dfa9fca0c23576696a1 *inst/doc/ces.Rmd
43835eb57304805c3737113fc4229dd4 *inst/doc/ces.html
58ee85fd04e97eecbc754b564d79a6a3 *inst/doc/ces.html
7ec84444835505eb454b8ad28529cfc7 *inst/doc/es.R
75d528e227579a8662d15950b92d6d55 *inst/doc/es.Rmd
8666f3f203fa15abbdad69d502081090 *inst/doc/es.html
41936923da6f3d86efcf1bb945190db5 *inst/doc/es.html
09f3f722f9abce38e175272c2152db8b *inst/doc/gum.R
c757d7f4971db027d931c0543d77f79b *inst/doc/gum.Rmd
c2610780c7d933a48f8c3e4ff739f929 *inst/doc/gum.html
6cd1f51076415febeef8f2ae281c09b2 *inst/doc/oes.R
9e58b4b6fccc5835d175db183a852768 *inst/doc/oes.Rmd
9f43504782ec2febd2b1dc410455a42e *inst/doc/oes.html
d864c867d9d9b955953a1a5b3ab6acc6 *inst/doc/simulate.R
3c284a1692f90426fba996c01a78af8c *inst/doc/simulate.Rmd
5833796160d075d1ce8601ef416e404e *inst/doc/simulate.html
556408f1e26d036ae5b071586c42adc5 *inst/doc/gum.html
81217e6165dd54b6634c461479459a1d *inst/doc/oes.R
a26c9d64823db6948fe629afb4fe2cbb *inst/doc/oes.Rmd
2915c2e4c3d3108c62884330448b39f5 *inst/doc/oes.html
87f9315217765270b2d79c8919d7b574 *inst/doc/simulate.R
df88acb4d0ba96f371e37c36fc256117 *inst/doc/simulate.Rmd
cf91c63fbe4a826b36ceb41b8c8b8aa4 *inst/doc/simulate.html
a2cd0641ac0ad65fd0b4580c1b90d7b3 *inst/doc/sma.R
7a6cd5f84b090d58c565b781c2801327 *inst/doc/sma.Rmd
5e438bc7f796d73cdf3e9f0e1b1c69e1 *inst/doc/sma.html
e078be4a06e7354cc04c526b10ebb725 *inst/doc/sma.html
f2be0cff7be52faff06f2a377333a8c6 *inst/doc/smooth-Documentation.pdf
69802db80bcf5775ededb1dfc183e7a3 *inst/doc/smooth.R
5c4f76203817ca1fd96b78ede52a9183 *inst/doc/smooth.Rmd
c625f8cc4b78a0390f38c52d30355181 *inst/doc/smooth.html
b4093e5751d79a47fb0d225b64858102 *inst/doc/smooth.html
8ed811739f508477e983315c27eaa988 *inst/doc/ssarima.R
d9eb0e9e17b266502d596e225a3962cf *inst/doc/ssarima.Rmd
b44c7f63c14f656b218ccf7bc050a355 *inst/doc/ssarima.html
52c4d31c6f4b049b389cf44b3ad31a89 *inst/doc/ssarima.html
cc4acc86019a9f891ac9bb19b1162d5c *inst/doc/ves.R
449246ef10cdc217c4fffb69ee049d38 *inst/doc/ves.Rmd
94ce5218550669cb565577d38e64bc57 *inst/doc/ves.html
8dc584309ab100bd161ef961fccab0ec *man/auto.ces.Rd
3af14c042e111200ed27cdaee2bcaaa7 *inst/doc/ves.html
06c12a5ec0ff4f0181380dcdb697ec53 *man/auto.ces.Rd
efabc9267e6e2dc84569aadfa08c8524 *man/auto.gum.Rd
c2f3fa28b26c210c1222f666954c78ed *man/auto.msarima.Rd
476e6a2bc5ae39841b8c9b3d62108a0c *man/auto.ssarima.Rd
d11d1f076f49e6db55567af1368c8502 *man/ces.Rd
0685115bc87b456a6f18afa4709164de *man/cma.Rd
135360dd24eeac37bccafb79de2533d0 *man/es.Rd
b859ea02a6dde4ee3f9fc6326c0af1ce *man/forecast.smooth.Rd
397c498f08275a16520f0ec8a93a61f8 *man/forecast.smooth.Rd
a60346baa79e14b5446a4d4a96917818 *man/gum.Rd
4a03f0a70cbe658d751bf22b785f6819 *man/isFunctions.Rd
3c0326100f7c2edab50e3f620891ee64 *man/iss.Rd
f3dee4364418879b2831c6ecdf0bb86f *man/msarima.Rd
f40f835d0af353a1e1b45e01ca024fd7 *man/msarima.Rd
1d88cebe86ddba1f1133e04d57c7f872 *man/msdecompose.Rd
64974308435e2b7344b9d00bd50e9854 *man/multicov.Rd
d635da1780b93537fb706fe94b7a3eb5 *man/oes.Rd
1493778596457c353675512226cea911 *man/oesg.Rd
e38c7784271165ae18fac783f3e66f4d *man/oes.Rd
02eaf6d546cdff3027ecf336e7e22eb2 *man/oesg.Rd
0f3268c8a858c058a3fa8b8939767d2e *man/orders.Rd
b978560cb5733709062fd48ccc1a1bfe *man/plot.smooth.Rd
01421b6910e28ed2ad21d643131a8569 *man/plot.smooth.Rd
24fcb1f1b8658e1e6587e176e178a427 *man/pls.Rd
ca4cdeff61ecec66ba6af13cff04abde *man/sim.ces.Rd
73b267c87bfafcd4db0683b44ceb33e2 *man/sim.es.Rd
2cc820aaecacf1a58ded83420f6bb2d5 *man/sim.gum.Rd
1ee9bd971c6944ffe5bb7b1b78457fde *man/sim.sma.Rd
7b2424869a8cfc496439d40d9620736e *man/sim.ssarima.Rd
2e56d948ce01db07acc0976712818054 *man/sim.ves.Rd
ba9ecd1d8c6703453ee1175e933ab414 *man/sim.ces.Rd
038c0b6684d5d1e6b074ff907251bcaf *man/sim.es.Rd
050e101dde29069cd2ea1d11882741a0 *man/sim.gum.Rd
c02ef5bd53635310cc02d3b7976ad434 *man/sim.oes.Rd
52d4ee371e38a556e8b0fda312c8870a *man/sim.sma.Rd
3d29106b59d0a93fbe1393c7c6df32e9 *man/sim.ssarima.Rd
3cc7a04191817e0fc3fbb51c1803d90e *man/sim.ves.Rd
de254074c413aa1440d8dbebffb6aef6 *man/sma.Rd
748a9adb1add181e237da71cb3823b65 *man/smooth.Rd
89878f39a7b152e9bdeb411d8f468e06 *man/smooth.Rd
457aa83914d2fd574c3e0bced7e8a69d *man/smoothCombine.Rd
a0993d7de7f0b96415bb7b69f66b60ab *man/sowhat.Rd
7da59a7b3a4333c62f89be0516041a57 *man/ssarima.Rd
9d9e83c1adf03481fb271ffca5b9b114 *man/ves.Rd
4f1c3c4ede7369b0435ad6c20cb7cf1a *man/viss.Rd
00e8688673c5c2f5d9f3211776e24570 *man/ssarima.Rd
3df0888e4f417e2f0924b0bfa36a6409 *man/ves.Rd
056df94fe40fc4a2b274c11ed39da16e *man/viss.Rd
9859afefaf6500832d7469cadbbb28c8 *src/Makevars
a6850c2998c396b505104b800670480e *src/Makevars.win
d736b0ac3c57296a62ff17c520142d0c *src/RcppExports.cpp
Expand All @@ -111,18 +113,18 @@ cccddc1650403630c1f85f6bc9a2ac63 *src/ssSimulator.cpp
3ff978aed1beb78736800b0bf9e709d1 *src/vssGeneral.cpp
4e0f43b23ba7abbb29b225614e88f276 *tests/testthat.R
637bec64c17967aa1c4454bd1a51ddd5 *tests/testthat/test_ces.R
f925ba8597ccf07763fb7b851122455c *tests/testthat/test_es.R
02ac837d0ec958cbdd82441b4c0e54d4 *tests/testthat/test_ges.R
cdea51cf57338acfcad9d58e5cc323f8 *tests/testthat/test_es.R
3f799babe2468f6c965b9bc322d380d0 *tests/testthat/test_ges.R
f4e352807360804369ed3b29e359668d *tests/testthat/test_oes.R
f152728a5b15d9b65d9f46cade8552e0 *tests/testthat/test_simulate.R
40a67520d44188ca73484f46f7961216 *tests/testthat/test_simulate.R
84b5bd3ad4f998695404cf76b9fef734 *tests/testthat/test_ssarima.R
8d83197fe52352a1f5fbc316db36929a *tests/testthat/test_ves.R
63102e1de32a1dfa9fca0c23576696a1 *vignettes/ces.Rmd
75d528e227579a8662d15950b92d6d55 *vignettes/es.Rmd
c757d7f4971db027d931c0543d77f79b *vignettes/gum.Rmd
d5c5cdaf1dcb23ce35182bc1d846ef63 *vignettes/library.bib
9e58b4b6fccc5835d175db183a852768 *vignettes/oes.Rmd
3c284a1692f90426fba996c01a78af8c *vignettes/simulate.Rmd
a26c9d64823db6948fe629afb4fe2cbb *vignettes/oes.Rmd
df88acb4d0ba96f371e37c36fc256117 *vignettes/simulate.Rmd
7a6cd5f84b090d58c565b781c2801327 *vignettes/sma.Rmd
f2be0cff7be52faff06f2a377333a8c6 *vignettes/smooth-Documentation.pdf
5c4f76203817ca1fd96b78ede52a9183 *vignettes/smooth.Rmd
Expand Down
3 changes: 3 additions & 0 deletions NAMESPACE
Expand Up @@ -66,6 +66,7 @@ S3method(orders,smooth)
S3method(orders,smooth.sim)
S3method(plot,msdecompose)
S3method(plot,oes)
S3method(plot,oes.sim)
S3method(plot,smooth)
S3method(plot,smooth.forecast)
S3method(plot,smooth.sim)
Expand All @@ -79,6 +80,7 @@ S3method(pointLik,smooth)
S3method(print,iss)
S3method(print,msdecompose)
S3method(print,oes)
S3method(print,oes.sim)
S3method(print,smooth)
S3method(print,smooth.forecast)
S3method(print,smooth.sim)
Expand Down Expand Up @@ -136,6 +138,7 @@ export(pls)
export(sim.ces)
export(sim.es)
export(sim.gum)
export(sim.oes)
export(sim.sma)
export(sim.ssarima)
export(sim.ves)
Expand Down
28 changes: 28 additions & 0 deletions NEWS
@@ -1,3 +1,31 @@
smooth v2.6.0 (Release data: 2020-06-16)
=======

Changes:
* sim.oes() function, generating probability of occurrence and respective binary variable ot.
* Tuning of ves() function and a couple of new parameters in ellipsis, that allow regulating the optimiser.
* forecast.smooth() now allows specifying side of prediction interval. Note that this might not work well in cases of occurrence model.
* Make ACF / PACF in plot.smooth() easier to read + tuning in case of non-ts objects.
* sim.* functions now use proper do.call() instead of weird parse(...).
* Initial smoothing parameters in oes() and oesg() are now set to 0.01 instead of 0.05. This should allow avoiding several cases of wrong optimisation.

Bugfixes:
* A weird glitch for occurrence model, when h=1: multiplication of yForecast by pForecast could not be done.
* es() would not work in case of predefined persistence and initial, but not inisialSeason.
* Model selection would not work in oes() for some types of models.
* oesg() did not return class "occurrence".
* A fix in sim.oes() for the ts() class in occurrence="inverse-odds-ratio".
* oesg() now reports the correct type of model, not the abbreviation.
* A fix for auto.ces(), which did not work on zeroes data.


smooth v2.5.7 (Release data: 2020-04-06)
==============

Changes:
* plot.smooth() now also produces standardised and studentised residuals over time.


smooth v2.5.6 (Release data: 2020-03-31)
==============

Expand Down
10 changes: 5 additions & 5 deletions R/autoces.R
Expand Up @@ -175,7 +175,7 @@ auto.ces <- function(y, models=c("none","simple","full"),
}

CESModel <- as.list(models);
IC.vector <- c(1:length(models));
ICs <- c(1:length(models));

j <- 1;
if(!silentText){
Expand All @@ -194,11 +194,11 @@ auto.ces <- function(y, models=c("none","simple","full"),
bounds=bounds, silent=TRUE,
xreg=xreg, xregDo=xregDo, initialX=initialX,
updateX=updateX, persistenceX=persistenceX, transitionX=transitionX, FI=FI);
IC.vector[j] <- CESModel[[j]]$ICs[ic];
ICs[j] <- CESModel[[j]]$ICs[ic];
j <- j+1;
}

bestModel <- CESModel[[which(IC.vector==min(IC.vector))]];
bestModel <- CESModel[[which(ICs==min(ICs))[1]]];

yFitted <- bestModel$fitted;
yForecast <- bestModel$forecast;
Expand All @@ -207,9 +207,9 @@ auto.ces <- function(y, models=c("none","simple","full"),
modelname <- bestModel$model;

if(!silentText){
best.seasonality <- models[which(IC.vector==min(IC.vector))];
bestModelType <- models[which(ICs==min(ICs))[1]];
cat(" \n");
cat(paste0('The best model is with seasonality = "',best.seasonality,'"\n'));
cat(paste0('The best model is with seasonality = "',bestModelType,'"\n'));
}

##### Make a plot #####
Expand Down
8 changes: 3 additions & 5 deletions R/es.R
Expand Up @@ -303,15 +303,15 @@ es <- function(y, model="ZZZ", persistence=NULL, phi=NULL,
persistence <- model$persistence[,i];
initial <- model$initial[,i];
initialSeason <- model$initialSeason[,i];
if(any(model$iprob!=1)){
if(any(model$probability!=1)){
occurrence <- "a";
}
}
else{
persistence <- model$persistence;
initial <- model$initial;
initialSeason <- model$initialSeason;
if(any(model$iprob!=1)){
if(any(model$probability!=1)){
occurrence <- "a";
}
}
Expand Down Expand Up @@ -733,8 +733,6 @@ EstimatorES <- function(...){
}

# Parameters are chosen to speed up the optimisation process and have decent accuracy
# res <- optimx::hjn(B, CF, lb, ub);
# B[] <- res$par;
res <- nloptr(B, CF, lb=lb, ub=ub,
opts=list("algorithm"="NLOPT_LN_BOBYQA", "xtol_rel"=xtol_rel, "maxeval"=maxeval, print_level=0));
B[] <- res$solution;
Expand Down Expand Up @@ -1688,7 +1686,7 @@ CreatorES <- function(silent=FALSE,...){
}

##### Define modelDo #####
if(any(persistenceEstimate, (initialType=="o"), initialSeasonEstimate*(initialType=="o"),
if(any(persistenceEstimate, (initialType=="o"), initialSeasonEstimate,
phiEstimate, FXEstimate, gXEstimate, initialXEstimate)){
if(all(modelDo!=c("select","combine"))){
modelDo <- "estimate";
Expand Down

0 comments on commit 5a8da09

Please sign in to comment.