Skip to content

Commit

Permalink
version 2.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
config-i1 authored and cran-robot committed Sep 5, 2017
1 parent 0295046 commit 330abf2
Show file tree
Hide file tree
Showing 51 changed files with 1,169 additions and 577 deletions.
8 changes: 4 additions & 4 deletions DESCRIPTION
@@ -1,8 +1,8 @@
Package: smooth
Type: Package
Title: Forecasting Using Smoothing Functions
Version: 2.1.0
Date: 2017-08-01
Version: 2.1.1
Date: 2017-09-04
Authors@R: person("Ivan", "Svetunkov", email = "ivan@svetunkov.ru", role = c("aut", "cre"),
comment="Research Associate at Lancaster Centre for Forecasting, UK")
URL: https://github.com/config-i1/smooth
Expand All @@ -19,9 +19,9 @@ Suggests: Mcomp, numDeriv, testthat, knitr, rmarkdown
VignetteBuilder: knitr
RoxygenNote: 6.0.1
NeedsCompilation: yes
Packaged: 2017-08-01 09:37:05 UTC; isvetunkov
Packaged: 2017-09-04 09:50:55 UTC; isvetunkov
Author: Ivan Svetunkov [aut, cre] (Research Associate at Lancaster Centre for
Forecasting, UK)
Maintainer: Ivan Svetunkov <ivan@svetunkov.ru>
Repository: CRAN
Date/Publication: 2017-08-01 11:02:54 UTC
Date/Publication: 2017-09-05 07:26:46 UTC
100 changes: 50 additions & 50 deletions MD5
@@ -1,90 +1,90 @@
cde30e3f336cfeef7095f108d07c53fe *DESCRIPTION
10a13f9faa7c05f308c4572cc7e9244b *NAMESPACE
761d2dea947ec0300ed7937ac65a536f *NEWS
7568887096f933e5daa252b35519c806 *DESCRIPTION
79c62e13c8bac7c5e75cdc11b2d543a6 *NAMESPACE
6d4881fe57eace3eba82733a75274e67 *NEWS
37349dc582f54f288b2894117ad36463 *R/RcppExports.R
ef556665917ec75298170681bace8261 *R/autoces.R
c33d39768ca375ff9cd0744bf06f8bbc *R/autossarima.R
e474e4e292d858f0a95320b9188a73cd *R/ces.R
3f937cfcde4a2ddf6b84841a1a7b13f6 *R/error-measures.R
3510c0afae95884f7933375bbcb62526 *R/es.R
a5a472f4c0caae94e82d5fe951f7eb7d *R/ges.R
a83f3701b914bfbf0fe6fbae7bbfb8c1 *R/graphmaker.R
b1ce35e52e7d3609ead727e226b3fb73 *R/iss.R
74912a53f19959a2359c71c49e4675c2 *R/methods.R
5719e881b8d18c44c49f3cb6f451ba5c *R/autossarima.R
908634315e60e3616bbe23b7efd0f405 *R/ces.R
f459c04b5a4c84d02b59af32b90e9ad4 *R/error-measures.R
0e3f79a19bb76e9687b9335008111b74 *R/es.R
3fab8b262e6442378fe4f1264a23ce45 *R/ges.R
7186d8e2afb8d2dc4145d141d90a2628 *R/graphmaker.R
eb2612583ed59e8573879a056ea4d5b8 *R/iss.R
6f8179ae1b31da8b21fc86a2ddda4f6a *R/methods.R
271cfd4148c277c7e436fdb2b475ef8b *R/simces.R
213dcc31d4334edb22efbfc91d428141 *R/simes.R
cdae72899fb4e352b6570e75732f5f28 *R/simes.R
4665a66ee8941e025775c00efe162017 *R/simges.R
eb21fb57d1bd19a1d0c6a9f8509d9a26 *R/simssarima.R
3c3c2392caec0fdd4393f6ae00c779fe *R/sma.R
5af5ffdfda5aa9dc7974ef219a92fe50 *R/smooth-package.R
ccef366cc4a1eb9911a263b7676f4eaf *R/simssarima.R
2b0f126adcbcf023b336b15c50253449 *R/sma.R
7ca94220e67be02ce22aede65dc76b32 *R/smooth-package.R
fdf3aa6c13b2e0ce92639964dac5b191 *R/sowhat.R
e40f802c4689bd68e009cbf77fdac478 *R/ssarima.R
4fcc85846b5305b00c3f449d44577522 *R/ssfunctions.R
59ce26d80b208407b1581fd3ac19329a *R/ssarima.R
b0d446e42f68b7a1c7f862e99aab6b7f *R/ssfunctions.R
7696390e6b97f0caeb592f571df87a98 *R/stepwise.R
2f9ce644d462d72f541a678706cb30dd *R/ves.R
1014dd801927cecea17336d8268895d7 *R/vmethods.R
1b023e8cc40c6b5bc8e488e5df5c526d *R/vssFunctions.R
c58f454b349697e6e79542446ca5a724 *R/xregExpander.R
4933aa0afda2aff9edfdf65f63ec3788 *R/ves.R
7ffefd13b852ef2936ebd71274860b1b *R/vmethods.R
42c2feb3d74168d4ae818a8a930e5684 *R/vssFunctions.R
ac1386e89ef543d89e9e88d68b4e52c4 *R/xregExpander.R
2e38a1f2a7a77516a7acc9b0e010ce98 *R/zzz.R
3edfbe7920d7ee9312555f13efcf0456 *README.md
57d0feb1b229173d649c3f3f105b14ba *build/vignette.rds
591eab0cf00c0d5ad99fd1208bf8be3c *inst/doc/ces.R
1ceeb5bf5e782cc865cceea1e1b4b4f4 *inst/doc/ces.Rmd
dfb8e45a393fdfa04b076c2706212990 *inst/doc/ces.html
59c2d7b8d104ecebc788c35ce4843f66 *inst/doc/ces.html
64306f7f30769a7d85a944a75608315f *inst/doc/es.R
06619b9025a97f09332d42c0279219cf *inst/doc/es.Rmd
55910e6c0ec61550a80f10abdbc12d3e *inst/doc/es.html
a06e10f35a03b854cf1d7b89a9b48fe2 *inst/doc/es.html
45d9763c4f7f91e6848c0440ad7e34e5 *inst/doc/ges.R
78564d21b17ab88ef7756a729df871be *inst/doc/ges.Rmd
727fbc6acd4ab13d57d881e84ab4bd85 *inst/doc/ges.html
0df1cf44d22379cfa133e23ba046fb20 *inst/doc/ges.html
9b8f200ccd568f192ef3fbeec3f87211 *inst/doc/simulate.R
9f409e06de30e3359863c72502aa0eff *inst/doc/simulate.Rmd
20fa606ab01e6e8bf3ab83fae446e91a *inst/doc/simulate.html
1dcc31ece2ac209e1fd2bdb383343261 *inst/doc/simulate.html
8e1c32f63e2ea5a8e5eb85b9bf31b1db *inst/doc/sma.R
a2cb1d397a0258d449763bfb68326f4b *inst/doc/sma.Rmd
390859a0bbe6c22090f4f1f40993605b *inst/doc/sma.html
356378508e820dacf504f11a765a1fb3 *inst/doc/sma.html
f2be0cff7be52faff06f2a377333a8c6 *inst/doc/smooth-Documentation.pdf
ab7560c1647929fa67f92f931009917d *inst/doc/smooth.R
92af2e1ce4db47efe8a15dcb525d3350 *inst/doc/smooth.Rmd
88c4e4dbe8946209f7de79f2669582d1 *inst/doc/smooth.html
481d63762bf773115558b7706b1f99c5 *inst/doc/smooth.html
15077f51d5e9e430a006f8eb59d90c13 *inst/doc/ssarima.R
5409f129b5ae093817e2411c239602e0 *inst/doc/ssarima.Rmd
842d7a4c7ed1100b068ec4bcbc6ae0b6 *inst/doc/ssarima.html
5350e4b6bf4b6442c153dee1df0a4a19 *inst/doc/ssarima.html
64312868d316dd4ba7384cec044050d1 *inst/doc/ves.R
3841e3e81d8b01ed2bb2dac7da3eb1c4 *inst/doc/ves.Rmd
5796f12a1b687c37471980e6c3e20682 *inst/doc/ves.html
db4a0032a7bfa24e35b289606b84cf09 *inst/doc/ves.html
7d8a8d6a70f77e6f3cb66b9c2808601e *man/AICc.Rd
52512897861a8444143cfc306b16549e *man/auto.ces.Rd
ef22f5a86c5828b11362c2bc6b4c07d1 *man/auto.ssarima.Rd
ccb4b828a12f7c1eca950dc564fb15cd *man/ces.Rd
f2980ab4bae86dbbcf112cf78e64663a *man/error-measures.Rd
98c574781e1f7fc74bb8ab5626f94609 *man/es.Rd
3a813eb1ba4d3bf06a9212d78ee91269 *man/auto.ces.Rd
192f84a07712ce37ded890ee90b1ee20 *man/auto.ssarima.Rd
32abc4ee3d7d3fae958e4eef72f7661f *man/ces.Rd
c74046c6542ea356c0d501d17da7884e *man/error-measures.Rd
f7a09b11636cf8025072bdb21407131a *man/es.Rd
f3ed0b0c8141601ade33960b4adaf625 *man/forecast.smooth.Rd
5d5a8c98183c0bf53539357159070f3a *man/ges.Rd
0d25e71373378df35dcb7bc9b2c3a215 *man/graphmaker.Rd
b314d1b116149d4131be6d88f82e5bea *man/ges.Rd
af48261bd26505868b5f69dc8f72d744 *man/graphmaker.Rd
3639c7d4ce4e4a34cf963a692d1504de *man/hm.Rd
1a5733ca4f094f3d67b0e04036f70e1b *man/iss.Rd
eeffa0723dbcc729e797a36122b1e4e7 *man/nParam.Rd
b7ef9364decbb0181a92397896288e63 *man/orders.Rd
08ae163440ac7f4f8b02eb36c18cbaea *man/iss.Rd
70776b61bca3fe18c34f7f2d4ecaf858 *man/nParam.Rd
58c9ef434be9bf6845a4bf487979aca4 *man/orders.Rd
32ba66fb55d350baeddf8fa8d2c7582a *man/pls.Rd
7926b5560a3bd34b373a1f1d7430a606 *man/pointLik.Rd
005bd8faf1042fb6a768fdeca19e0d02 *man/reexports.Rd
960a0e50f2ed6ce45681fcf797c958d3 *man/sim.ces.Rd
f8e3f01d807d15441fe1138fab8e2182 *man/sim.es.Rd
330c515e913eed547384af5688179050 *man/sim.ges.Rd
4973617c62e6bd0b4c8bcb3374fe7ef7 *man/sim.ssarima.Rd
f2a967a5cd6f1294c2130f01b08009be *man/sma.Rd
89e767b00261aa6f349511c2c38a7b3e *man/smooth.Rd
cbcbcb6c6cbe25d1a9f73d28bfbab738 *man/sim.ces.Rd
e8a0ecbf391e50464143d8999091e3f5 *man/sim.es.Rd
f0ea7df353eae29c6f61cbd20057c9e7 *man/sim.ges.Rd
2b56d1dd53bb9696d8707a2c4e7536f9 *man/sim.ssarima.Rd
7772a3d7f5630f97b20278c7ba8e541a *man/sma.Rd
861061473806882caff61b73aea33941 *man/smooth.Rd
43c220a1c003d0dbf0deb9abee04c8a5 *man/sowhat.Rd
896b73b04105e548065f059a4e2e3ae6 *man/ssarima.Rd
e4b22c2366b6fd0ad489e20ca3b21428 *man/ssarima.Rd
731ca80b5424794abf9c17ec7a1612da *man/stepwise.Rd
612e49a7cb2d268d537b2393d9d91075 *man/ves.Rd
037b2c68c2d119c33ea1ae400bf7dbe0 *man/xregExpander.Rd
83ea5f21159ca3571816961124a19ebf *man/ves.Rd
bc1c0a7cd81c16a8f24ac5a09018d621 *man/xregExpander.Rd
9859afefaf6500832d7469cadbbb28c8 *src/Makevars
a6850c2998c396b505104b800670480e *src/Makevars.win
d110340e8c48ffeb684cbd4b16102480 *src/RcppExports.cpp
9fb0915a4e7ffe192150808e5e890c69 *src/registerDynamicSymbol.c
589d540c08eccecd0b16e745fe3bcd96 *src/ssgeneralfun.cpp
71289eef1d91e05b6fb33a72d87a42bb *src/ssgeneralfun.cpp
43ce084a9895aa52735c4e427cca2779 *src/vssGeneral.cpp
4e0f43b23ba7abbb29b225614e88f276 *tests/testthat.R
b8cb94b5355e771a3f6415f5b349c059 *tests/testthat/test_ces.R
Expand All @@ -93,7 +93,7 @@ a19ef0fe56d3676306870de9d229232b *tests/testthat/test_ges.R
2e692854ad815da62cc381b7e53fdba5 *tests/testthat/test_iss.R
44a29130669ac4b28e2e61d497576101 *tests/testthat/test_simulate.R
d168343e2d2c516102191e5f0e48cb44 *tests/testthat/test_ssarima.R
3baf7d9a5ca4424a2d0983c038f49981 *tests/testthat/test_ves.R
c9bc7f36d491e62c70cd1344ff6bbcf0 *tests/testthat/test_ves.R
1ceeb5bf5e782cc865cceea1e1b4b4f4 *vignettes/ces.Rmd
06619b9025a97f09332d42c0279219cf *vignettes/es.Rmd
78564d21b17ab88ef7756a729df871be *vignettes/ges.Rmd
Expand Down
3 changes: 3 additions & 0 deletions NAMESPACE
Expand Up @@ -15,6 +15,8 @@ S3method(logLik,smooth.sim)
S3method(modelType,default)
S3method(modelType,vsmooth)
S3method(nParam,default)
S3method(nParam,iss)
S3method(nParam,smooth)
S3method(nobs,iss)
S3method(nobs,smooth)
S3method(nobs,smooth.sim)
Expand Down Expand Up @@ -114,6 +116,7 @@ importFrom(stats,optim)
importFrom(stats,optimize)
importFrom(stats,plnorm)
importFrom(stats,pnorm)
importFrom(stats,qchisq)
importFrom(stats,qlnorm)
importFrom(stats,qnorm)
importFrom(stats,qt)
Expand Down
24 changes: 23 additions & 1 deletion NEWS
@@ -1,3 +1,25 @@
smooth v2.1.1 (Release data: 2017-09-04)
==============

Changes:
* initials for parameters of AR now take into account the number of parameters. Should simplify optimisation of AR.
* Number of parameters in univariate models now consists of the part "estimated" and "provided". Each model now returns a table as nParam with a detailed info about what was estimated/provided. If something was provided, then it is no longer taken into account in calculation of statistics (i.e. AIC, sigma etc).
* Similar thing is now implemented for ves().
* ves() now can produce "independent" prediction intervals (when covariances for time series are ignored).
* Yet another change in the number of parameters to estimate in es(), ges() and ces(), taking that some values could be provided, while the others - left for optimisation.
* sma() now restricts the maximum order in case of order selection to 200. This corresponds to the case with global level for different time series and should be sufficient in 99.9% of cases.

Bugfixes:
* auto.ssarima() had a bug with dataMA.
* auto.ssarima() did not calculate correctly number of iterations for AR models.
* Several minor bugfixes in ges() and ssarima() functions (bugs with provided values).
* Because of R's unique feature of working with names of variables, the situation when CUpper is provided, but C is not, was not handled well.
* Check of maximum number of parameters to estimate did not take into account some of the provided values.
* sma() wasn't checking what is provided as order. Now it does.
* auto.ssarima() did not estimated percentage of estimated models correctly in cases of constant!=NULL.
* Cumulative variance was calculated incorrectly. Now the non-seasonal case is fixed. SEASONAL MODELS STILL HAVE THIS PROBLEM!
* Found bug in variance calculation for some seasonal models, which caused intervals for SSARIMA, GES and CES to be narrower than needed.

smooth v2.1.0 (Release data: 2017-08-01)
==============

Expand All @@ -7,7 +29,7 @@ Changes:
* es() now accepts model estimated using ets() function from forecast package.
* Probability in TSB is now restricted with [0, 1] region.
* We can now fit es() even on 3 observations, but with persistence forced to be equal to zero. Don't expect a good model, though...
* auto.ssarima() now allows defining whether if constant is needed or not. By default it will check this automatically.
* auto.ssarima() now allows defining whether constant is needed or not. By default it will check this automatically.
* Initials of xreg before the optimisation are now based on OLS estimates.
* In case of updateX=TRUE, we now check a very basic forecastability condition.
* A couple of new examples in vignettes.
Expand Down
28 changes: 17 additions & 11 deletions R/autossarima.R
Expand Up @@ -232,7 +232,8 @@ auto.ssarima <- function(data, orders=list(ar=c(3,3),i=c(2,1),ma=c(3,3)), lags=c
lags <- sort(lags,decreasing=FALSE);

# 1 stands for constant, the other one stands for variance
nParamMax <- max(ar.max %*% lags + i.max %*% lags,ma.max %*% lags) + sum(ar.max) + sum(ma.max) + constantCheck + 1;
nParamMax <- (1 + max(ar.max %*% lags + i.max %*% lags,ma.max %*% lags)
+ sum(ar.max) + sum(ma.max) + constantCheck);

# Try to figure out if the number of parameters can be tuned in order to fit something smaller on small samples
# Don't try to fix anything if the number of seasonalities is greater than 2
Expand Down Expand Up @@ -289,7 +290,12 @@ auto.ssarima <- function(data, orders=list(ar=c(3,3),i=c(2,1),ma=c(3,3)), lags=c
}

# 1 stands for constant/no constant, another one stands for ARIMA(0,0,0)
nModels <- prod(i.max + 1) * (1 + sum(ma.max*(1 + sum(ar.max)))) + 1;
if(all(ma.max==0)){
nModels <- prod(i.max + 1) * (1 + sum(ar.max)) + constantCheck;
}
else{
nModels <- prod(i.max + 1) * (1 + sum(ma.max*(1 + sum(ar.max)))) + constantCheck;
}
testModel <- list(NA);
# Array with elements x maxorders x horizon x point/lower/upper
if(combine){
Expand Down Expand Up @@ -399,14 +405,14 @@ auto.ssarima <- function(data, orders=list(ar=c(3,3),i=c(2,1),ma=c(3,3)), lags=c
}
if(m==1){
bestIC <- ICValue;
dataI <- testModel$residuals;
dataMA <- dataI <- testModel$residuals;
i.best <- i.orders[d,];
bestICAR <- bestICI <- bestICMA <- bestIC;
}
else{
if(ICValue < bestICI){
bestICI <- ICValue;
dataI <- testModel$residuals;
dataMA <- dataI <- testModel$residuals;
if(ICValue < bestIC){
i.best <- i.orders[d,];
bestIC <- ICValue;
Expand Down Expand Up @@ -579,7 +585,7 @@ auto.ssarima <- function(data, orders=list(ar=c(3,3),i=c(2,1),ma=c(3,3)), lags=c
if(silent[1]=="d"){
cat("AR: ");cat(ar.test);cat(", ");
}
testModel <- ssarima(dataI, orders=list(ar=ar.test,i=0,ma=0), lags=lags,
testModel <- ssarima(dataMA, orders=list(ar=ar.test,i=0,ma=0), lags=lags,
constant=FALSE, initial=initialType, cfType=cfType,
h=h, holdout=FALSE,
intervals=intervals, level=level,
Expand Down Expand Up @@ -630,14 +636,14 @@ auto.ssarima <- function(data, orders=list(ar=c(3,3),i=c(2,1),ma=c(3,3)), lags=c
}
}

m <- m + 1;
if(silentText==FALSE){
cat(paste0(rep("\b",nchar(round(m/nModels,2)*100)+1),collapse=""));
cat(paste0(round((m)/nModels,2)*100,"%"));
}

#### Test the constant ####
if(constantCheck){
m <- m + 1;
if(silentText==FALSE){
cat(paste0(rep("\b",nchar(round(m/nModels,2)*100)+1),collapse=""));
cat(paste0(round((m)/nModels,2)*100,"%"));
}

if(any(c(ar.best,i.best,ma.best)!=0)){
testModel <- ssarima(data, orders=list(ar=(ar.best),i=(i.best),ma=(ma.best)), lags=(lags),
constant=FALSE, initial=initialType, cfType=cfType,
Expand Down

0 comments on commit 330abf2

Please sign in to comment.