smooth v4.0.0 (Release data: 2023-09-15) ======= Changes: * Starting from v4.0.0, the smooth package for R will be released under the LGPLv2.1 license. The source of the older version of the software under the GPL(>=2) is available here: https://github.com/config-i1/smooth/releases/tag/v3.2.2 smooth v3.2.2 (Release data: 2023-09-15) ======= Changes: * Expanded info on simulate functions in the package description. * vcov() now can also return heuristic covariance matrix for adam via the heuristics=0.0025 or something like that. This is an experimental feature, which is why it is not explained in the documentation. * auto.msarima() is now a wrapper of adam() with orders=list(..., select=TRUE). * accuracy() is now implemented for smooth classes. Bugfixes: * forecast.adam() would not work correctly if the newdata had missing values. * Finally found and fixed an annoying bug that caused ARIMA to fail in some cases. * Fix in forecast.adam() for cases of h=1 and analytical variance. * A fix for adam() with LASSO/RIDGE, where "lambdaOriginal was not found". smooth v3.2.1 (Release data: 2023-06-01) ======= Changes: * Combined ADAM now skips the models with weights less than 0.001, when producing forecasts. * forecast() for combined ADAM now also supports interval="complete". * reapply() method for combined ADAM. Bugfixes: * Correct default for initial in auto.adam(). * PACF in plot.smooth() dropped the first lag because of a typo. * adam() would not calculate logLik() correctly for Generalised Normal distribution in case of Multiplicative error models. * 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". * smoothCombine() wouldn't work because of the wrong interval type. * coefbootstrap() now has a slightly larger smallest sample to consider (1 more observation). This should make it more robust. * Fix in adam() with Gamma distribution and mixed models. * Fixed a bug with ARIMA(0,d,0) with drift and an initial B becoming outside of bounds. smooth v3.2.0 (Release data: 2023-01-18) ======= Changes: * es() is now a wrapper of adam(). The old es() function will be available until v4.0.0 as es_old(). * msarima() is now a wrapper of adam() as well. The old version is msarima_old(). auto.msarima() relies on the old algorithm and will provide a solution different to the one from auto.adam(). * sma() now uses the adam() C++ code instead of the old one. * New initialisation approach in adam(), es() and msarima() in place of initial="backcasting". This does backcasting for dynamic part of the model and optimisation for the parameters of the explanatory variables. Useful for ETSX and ARIMAX. The old one is now called "complete". * simulate() method for ADAM class. * msarima() now has a document "model" parameter. Previously, it was hidden in ellipses. * type="simulated" in multicov.adam(). * Switched off interval and level parameters in oes() and oesg(). * forecast.adam() now has a parameter "scenarios", defining whether to return the simulated paths or not. Works only in case of interval="simulated". * ACF/PACF of squared residuals in plot.adam() and plot.smooth(). * Removed depricated parameters (updateX, transitionX and persistenceX) from oes() and oesg(). * xtable method for adam class to produce tables from outputs for LaTeX. * sma() now has a fast search of order. Bugfixes: * adam() calculated the number of estimated parameters incorrectly in case of regressors="select". * Another fix of the number of estimated parameters in adam() - the internal method would differ from the external one. * Fix in C++ code for the matrix of states, which gets contaminated with interim values. * Failsafe mechanism in adam() for initial level, trend, seasonal in mixed models, so that they do not become negative, when they should not. * A fix for another ETS+ARIMA combination in adam() which resulted in NaNs. * A fix for simulated data from mixed ETS models in adam(). These should not produce NaNs anymore. * A fix in forecast.adam() for cases of occurrence model and cumulative forecasts. * A fix for tibble and tsibble objects in adam(). * es_old() and other old functions would break if after some checks all the explanatory variables would be dropped (thanks to Ritika Arora for spotting this). This is now fixed. * Fix in adam() in case of loss=c("LASSO","RIDGE") and lambda=1. This now corresponds to the deterministic ETS(X) model. ARIMA is still a mistery here. * adam() would not work if names of explanatory variables would consist of numbers only. * adam() would fail if lags=24 and zoo object with no timestamps was used. * A fix in adam() for provided occurrence and multiplicative models with positive distributions. smooth v3.1.7 (Release data: 2022-05-20) ======= Changes: * Updated LASSO and RIDGE in adam(). We now don't shrink initial states, following Pritularga et al. (2022) paper. Furthermore, in the spirit of the paper, we now shrink AR elements to 1 and MA elements to -1. * rmultistep method for es(), ssarima(), msarima(), ces() and sma(). * Renamed "xregDo" into "regressors" for consistency with ADAM. * multicov now accepts parameter h, defining the horizon for multisteps covariance matrix. * Fixes in adam() for cases, when eigen() did not use symmetric=FALSE, where this was appropriate. This should speed up the code a bit. * Tuning of C++ code for ADAM. This leads to the decrease in computational time and used memory. However, the performance of models needs testing to make sure that they are still robust. Bugfixes: * adam() ETS+ARIMA would check ARIMA parameters, assuming that polynomial matrix is symmetric. This is now fixed. * Fixed a bug in adam(), when the function would use erroneously NULL as a name of a variable. * interval="prediction" would not produce analytical intervals in case of pure additive models. This is now fixed. smooth v3.1.6 (Release data: 2022-03-30) ======= Changes: * Renamed nu into df in distribution="dt" of adam() for consistency with alm(). * We now import forecast from generics package, not from greybox. * sm() method for adam. This supports scale model via ETS / ARIMA / Regression. * forecast.adam() is now tuned to work with sm.adam() output. * forecast.adam() now works properly with object$scale if it is estimated via sm.adam() (i.e. taking the multistep scale into account). * implant() method (imported from greybox) to merge adam and the scale model. * The default measurement vector in gum() is now unity. This makes model identifiable. * Correct number of degrees of freedom in adam-sm model. * Fixes for sm() in case of model="NNN". * Always record number of estimated parameters for scale in a separate column in adam(). * plot.adam() now produces diagnostics plots for scale model if it is implanted for which=c(2:6,8,9,13,14). * The order in which in plot.smooth() and plot.adam() now matters. Bugfixes: * Fixed a bug in ssGeneral.cpp, which caused ces() to break in the cases of extreme values of smoothing parameters. * A fix in forecast.adam(), which would not rbind the rows correctly in cases of nrow(newdata) < h. * A fix in ADAMX for exotic cases, where log(y) was used in alm() (for parameters initialisation), when it shouldn't have. * A fix in case of rbind() of data.frame, when one of variables is ts. smooth v3.1.5 (Release data: 2022-01-26) ======= Changes: * summary.adam now prints the standard deviation of the error term (sigma(ourModel)). * An explanation of the default nsim value in forecast.adam. * Removed Mcomp from suggests. smooth v3.1.4 (Release data: 2021-12-01) ======= Changes: * Fixed the description of interval option in adam(). * Renamed refit() into reapply() to avoid conflicts with the generic of the same name from generics package. Bugfixes: * Fixed a bug in the pre-initialisation of parameters of a model with constant. smooth v3.1.3 (Release data: 2021-09-22) ======= Changes: * adam() now gives names to the models in combinations for a simple access to them. * adam() now complains if the data is negative and a non-additive model is applied. * forecast.adam() now supports "empirical" and "complete" prediction intervals. The former rely on multistep forecast errors and uses their empirical quantiles. The latter is a shortcut for the prediction interval in the reforecast() function. * Allow seasonal model in es() for the 2 full cycles of data. Bugfixes: * adam with pure regression would not do outliers selection. * Fix in adam() with half-hourly data. * empirical interval in forecast for adam(), which relies on quantiles of multistep forecast errors. * Fix in auto.adam() for ETS+ARIMA: the function would enforce drift, when it would not be needed. * Fix in rmultistep - it would not use the original profile and would result in ridiculous forecasts. * Fix in adamErrorer. It now has a correct alignment of profiles. This will impact the rmultistep() and multistep losses. * Fix for GPL and other multistep losses in case of multiplicative models and default distributions. * An issue with forecast.adam() with combination, which would not have correct number of elements. * adam() now prints the correct name of response variable in auto.adam() ARIMA selection. * Fixed issues with initials and with initial profile in adam(), so that any model can now be properly reapplied, no matter what and would result in exactly the same fit. Previously, this would break for some types of ARIMA. * Fixed ETS(M,*,*) with drift models. They now produce a proper trend. * A fix in the bounds for the optimiser in case of bounds="usual" - should converge to optimal values faster. * A fix for the logLik calculation of occurrence model - accept only positive entropy. This needs further investigation, but for some reason makes sense. * Make sure that the conventional functions (es, ssarima, sma etc) return y as ts. smooth v3.1.2 (Release data: 2021-06-14) ======= Changes: * Make forecast.oes() shut up in adam(). * Print names of oETS models in the adam() model (e.g. [G], [F], etc.). * Updated methods description in the vignette of smooth. * plot.adam(..., which=c(8,9)) now drops residuals for zero actuals if occurrence model is present. Should look better and provide a proper message. * Update in C++ code, substituting SEXP by the expected objects (matrices and vectors) in adam(). This should result in a slight speed up and memory consumption reduction. * adam() now has a trick in case of initial="backcasting", changing the value of state obtained in the tail of series. This helps the function to come back to the start of the series with a more meaningful initial. * New initialisation for phi and theta of ADAM ARIMA. * /donttest{} instead of /dontrun{} in examples in the documentation. * on.exit() restore par for plot functions. * Use "approximate" intervals for !etsModel in adam(). * Multistep losses in adam() now do not do log(1+et) and minimise et directly. * adam() now does regressors selection between those that are specified in formula if formula is provided. * More iterations for xreg models in adam(). * Refine head of time series in adam() for backcasting (previously was only done for optimal). * Gamma is now the default distribution for Etype="M" in ETS. * (standardised residuals)^2 vs fitted and abs(standardised residuals) in plot.smooth() and plot.adam() (which=c(13,14)). This should allow doing diagnostics in case of scale model (TBA). * occurrence parameter in adam() now also accepts logical vector. Bugfixes: * Fixed a bug in adam() with regressors="select" and errorType=="M". * auto.adam() would not check positivity of data for dgamma. * A bugfix in auto.adam for additional checks in ARIMA in case of d=0. * A bugfix in oesg() and damped trend model with estimated phi. * Fixes in ts() for pure regression in adam(). * A fix for outliers selection in ADAMX andprovided formula. * A fix in ADAMX and forecast(). * A fix for weird cases of ETS(M,N,N) with constant on some time series with very low values. * A fix in auto.adam() for ARIMA orders selection in case of the provided formula. * A fix in forecast.adam() for interval="approximate" and distribution="dlnorm". * Weird bug in es(), where loss="likelihood" was considered as a multistep. * Fix in auto.adam() and ARIMA selection with non-default distributions. smooth v3.1.1 (Release data: 2021-04-16) ======= Changes: * Kick off redundant d and q in ETS+ARIMA, when ARIMA is selected automatically. * A fix in auto.adam() in case of ETS + ARIMA + Regression and automatic selection. The code is slower but more accurate now. * Speed up regression estimation in case of is.matrix(data) and no formula. * I minor improvement, when calling forecast() from adam() - don't ask for interval to speed things up. * Further optimised adam() code with regressors, in case of regressors="select", removing unnecessary steps. * Return distribution="plogis" in oes() and oesg(). * Select regressors on the model with alpha=0.01, so that it does not overfit the data. * Minor optimisations in adam() for RAM consumption in case of explanatory variables and / or backcasting. * forecast.adam() now produces point forecasts (not conditional means) if interval=c("nonparametric","semiparametric","approximate"). * Do Garbage Collection for ADAMX if the sample is bigger than 10k observations. We need to preserve memory in this case. Bugfixes: * Fix for forecast.adam() and factor variables in newdata. * Fix for Mcomp data and outliers detection mechanism loosing lags. * A fix for ADAM ETSX / ARIMAX in cases of no variability in explanatory variables. * And another one for coefbootstrap() in case of regressors="select". * A fix for likelihood calculation for occurrence model and distribution="dgamma". * confint() now returns proper intervals for parameters of adam(), not intervals around zero. * Fix in forecast.adam() for iETS models and different objects used in oes() and adam(). * A fix for provided smoothing parameters in case of estimated deltas in adam(). * Fix for factors in adam(). * A fix for the previous fix of factors. * A fix for iETS in forecast.adam() for cases of zero mean and zeroes in quantiles. * Fixed a funny bug in adam() with data.table and cbind. * A fix for the case of data.frame() and is.zoo(y). * A fix for vcov.adam() in case, when Fisher Information contains NaNs. smooth v3.1.0 (Release data: 2021-02-19) ======= Changes: * We now use filter() function from stats instaed of ma() from forecast package in msdecompose(). * We don't use is.ets from forecast package anymore. * msdecompose() now treats NAs automatically, interpolating them with a combination of fourier and polynomial. * adam() now relies on the same interpolation mechanism as msdecompose() in case of NAs. * Implemented a new auto.adam() ARIMA selection mechanism. It is faster and produces more accurate ARIMA models (e.g. more accurate than auto.ssarima()). Removed the redundant fast parameter from auto.adam(). * Tell if bootstrap was used in summary.adam(). * Add stars for the coefficients that are significant on the selected level. * Gamma distribution in adam(). * Removed ves(), vets() and viss() from the package. They are now available in legion package. Bugfixes: * Bugfix in the initialisation of ARIMA on small samples. * Bugfix in ETSX(A,*,*){D}, which previously had the wrong persistence element. * A fix in coefbootstrap and lags variable, when M3 data is used. smooth v3.0.2 (Release data: 2021-01-27) ======= Changes: * plot.smooth, 7 now will include the holdout. * plot.adam.forecast now produces mean forecast in case of cumulative. * Let ADAM speak for himself - all warnings are now "I cannot do this and that". * warning in case of bounds="none". * outliers and level are now also available in adam() - no need to use auto.adam() for that. * coefbootstrap() for adam. And support for bootstrap in vcov, confint and summary. This now works with auto.adam() as well. * Change origin in coefbootstrap() if initial="backcasting". * We now only take the needed values of B if a longer vector is provided. * Removed checks of obsolete parameters in ves(). * Scale the MSE part of LASSO and RIDGE in adam() by the sd(diff(y)). Bugfixes: * A fix for "YYY" and non-positive data in adam(). * A fix for the selection between "ANN" and "ANA" on some data in adam(). * adam() would not work with provided occurrence. * A fix for sigma.adam() from the model with NAs (returned NA instead of the number). * A fix in vcov.adam() for the data with NAs. * outliers="select" would not work with zoo objects. * A bugfix for orders=list(select=TRUE) without providing ar i ma orders. * A bugfix for outlier!="ignore" and data.frame as a data. * A bugfix in auto.adam() with outliers. We use call now. * A bugfix for vcov.adam() in case of regression and is.matrix(data). smooth v3.0.1 (Release data: 2021-01-12) ======= Changes: * The vector of parameters B now also has proper names in adam(). * Reduced the default number of iterations for ARIMA to the same as for ETS. * The default loss for es(), ces(), ssarima(), msarima() is now "likelihood", assuming normality of the response variable. * adam() now contains the parameter constant, which adds constant (mean) in the model. This is needed for ARIMA part of the model. It acts as a mean / drift, depending on the differences. * New initials for the explanatory variables (factors). Should converge faster to the optimum. * We now use mean with 1% trimming in forecast.adam() for models with T="M". This should help in some cases with outliers. * Reintroduced the bounds for the parameters of adam(). * maxeval in ves() now depends on the number of parameters to estimate. * adam() now accepts orders=list(...,select=TRUE), calling for auto.adam() in this case. * Tuning of initials for ADAM ARIMA and increased maxeval for ARIMA. * We now import gnorm functions from greybox. * trend in formula of adam(). Bugfixes: * Fixed an issue with ARIMA, which calculated the polynomials incorrectly. * auto.adam() would not select optimal ARIMA because of an issue with actuals.adam() method. * A failsafe in adam() for cases, with IG and negative values. * outlier="select" would not work for ts() objects in auto.adam(). * Bugfix in ADAM ARIMA for the profilesObserved and constant. The model should be initialised correctly now. * Fixing auto.adam ARIMA selection and non standard distributions. * A bugfix in ADAM regression and vcov(). We now use alm() directly. * A fix for cases, when explanatory variables contain NAs. * A fix in fitted for mixture models in adam(). * A fix for the plot of objects in case of holdout. * Do simulations for forecast with prediction interval if regression model was constructed. * plot.refit would not work with zoo objects. * A bugfix in adam() in cases, when alm() drops some variables. * A bugfix for xreg, Etype="M" and distribution="dnorm". smooth v3.0.0 (Release data: 2020-12-07) ======= Changes: * ADAM function moved to smooth from a separate package. * Changed the default maxeval in ADAM for xregModel to at least 500. * Tuned the starting parameters for xregModel and xregDo="adapt", so that the thing does not explode on large samples. * Use make.names() function to fix the names of explanatory variables and the name of response. We now depend on greybox v0.6.2. * sim.es() now also accepts one value in persistence - it will duplicate it for all components. * Renamed parameters for distributions in adam(). dalaplace now accepts alpha, dgnorm - beta and dt - nu. This resolves the conflict with LASSO and lambda. * Use internal gnorm() functions. * Return call and bounds in adam(). * Use rectified normal distribution for the confidence intervals for smoothing parameters and ARIMA. * The as.data.frame.summary.adam() method, which produces the matrix of coefficients. * adam() now uses profiles instead of lags for seasonal models. These are updated on every observation via ETS approach. * msdecompose() now produces initials suitable for the first observation of the data via a simple extrapolation. * Switched off dllaplace, dls and dlgnorm in adam(), because their mean values are not easy to calculate. * Log Normal distribution in adam() now assumes that the mean=-scale^2/2. This is needed in order to maintain the property of mean of error being equal to zero. * New method: refit(), which reapplies the model (currently ADAM only) to the data with randomly generated initials and smoothing parmaters, based on the estimated values and the covariance matrix of parameters. Useful for confidence intervals for states and correct prediction intervals from the dynamic models. * A follow-up method from that - reforecast(), which uses states produced by refit() method to produce possible paths from each generated combination of parameters in order to obtain conditional expectation and prediction interval. * adam() now works in cases of leap years and DST. In order to switch this functionality on, y needs to be a zoo object or any other object, containing dates and the lags parameter needs to be set to either 24, 48 or 365 - depending on the frequency of data. * ves() now uses the R code for the loss calculation - the C++ routine was not leading to huge performance gains, but was not as flexible. * Removed occurrence, updateX, transitionX and persistenceX from the es(), ces(), gum() ssarima(), msarima() and respective auto functions. Use adam() if you want that functionality (probably, nobody cares anyway... let me know if that's not true). * LASSO and RIDGE do normalisation using sd instead of mean now. Also, removed the warning message. * Renamed y into data; * adam() now works only with data, xreg is removed. And xregDo is now renamed into "regressors". * adam() now treats categorical variables (factors) differently than the other variables. This becomes especially useful in case of regressors="adapt". Bugfixes: * Fixed dates for the holdout sample in case, when holdout=FALSE for zoo objects. * Fixed the check for admissible bounds in case of xregDo="adapt". * A fix in adam, when xreg parameters are provided and the xreg matrix does not need to be expanded. * Fixed a bug in ETS(M,M,A) models in adam. * Fixes for ETS(A,M,A) initialisation in adam. * A failsafe mechanism for ETS(M,A,M) for cases, when the initial trend becomes negative and larger than the lowest actual value. * es() would not work well for some mixed models and data close to zero due to the initialisation. This should be fixed now. * The models checked in branch-and-bound for es() now have aligned types of errors and seasonal components. smooth v2.6.1 (Release data: 2020-07-17) ======= Changes: * Further tuning of the initial smoothing parameters in oes() and oesg(). * Removed iss() function and redundant parameters (no more checks with depreciator). Also removed the respective redundant parts of C++ code. * outlierdummy() method for smooth class, based on the same stuff from greybox v0.6.1. Bugfix: * window() function would not work in case of non-ts objects. * A bugfix in forecast() for oes(), where B would not be found. 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) ============== Changes: * oes() now returns full names of occurrence. * Renamed covar() method into multicov(). * oes() with occurrence="none" now returns values based on p=1 (likelihood is based on p=1-1e-100). * pointLik() method for oes class. * A separate plot method for oes, because the general diagnostics is not useful. * Added the plot of residuals over time in plot.smooth(), which=9. * oes() now produces "occurrence" class, which is exported from greybox v0.5.9. This is needed for proper integration between greybox and smooth functions. * ves() now accepts B, ub and lb for the optimiser. * ves() is now optimised using Nelder-Mead only. * msarima() now has an option of producing initials using optimisation. * Renamed parameter for the initials of optimiser from "C" or "A" to "B" and upper and lower bounds respectively to "ub" and "lb". This is done for consistency purposes. Functions now also return this in $B and almos all of them accept B=B as a parameter for the initialisation of optimiser. * plot.smooth() now produces "Actuals vs Fitted" plot in case of which=1. The default time series plot is moved to which=7. Bugfix: * print.smooth.forecast() would print prediction intervals even if it wasn't asked to do so. * plot.smooth.forecast() would plot prediction intervals even if it wasn't asked to do so. * A bugfix for oes() and model selection, removing the occurrence type. * A crude fix for the msdecompose(), when type="multiplicative" and there are zeroes in the data. smooth v2.5.5 (Release data: 2020-01-25) ============== Changes: * sim.es() now will give warnings, when NaNs are produced in the actual values. * Fucntions with loss="GTMSE" sometimes could not be estimated because of the exponent in the optimiser. Now it is in logs and at least doable. * New function - msdecompose() - which is needed for more advanced ETS. This does multiple seasonal decomposition based on centred moving averages. * More advanced plot.smooth(), which now acts similar to plot.greybox(), with similar options of what to plot. The documentation is now available for plot.smooth(). * Tuning of some methods for the class smooth. * forecast with prediction intervals for msdecompose(). * residuals.smooth() now returns either et or log(1+et) - depending on the type of model (additive / multiplicative). * New methods: rstandard() and rstudent() for the smooth class. * Updated vignette for oes(), taking the last version of our paper with John E. Boylan. Bugfix: * es() with multiplicative models would fail sometimes in case of bounds="a" because of the negative values. We now restrict the bounds with positive values only. smooth v2.5.4 (Release data: 2019-10-22) ============== Changes: * loss="TFL" is now called loss="GPL" - General Predictive Likelihood. * The return of unbiased estimate of variance (division by T-k)... We now use it for the calculation of the all the prediction interval types, but there is also an option of using the biased (division by T) parametric prediction interval with interval="likelihood". * Fix for the initials in the optimiser in case of difficult mixed mdels. * Updated the description of the bounds parameter in ves(). smooth v2.5.3 (Release data: 2019-08-19) ============== Changes: * es() now treats the parameters that reach the boundary values (within the 1e-3 distance) as provided and substitutes them by the bounds (i.e. 0 or 1). This should influence the model selection procedure. * Also if phi==1, we switch to the non-damped version of the model. * Warn users if the response variables in ves are perfectly correlated. * Minor changes in the formulae in oes() vignette. * Allow ves() to work on very small samples, if the model is restrictive. This is based on the number of parameters to estimate per series now. * sigma() method for the data simulated by smooth functions. * Don't check the provided occurrence if it contains 1 only. * RelMAE is now called rMAE and RelRMSE is now rRMSE in the greybox package v0.5.3. Bugdixes: * sim.es() would complain in some cases of nsim>1 and the default values of parameters. * es() did not work appropriately with the provided persistence parameter in the non-default bounds. * A bugfix for cma(), which did not have silentText parameter. * A bugfix in the calculation of the likelihoods based on GTMSE and aGTMSE losses. smooth v2.5.2 (Release data: 2019-07-24) ============== Changes: * The GSI is now merged with VES with several advanced parameters. The seasonal models now have the subnames, according to the taxonomy of Chen et al. (TBA). gsi() function is no longer available. * seasonal and weights parameters in sim.ves() - they allow generating the data from VES[CCC] model. * Corrected the dependence on forecast package. * summary of smooth functions is a bit closer to the one from greybox now. * Renamed the external parameter "modelLags" into "lagsModel" for consistency purposes. * Parametric prediction intevals in oes(). The oesg() is more complicated and would need more work. * Implemented forecast() method for the oes and oesg classes. * Tuned the outputs of the smooth functions (so that they look closer to the greybox ones). * Return of initial="backcasting" as the default option for ces() and auto.ces(). Bugfixes: * Bugfix in the combination of models in es(), when the data was non-seasonal. * Also, the duplicates in the modelsPool are now removed. * Bugfix on oes() and oesg() in case of explanatory variables (parameters stability was checked incorrectly). * Bugfix in oes() in case of model selection and holdout=TRUE. * The number of parameters of ETS was wrong, when backcasting was used. * Corrected the names of the columns for errors and fitted values of ves(). smooth v2.5.1 (Release data: 2019-06-13) ============== Changes: * New initials for the smoothing parameters in oes(): 0.05 instead of 0.01. This should help in the optimisation. * oesmodel can now be set to NA / NULL, the es(), ssarima() etc will work, resetting this to the default "MNN". * Corrections in the vignette for oes, according to the most recent version of our paper. * A little bit more explanation for the es() function and references to the website. * Model selection is now available in the oes() function. I'd recommend sticking with pure models. * Renamed the fitted values for the underlying models in the oes() and oesg() into "fittedModel" (former "fittedBeta"). * Rolling back "quiet" into "silent". The former is more difficult than the latter. * "data" parameter is now renamed into "y" for consistency purposes (so that the input is more similar to the functions of the forecast package). * "cfType" is now renamed into "loss". * "workFast" in auto.ssarima() and auto.msarima() is now "fast" instead. * "intervals" (plural) is now "interval" (singular) instead. This is needed, so that the input is consistent with predict() function. * "actuals" are now renamed into "y" in the output of the functions. * A failsafe mechanism for SSARIMA and MSARIMA for the cases, when there is no models and no constant. Bugfixes: * A bugfix in occurrence="d" - an error was not calculated correctly. * A bugfix in the model selection mechanism for oes() (the forecast was set to 10 instead of h). smooth v2.5.0 (Release data: 2019-04-25) ============== Changes: * New function - oes(). This will eventually substitute iss(). This aligns with the IJF paper by Svetunkov & Boylan (TBA). Only "fixed", "odds-ratio", "inverse-odds-ratio" and "probability" models are available at the moment. "general" is expected to arrive in several days... * es(), ces(), ssarima(), msarima() and gum() now use "occurrence" parameter instead of "interemittent" and respectively oes() function instead of iss(). * New error measures: MIS, sMIS and RelMIS - based on the Interval Score of Gneiting and Raftery, 2017. This will be moved to greybox in the next version of smooth. * New function - oesg(), implementing the General Beta-Bernoulli exponential smoothing model for the occurrence part of the data. This makes occurrence="g" available for the oes(), es() and all the other functions. * The fitted values are now multiplied by the probability of occurrence in the case of intermittent model. * The new likelihood for iETS models, which takes the missing values into account via EM-algorithm. * The new estimate of the variance of the error for the iETS, based on the likelihood. It is obviously biased, but consistent and more efficient. * Corrected optimisation of the iETS with rounded values, maximising SD directly in the function. * The intermittent models are now returned in the "occurrence" rather than "imodel" parameter and should be provided in the functions via "occurrence". * imodel is renamed into oesmodel for the univariate models. This is done for the consistency purposes. * A vignette for oes() and the new intermittent model + references to the iETS and SSARIMA papers. * Use actuals() method from greybox instead of getResponse() from forecast. * cma() now relies on msarima() rather than on ssarima(). Bugfixes: * Bugfix in oes with occurrence="d" and model="AZZ". * Semiparametric intervals were broken. * Wrong model name was produced on the graph of es(). * Fixed a bug in backcasting fitter with "Mat::col(): index out of bounds". smooth v2.4.8 (Release data: 2019-03-10) ============== Changes: * ves() now has an option of producing persistence="seasonal". Seasonal smoothing parameter will be common across the series in this case. * New function - pinball(), which returns the value of the loss (either quantile, or expectile, or any other one). * IMPORTANT!!! The variance of errors in the smooth functions is now calculated without the bias correction. This is because we claim that we use likelihood in the estimation. Expect the increase in prediction intervals! * The number of parameters is now correctly taken into account in the calculation of AIC, AICc, BIC and BICc of ves(). * RelMSE is now substituted by RelRMSE in the accuracy calculation. Bugfixes: * sma and cma did not check the existance of model correctly. Now it is restricted with their environment only. * Check if the data is positive for the multiplicative types of auto.gum() and gum() functions. * auto.gum() sometimes failed, when IC values were the same. * Accuracy has been calculated incorrectly for ves() models. * gsi() now checks the provided weights for NAs. * gum() would not work correctly, when length(lags)>length(orders). * es() would kill R in cases of "MAN" model and small samples. Now it does not do that. smooth v2.4.7 (Release data: 2018-11-30) ============== Changes: * graphmaker() is now moved to greybox package. * Moved sigma.ets() to greybox package. * pls.smooth() returns more or less reasonable values, when the model overfits the data. * A set of is-functions, checking whether the object is produced by smooth functions. * New function - gsi() - ETS with Group Seasonal Indices. This is based on VES with some restrictions. The work in progress... * The number of degrees of freedom in vector models (ves and gsi) is now calculated per series, not overall. This corresponds to Lutkepohl (2005), p.75. * Minor updates in the vignettes for ves with references to Lutkepohl and a couple of papers. * ETS(M,Z,Z) now returns correct semi and non parametric intervals in case of intermittent data. * Given the recent update in greybox, changed the "b" to "scale" in distribution functions. Bugfixes * ETS(M,X,X) sometimes could not be optimised because of the too high smoothing parameters values and negative initials. This should be fixed now. * sim.ves() wasn't working correctly in case of AAA models and provided initials. * The error generated in sim.ves() was always multiplied by the initial state, so if it was zero, then nothing would happen. * Found bug due to which the exogenous variables wer ignored for the forecasts from ETS(M,Z,Z) models. smooth v2.4.6 (Release data: 2018-08-25) ============== Changes: * All the multisteps estimators now have what they were supposed to originally have: smaller sample of T-h. * graphmaker() function is now more flexible, allowing to tune parameters of plot. * Centered Moving Average function is now available. This is not a model, but just a transfer function of SMA. * New function - msarima() - Multiple Seasonal ARIMA. This is a reimplementation of ssarima() function, that relies on a different state-space model and works substantially faster. * New function - auto.msarima() - for the order selection of msarima. * Tuning of msarima() optimisation. * New method - modelName - that returns the name of the model. e.g. "ETS(M,A,N)". Can be useful for summarising results. Also applicable to non-smooth classes (e.g. Arima, ar etc). * A new internal function for determining the type of model used (smoothType). * Moved pointLik, pAIC and errorType methods to greybox package. * Added MAE, MSE and MRE in the Accuracy function. * auto functions now switch to intermittent="n", when there's not enough non-zero observations. * ges() is now renamed to gum() - Generalised Univariate Model. * The code for prediction intervals in case of intermittent model is now simplified. * Renamed several internal variables (y.for -> yForecast, y.fit -> yFitted, datafreq -> dataFreq etc) for the consitency purpose and convenience. * The code of intervals="np" is optimised a little bit and should take less memory for the calculations. Bugfixes * Fixed a bug for logistic intermittent model, when the probability of occurrence was becoming 0 or 1. * es() would not count damping parameter as parameter in the initialisation if model selection is chosen. * Bugfix for pls(), when the multiple steps ahead covariance matrix is becoming too large to calculate its determinant. * RelMAE, RelMSE and RelAME were calculated incorrectly in smoothCombine. * No more warnings from iss(x, intermittent="p") when the data is only slightly intermittent. * Fixed cases, when level of an intermittent model was becoming too large or too small. * Fixed a bug, when auto-functions constructed only parametric prediction intervals. * Functions failed with xregDo="s" when xreg was data.frame. * nParam sometimes contained negative values for the "Provided" row. smooth v2.4.5 (Release data: 2018-07-03) ============== Changes: * The covariance matrix of VES now also contains named columns and rows. * And so do residuals, fitted values and forecasts. * errorType, pointLik and sigma now return something useful for ets class. * Changed the set of default values for randomizer for simulate functions to "rnorm","rt","rlaplace" and "rs". sim.es() also works with "rlnorm". * Started the work on sim.ves function. * Added separate ham() function for HAM calculation. * ssarima() now also accepts orders=c(p,d,q). lags are assumed to be equal to 1 in this case, so that a non-seasonal model is constructed. * RelMSE and RelAME error measures are introduced. These should be useful for intermittent demand. * sim.ves() now seems to work. * sim.ves() is tested and now should work fine in the majority of cases. * simulate() method for ves is now available. * Code of simulate.smooth() is optimised and shortened. * Small addition in vignette for sim.ves(). * New method for smooth functions - pAIC. * Simplifications in the number of parameters calculation. Bugfixes: * ves() now produces the correct number of plots if silent=FALSE. * iss() returned the wrong likelihood because of a typo in the formula. * Fix for the internal likelihood calculation for intermittent logistic models. * Corrections in pointLik() function. This should now be closer to the original likelihood if summed up. This is still an ongoing research, this thing will change in future. * Bugfixes in sim.es and sim.ssarima, so that rlaplace and rs can be easily used. * es(), ssarim(), ces() and ges() didn't work correctly when the already estimated model was reused with new xreg of a different size. The new fix partially solves the problem. Make sure that you provide the table with the correct exogenous variables! * When a model is reused the nuber of parameters in AIC should be equal to 1 (because only variance is estimated, the rest is provided). smooth v2.4.4 (Release data: 2018-05-31) ============== Changes: * New methods for smooth and vsmooth classes: BICc and AICc. * New restrictions on the seasonal multiplicative models, so that the indecies don't become rediculous. * New function - smoothCombine - that combines forecasts from es(), ssarima(), ces(), ges() and sma(). * A reference to a paper about the combination of intervals. * ves() now returns FI if the user asked for it. * ves() now also returns error measures in cases of holdout=TRUE. * Finally, we use the colnames of the provided data in the produced variables. * modelType() and errorType() methods are now available for iss class. * ves() now also has usual bounds (smoothing parameters between 0 and 1). * Updated the description of the package and corrected several typos. Bugfixes: * MSCE, MSEh, MACE, MAEh, CHAM and HAMh returned the wrong values in the optimiser for multiplicative models. Now they are correct and the respective likelihoods are correct as well. * es() in some cases could not find optimal solution because the returned 1e+100 was lower than the estimated value (especially in case of GTMSE and multiplicative models). * ves() did not work, when the original data was less than 1 and the multiplicative model was needed. * es() now returns forecast as a vector, not a matrix. * ves() would not work correctly for provided persistence. * ves() calculated number of parameters incorrectly in some cases. smooth v2.4.3 (Release data: 2018-05-03) ============== Changes: * Two new methods for the models: covar() returns covariance matrix of 1 to h steps ahead forecast errors; pls() returns Prediction Likelihood Score for the model. * We now return measurent and persistence vectors and transition matrix from every smooth model. This is needed for the analytical covar(). * covar() now also produces analytical covariance matrix for all the additive models. The same code is used for multiplicative models and should work as an okay approximation. * The code of prediction intervals has been updated. They should be more precise now. * The prediction intervals for cfType=c("MAE","HAM") are now produced using Laplace and S distributions. * After several rounds of derivations, it seems that the forecasts for multiplicative models still correspond to the median, so there is no need for bias correction. * GES now has a restriction on transition matrix and measurement vector - (0, 1). The idea is that they represent Markov Chain elements. * Model selection is now supported for MSEh and MSCE as well - we rely on quasi-likelihood of normal distribution. Bugfixes: * iss() produced wrong warnings, when wrong value of intermittent was specified. * ges() and ssarima() used old versions of intermittent in the selection loop. * ges(), ces(), ssarima() had problems with model selection for intermittent because of the ic parameter. smooth v2.4.2 (Release data: 2018-04-03) ============== Changes: * Moved AICc(), xregExpander(), stepwise() and nParam() to greybox package. We now depend on greybox (>=0.1.1). * es(), ces(), ges(), ssarima() and all the automatic univariate functions now have model selection mechanism in case of cfType="MAE". This is based on Laplace distribution. * The same thing is now available for cfType="HAM". This is based on a distribution that I have not yet met in the literature and had to derive myself. * Corrections in AICc.smooth for intermittent models. * Due to log-normality assumption in multiplicative models, the forecasts should have a bias correction. This means that ETS(M,N,N) does not produce straight line anymore, but a slowly increasig one. This has been corrected in this version of smooth. * We now warn, when the number of degrees of freedom is too low for the reasonable estimation of variance (comparing with 5, because a median human being has 5 fingers per hand). Bugfixes: * Combinations in es() did not work in case of something like "CYY" because of the wrong pool of models. * Found a bug in forecast production in cases, when prediction intervals were simulated. * SBA was not written down, when used in iss. This did not allow to reuse the model properly. * In some weird cases Croston would produce forecats of intervals < 1. Fixed that. * Fix in iss() for the cases when intermittent model is applied to non-intermittent data. smooth v2.4.1 (Release data: 2018-03-04) ============== Bugfixes: * Fixed minor typos in the description of the package. * Fix in iss() for Interval-based model, when for some reason the probability becomes greater than one. * When the incorrect error/trend/season were specified in es() it would fail to work. * Fix for the cases, when the names of several xreg variables are the same. * When xreg is invalid and set to NULL, change xregDo to "use". smooth v2.4.0 (Release data: 2018-02-10) ============== Changes: * ves() model now accepts intermittent parameter. So we can construct multivariate intermittent models. * ves() now prints information about the underlying intermittent model. * New estimator - MSCE (Mean Squared Cumulative Error). Needed in cases of cumulative demand. Bugfixes: * ves(): Initial values for seasonal components in case of multiplicative models were incorrectly estimated. * iETS could not be used in some cases of highly intermittent data and intermittent!="n". * logLik was incorrectly calculated in iss() for cases of intermittent="p". * The selection of intermittent model was done incorrectly due to the new return of ICs. * Return NULL in logLik() function, when logLik is unavailable for the model (e.g. combination of models). Similar thing with nParam(). * Check if the data.frame is provided to ves. * stepwise() now ignores NAs in the provided data. smooth v2.3.2 (Release data: 2018-01-18) ============== Changes: * The providedC is now used in case of xregDo="select". This should increase the speed of convergence and fix several bugs related to optimisation problems. * The correct initialX are now used in cases of es("ZZZ") and es("CCC"). * We now return the matrix of ICs and ICweights in cases of model selection and combinations of es(). * maxeval in the optimiser now depends on the number of parameters. If we have more than 10, then maxeval=1000. Otherwise maxeval=500. * Removed a silly SMAPE from the output of accuracies and substituted by a more useful sCE. Both are still available via ourModel$accuracy. Bugfixes: * ges() added an array to a vector, which caused dozens of warnings. Fixed. smooth v2.3.1 (Release data: 2018-01-13) ============== Changes: * es() now uses branch and bound mechanism for XXX and YYY models. * intermittent="l" now allows dealing with seasonal models in imodel. * make Accuracy() function available for users. * ces(), ges() and ssarima() now produce some forecasts on small samples (e.g. less than 6 observations). This mechanism is not yet smart enough, and will be improved upon. Bugfixes: * es() now also checks if data is multiplicative in case of YYY and acts accordingly. * dataStart and yForecastStart variables in the code. * stepwise() now has a more userfriendly Call in the output. smooth v2.3.0 (Release data: 2017-12-23) ============== Changes: * New function, viss() - vector intermittent state space model. Allows modelling occurrence probability of several variables simultaneously. * New initialisation for es(), ges() and ces(). This should help getting more accurate initial states in cases of high frequency data. * The user can now control the optimiser via maxeval and xtol_rel provided in ellipsis of es() and ges() functions. Bugfixes: * smooth functions would return errors in case when some xreg variables were dropped and only one would be left. * ETSX(Z,Z,Z) did not work when xreg contained negative data. Now it should. * Number of parameters in case of xregDo="select" was incorrect. smooth v2.2.2 (Release data: 2017-12-15) ============== Changes: * Updated vignettes. * New probability type for intermittent models - "logistic". * In the case when we don't have binary xreg for the holdout, we now consider it as random and forecast it using iss(). * graphmaker() now only resets par() when legend=TRUE. This allows using layout and producing several plots with the function on one canvas. * xregExpander() now uses iss() function in case of binary data. * Updated an example in stepwise() function. * ves() function now uses warning() instead of message() everywhere. * iss() now also accepts and returns initialSeason (works with intermittent="l" only). Bugfixes: * Fixed Likelihood calculation for TSB probability model. smooth v2.2.1 (Release data: 2017-11-15) ============== Changes: * GES now has a multiplicative form. And auto.ges() allows selecting between additive and multiplicative models. * intermittent now has "i" and "p" values instead of "c" and "t" respectively. This aligns with the recently published working paper on the subject. * cfType now has a different set of values. RTFM. Bugfixes: * Corrected a bug in auto functions with intermittent data. smooth v2.2.0 (Release data: 2017-10-26) ============== Changes: * New function - auto.ges(). It's not fast, but it's pretty efficient. Bugfixes: * Number of parameters in ges() was not calculated correctly. * ges() could not be initialised in cases of small samples and models with large orders. * Fixed a bug in SSARIMA with multiple steps ahead cost functions. * es() sometimes returned smoothing parameters values that did not satisfy the usual constrains. * New initialisation of smoothing parameters in es() in case of cfType="HAM". smooth v2.1.2 (Release data: 2017-09-21) ============== Changes: * Changed the order of parameters in the sim-functions, so that the number of observations and number of simulations follow the very first parameter. This should simplify things. * Removed some of the redundant alliases in documentation and model.type() function. Use modelType() instead. * Variance in cases of seasonal models and cumulative=TRUE, are now produced using simulations. * New function - sim.sma() - generate data from SMA model. Bugfixes: * Check of initials when model is not selected in es(). * sim.ssarima() did not take correctly into account the provided initials. 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) ============== Changes: * Occurrence part of TSB model now accepts ETS models. So you can have trends / seasonality in probability. * Both Croston and TSB in iss() can now also accept exogenous variables. * 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 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. Bugfixes: * Parameteric prediction intervals for cases of h=1 did not work for some models. * Fixed model selection on non-positive data, when model="YYY", intermittent!="n", but we don't have enough non-zero observations. * Models with boundary probabilities returned -Inf as likelihood value, which is incorrect. * xregDo now works with only one variable as well. * intermittent="a" did not work with auto.ssarima() and auto.ces() functions. * initials of xreg did not work correctly when Etype="A". * Now we force the provided xreg to become a matrix. * xreg did not work well with zoo, when xreg contained NAs. Now it should work. * auto.ssarima() did not allow selecting the best model between AR models only. Now it does. * Fixed xreg selection in cases of xreg having special characters in names. * Centering of errors in sim.es() is now done automatically only for runif. * Number of parameters returned by models was not correct, missing exogenous variables and intermittent model. smooth v2.0.1 (Release data: 2017-07-05) ============== Changes: * Forecasts and prediction intervals of the rounded values are now produced analytically. * PLS now needs vector of variances, which is produced only when intervals==TRUE. In all the other cases its value can be incorrect. * New initials for the exogenous variables in case of multiplicative models + stricter check of correlations between the regressors. * We also now check multiple correlations for exogenous variables. * silent="all" is now the default value. Bugfixes: * Provided imodel sometimes would not be used correctly in the initialisation. * Rounded values were not returned in cases when intervals=FALSE. * PLS could not be calculated for some cases, when ts object was used. smooth v2.0.0 (Release data: 2017-07-01) ============== Changes: * New function - ves(). Currently the basic features of all the pure additive and pure multiplicative models are implemented. No prediction intervals, no intermittence, no automatic model selection. * New parameter - imodel, which determines the type of model for probability in case of iSS models. Can also accept models previously estimated using iss() function. * Point forecasts in case of simulated data are now based on the simulation rather than analytical expression. * Max order of SMA is now equal to obsInSample. * Introduced a hidden parameter, rounded, which determines whether the rounded up value of demand sizes is assumed in the model. This influences the cost function and leads to a different results in case of intermittent model. * If cumulative==TRUE, then we now return cumulative holdout values as well. * New method pointLik() for smooth class. It returns the vector of log-likelihoods for each separate observation. * Better integration of sim.es() objects and es() function. Now you can do something like this to fit the "true" model: x <- sim.es("MNN"); es(x$data,model=x). * es() now also returns transition matrix. * Optimised C++ code, which should result in the growth of computational speed for ~25%. * es() now returns PLS value in the accuracy for all the types of models. Bugfixes: * simulator function in Rcpp did not cover the cases, when level could become negative. This is now fixed. * ssarima() now checks if the number of observations is enough for the model and stops if it is not. * es() didn't work in some cases of seasonal models, when number of in-sample observations was less than twice frequency of data. The seasonal model should not be used there in the first place. * getResponse() function now returns the in-sample actuals. * exists() functions in the code would look into the parent environments. Now they don't. * sim.ssarima() returned state vector with wrong names in case of constant. * When coef() was applied to es() objects, the initialSeason parameters were not returned because of the old name of the variable. * Corrected a problem with initials of iETSX models. smooth v1.9.9 (Release data: 2017-05-03) ============== Changes: * New parameter - cumulative - which makes functions return aggregated over the forecast horizon values (point and interval forecasts). * graphmaker() now treats cumulative forecasts. * Error measures take the possible cumulative nature of forecasts into account. * auto() functions now also accept smooth.sim objects as data. * polyroot() was working badly for multiple seasonal ARIMAs, so I had to ditch it in favour for my Rcpp function. SSARIMA now works even slower. Will need to optimise it somehow. * Updated vignettes, showing how multiple seasonal ARIMA can be estimated. * Renamed MLSTFE into GMSTFE - Geometric Mean Squared Trace Forecast Error. This is slightly easier to remember. * Trace Forecast Likelihood is once again available as estimator. * Started work on a new function - ves() - Vector Exponential Smoothing. It will be released in 2.0.0. Bugfixes: * datafreq is now used in all the functions. smooth v1.9.1 (Release data: 2017-03-28) ============== Changes: * New function in error measures category - pls() - Prediction Likelihood Score. * PLS is now included in accuracy measures of es(). Bugfixes: * Fixed a problem with phi estimation in cases, when initial values for the optimiser are provided. * Now we don't check C / CLower / CUpper if they are not provided. * Fixed a problem with prediction intervals construction for binary variables. smooth v1.9.0 (Release data: 2017-03-18) ============== Changes: * New function - sim.ges() - simulate data using GES model. Bugfixes: * Fixed bug with cfType="MSTFE" in case of multiplicative errors. smooth v1.8.0 (Release data: 2017-03-12) ============== Changes: * New function - xregExpander(), which creates matrix of xreg with lagged values based on provided data and automatically fills in NAs with forecasted values using es(). * "optimal" is now the default initialisation method for ces(). * Created templates for roxygen2 for the consistency purposes of the documentation. * plot() methods for classes smooth and smooth.sim now accept main and ylab parameters. Do whatever you want! Bugfixes: * In cases of df<=0 we now produce a warning and prediction intervals based on Chebyshev's inequality. * es() now does not complain about failing to estimate something when persistence is predefined. * Fixed a bug, when predicting binary variables using any iSS model, we would end up with errors. Now in this case we just select among the intermittent models, ignoring non-intermittent one. smooth v1.7.1 (Release date: 2017-03-01) ============== Changes: * Mixed ETS models now produce negative forecasts. But it does not make much sense to my taste... * The initial values of smoothing parameters before the optimisation are now set to 0.3, 0.2, 0.1 for both additive and multiplicative models. * Some plot() methods for smooth now accept additional parameters. * es() now also accepts hidden parameters C, CLower and CUpper for initialisation of optimiser and setting bounds in which to search for the optimal value. * es(), ces(), ssarima() and ges() now accept smooth.sim objects and can automatically extract data from them. This is just for comfort... smooth v1.7.0 (Release date: 2017-02-24) ============== Changes: * The package now uses roxygen2. It's a bit messy at the moment, but will be sorted out soon. * We now import a couple of functions from forecast package (forecast and getResponse). This helps us make better connection between methods in packages. * forecast() function for smooth now returns $method as a name of applied model and $model as a fitted R model (corresponds to what forecast does in forecast package). Bugfixes: * If data passed to functions was a matrix, then functions wouldn't work. Now they say about that out loud. * Fixed a bug with mixed models with multiplicative errors. They produce sometimes senseless forecasts, but at least they produce them. * Added some stuff to src folder (registerDynamicSymbol.c) in order to make CRAN checks shut up about some irrelevant things (R_useDynamicSymbols? R_registerRoutines? WTF?!). smooth v1.6.4 (Release date: 2017-02-20) ============== Changes: * Added orders and lags method for the class Arima. This should allow easily extracting these values from models fitted using arima(), Arima() and auto.arima() functions from stats and forecast packages. * modelType() is now renamed into model.type(). * If xreg contains NAs, we now substitute them with zeroes. Bugfixes: * Fixed a bug with initial value in backcasting, that was causing annoying problems in ssarima. * Fixed a bug in sma() function and model provided to it. * Fixed names of xreg in cases when we need to drop some of the variables. * In some cases the second optimiser behaved badly and returned worsened value. Fixed it. * Fixed a bug with phiEstimate becoming equal to TRUE, when phi is not needed at all. smooth v1.6.3 (Release date: 2017-02-14) ============== Changes: * Fixed a problem with ETS(M,Z,Z) and xreg. * Function now removes xreg which is equal to the value we need to forecast (if there is one). * We also now return formula in es(), which is accesible via formula() function. This should help when you have problems in understanding what model has been constructed. Bugfixes: * Corrected description of accuracy measures in es(), ces(), ges() and ssarima(). * Fixed some bugs relating combination of models with xregDo="s". smooth v1.6.2 (Release date: 2017-02-01) ============== Changes: * Addressed issue #58. Now matrix is first transposed and then model is fitted to data. This led to a tiny increase in speed. * Prediction intervals for intermittent models are now rounded up. Bugfixes: * Non-parametric and semi-parametric intervals were broken since 1.6.0 * es() with backcasting and predefined persistence was complaining on estimation problems without any reason. * Corrected initial quantiles for prediction intervals and optimisation mechanism (for correct prediction intervals for intermittent data). smooth v1.6.1 (Release date: 2017-01-27) ============== Bugfixes: * Corrected a bug with nExovars in es() smooth v1.6.0 (Release date: 2017-01-27) ============== Changes: * ssarima(), ges() and ces() now have xreg selection mechanism. * auto.ssarima() and auto.ces() now also have that stuff. * Finally es() does that as well. * iSS models now return relevant error measures. * es() now allows combining a pool of models, when the list includes "CCC". * logLik() now also includes nobs as an attribute. * We now report modelX if it includes xreg. For example, "ARIMAX" instead of ARIMA. * Renamed some internal variables for consistency purpose. * Redone prediction intervals for iSS models. Bugfixes: * Renamed some internal parameters for consistency purposes. * Found a bug with nParam calculation in ges(). * Fixed a bug that did not allow to use combinations with intermittent demand in es(). * Fixed a bug in backcasting mechanism. * Fixed a bug with incorrect df calculation for prediction intervals in combinations. smooth v1.5.2 (Release date: 2016-12-18) ============== Changes: * Instead of having dozens of methods based on AIC and BIC, we now have logLik, nobs and AICc.default. The latter should also work with other, non smooth, classes (e.g. "ets","lm"). * sim functions now return likelihood via logLik value rather than "likelihood". This allows using logLik, AIC and other functions. * iss function now also does the same... * Introduced "SBA" as a separate method for intermittent demand. Bugfixes: * Parametric prediction intervals for iSS models always had width of 95%. This is now fixed. * Corrected bug in Croston's iSS, where the last observation of data was included as non-zero demand. * Fixed a bug when MNN was fit to intermittent data without intermittency. smooth v1.5.1 (Release date: 2016-11-30) ============== Changes: * Now you can produce 0-steps ahead forecasts using smooth functions. Pretty cool, ah? And pretty useless for my taste. But here it is! * iprob in sim functions now also accepts a vector, implying that probability may vary over time in style of TSB and Croston's method. Bugfixes: * intermittent data was not taken correctly into account in number of parameters calculation in functions. * Fixed a bug with persistence not accepting matrices in es() * persistence now looks nice in the output of sim.es() * sim.ssarima() had a bug with array not becoming a matrix. Nailed it! smooth v1.5.0 (Release date: 2016-11-13) ============== Changes: * auto.ssarima() now allows combining forecasts using IC weights. This is a first try. Prediction intervals for the combined model are currently incorrect. * Made important changes to initialisation of SARIMA and some tuning in backcasting mechanism. * Some tuning in sim functions in parts with ellipsis checks. * sim.ssarima() now accepts orders as list. This should be handy when doing sim.ssarima(orders=orders(ourModel)). No need to define each order separately anymore. * ssarima() also accepts orders as list. No need to specify separate ar.orders, ma.orders and i.orders (they are now optional) if you want to extract value from another model. Plus it is handy just to write orders=list(ar=1,i=1,ma=c(1,2,3)). * auto.ssarima() now also uses orders as a list variable instead of ar.max, i.max and ma.max. * sim.ssarima() now uses burn-in period if the initials were generated. * Uodated manuals, so they are a bit more consistent. * Got rid of silent parameter in sim functionst, because all the info they give needs to be put in warnings. * sim functions now print proper warnings. * Tuned initial values of es(). This should be helpfull in cases with backcasting of initials. * Optimised auto.ssarima() mechanism. Not faster, but more accurate. Bugfixes: * sim.ssarima() wouldn't work in cases of ARIMA(0,0,0) with/without constant. * polynomials were multiplied inccorectly in cases of ARIMAs with d>1. * Fixed a bug with phiEstimate not beeing used correctly. smooth v1.4.7 (Release date: 2016-11-01) ============== Changes: * New function - sim.ces(), that generates data from CES model with predefined parameters. * Due to (1) simulate.smooth() now also works with CES. * modelType() in cases of ces() now returns the full name of model instead of the first letter. * auto.ces() has now a smaller pool of models: "none", "simple" and "full". Bugfixes: * Fixed problem with xreg length and provided initialX (issue #59 on github). * Fixed a check of models pool in auto.ces(). smooth v1.4.6 (Release date: 2016-10-23) ============== Changes: * New function - sim.ssarima() that allows generating data from any ARIMA with any provided parameters. * New methods for smooth class: lags, orders and modelType. First two are for ssarima(), ges() and sma(), the last one is for es(), ces() and ets() from "forecast" package. * Introduced new class for simulation functions, "smooth.sim" and created print and plot methods for them. * es() now accepts "XXX" as model. This allows excluding multiplicative components from the pool. This does not use branch and bound. So model="ZXZ" will go through all the models with T="N", T="A" and T="Ad". * Similarly es() can now select the most appropriate non-additive model. This is regulated with: model="YYY". Minor changes: * Updated print for "smooth" class for es() and ges(): now we produce a nice vector with names of smoothing parameters. * simulate.smooth() method update in order to take sim.ssarima() into account. * AICc now also extracts AICc from ets() of "forecast" package. Bugfixes: * Fixed a bug with provided model with damped trend. * Fixed a bug in pool of models with damped trend ("ZAdZ"). smooth v1.4.5 (Release date: 2016-10-16) ============== Changes: * Parameter intervals now accepts type of interval instead of intervalsType. * Polynomials of ssarima() are now multiplied in C++. Initialisation is now done there as well. This slightly speeds up the estimation and construction of SSARIMA. Bugfixes: * Fixed names of returned smoothing parameters by es(). smooth v1.4.4 (Release date: 2016-09-20) ============== Changes: * auto.ssarima() function uses now a different algorithm. This allows speeding up order selection process and selecting models closer to the "true" one. * Some corrections in smooth-Documentation. * Package will now tell its version when loaded. Bugfixes: * Corrected C++ bug that caused problems on Solar OS. smooth v1.4.3 (Release date: 2016-09-16) ============== Changes: * Removed "TFL" as a cost function type and "asymmetric" as intervals type. The functions still accept these parameters, but the parameters are now hidden, because currently they are not ready for wide audience. * Changed how number of parameters is calculated when initials are provided. They should be counted in. Only backcasting now excludes initials in calculation of number of parameters. * Prepared vignette for es(), ces(), ssarima(), ges(), sma() and sim.es(). This now includes examples with some comments. * Uploaded documentation for the package to github (https://github.com/config-i1/smooth/smooth.pdf). This will be published as working paper and will be available via ResearchGate. Bugfixes: * Fixed a bug with intervalsType="s" not working for auto functions. * data provided to auto functions is now checked. smooth v1.4.2 (Release date: 2016-09-15) ============== Changes: * We now use vignettes, explaining how to work with functions and what they return. This is just a start of the work. Vignettes will be updated. There is also a work on documentation for models underlying smooth package. This is currently reviewed and will be available as a working paper soon. * New function - sma() - Simple Moving Average. It fits one as a state space model. So, apparantely there is a model underlying simple moving average method... * Named transitionX and persistenceX are now returned, when using exogenous variables are used with updateX=TRUE. This should simplify the analysis of these matrices. Bugfixes: * A fix for plot(es(...)) in case of inclusion of exogenous variables leading to states containing more than 10 columns. * Warnings are now always printed out for unstable SSARIMA. smooth v1.4.1 (Release date: 2016-09-09) ============== Changes: * We now suggest testthat package and do more extensive tests in order to make sure that everything works as it should. * Introduced parameters A and B in ces() function. * Got rid of parameter C in ces() function. Bugfixes: * ssarima() could not construct ARIMA(0,1,0) without constant. Fixed that. smooth v1.4.0 (Release date: 2016-09-08) ============== Changes: * Started this NEWS file. * Fixed a bug with ssarima() not accepting previously estimated models in cases with constant=TRUE. * Removed NUS and sim.ces. They will return when they are in a better condition.