Description Usage Arguments Details Value Author(s) References See Also Examples
Function estimates CES in state space form with information potential equal to errors and returns several variables.
1 2 3 4 5 6 7 8 9  ces(y, seasonality = c("none", "simple", "partial", "full"),
initial = c("backcasting", "optimal"), a = NULL, b = NULL,
ic = c("AICc", "AIC", "BIC", "BICc"), loss = c("likelihood", "MSE",
"MAE", "HAM", "MSEh", "TMSE", "GTMSE", "MSCE"), h = 10, holdout = FALSE,
cumulative = FALSE, interval = c("none", "parametric", "likelihood",
"semiparametric", "nonparametric"), level = 0.95,
bounds = c("admissible", "none"), silent = c("all", "graph", "legend",
"output", "none"), xreg = NULL, xregDo = c("use", "select"),
initialX = NULL, ...)

y 
Vector or ts object, containing data needed to be forecasted. 
seasonality 
The type of seasonality used in CES. Can be: 
initial 
Can be either character or a vector of initial states. If it
is character, then it can be 
a 
First complex smoothing parameter. Should be a complex number. NOTE! CES is very sensitive to a and b values so it is advised either to leave them alone, or to use values from previously estimated model. 
b 
Second complex smoothing parameter. Can be real if

ic 
The information criterion used in the model selection procedure. 
loss 
The type of Loss Function used in optimization. There are also available analytical approximations for multistep functions:
Finally, just for fun the absolute and half analogues of multistep estimators
are available: 
h 
Length of forecasting horizon. 
holdout 
If 
cumulative 
If 
interval 
Type of interval to construct. This can be:
The parameter also accepts 
level 
Confidence level. Defines width of prediction interval. 
bounds 
What type of bounds to use in the model estimation. The first letter can be used instead of the whole word. 
silent 
If 
xreg 
The vector (either numeric or time series) or the matrix (or
data.frame) of exogenous variables that should be included in the model. If
matrix included than columns should contain variables and rows  observations.
Note that 
xregDo 
The variable defines what to do with the provided xreg:

initialX 
The vector of initial parameters for exogenous variables.
Ignored if 
... 
Other nondocumented parameters. For example parameter

The function estimates Complex Exponential Smoothing in the state space 2 described in Svetunkov, Kourentzes (2017) with the information potential equal to the approximation error. The estimation of initial states of xt is done using backcast.
For some more information about the model and its implementation, see the
vignette: vignette("ces","smooth")
Object of class "smooth" is returned. It contains the list of the following values:
model
 type of constructed model.
timeElapsed
 time elapsed for the construction of the model.
states
 the matrix of the components of CES. The included
minimum is "level" and "potential". In the case of seasonal model the
seasonal component is also included. In the case of exogenous variables the
estimated coefficients for the exogenous variables are also included.
a
 complex smoothing parameter in the form a0 + ia1
b
 smoothing parameter for the seasonal component. Can either
be real (if seasonality="P"
) or complex (if seasonality="F"
)
in a form b0 + ib1.
persistence
 persistence vector. This is the place, where
smoothing parameters live.
transition
 transition matrix of the model.
measurement
 measurement vector of the model.
initialType
 Type of the initial values used.
initial
 the initial values of the state vector (nonseasonal).
nParam
 table with the number of estimated / provided parameters.
If a previous model was reused, then its initials are reused and the number of
provided parameters will take this into account.
fitted
 the fitted values of CES.
forecast
 the point forecast of CES.
lower
 the lower bound of prediction interval. When
interval="none"
then NA is returned.
upper
 the upper bound of prediction interval. When
interval="none"
then NA is returned.
residuals
 the residuals of the estimated model.
errors
 The matrix of 1 to h steps ahead errors.
s2
 variance of the residuals (taking degrees of
freedom into account).
interval
 type of interval asked by user.
level
 confidence level for interval.
cumulative
 whether the produced forecast was cumulative or not.
y
 The data provided in the call of the function.
holdout
 the holdout part of the original data.
xreg
 provided vector or matrix of exogenous variables. If
xregDo="s"
, then this value will contain only selected exogenous
variables.
exogenous variables were estimated as well.
initialX
 initial values for parameters of exogenous variables.
ICs
 values of information criteria of the model. Includes
AIC, AICc, BIC and BICc.
logLik
 loglikelihood of the function.
lossValue
 Cost function value.
loss
 Type of loss function used in the estimation.
FI
 Fisher Information. Equal to NULL if FI=FALSE
or when FI
is not provided at all.
accuracy
 vector of accuracy measures for the holdout sample. In
case of nonintermittent data includes: MPE, MAPE, SMAPE, MASE, sMAE,
RelMAE, sMSE and Bias coefficient (based on complex numbers). In case of
intermittent data the set of errors will be: sMSE, sPIS, sCE (scaled
cumulative error) and Bias coefficient. This is available only when
holdout=TRUE
.
B
 the vector of all the estimated parameters.
Ivan Svetunkov, ivan@svetunkov.ru
Svetunkov, I., Kourentzes, N. (February 2015). Complex exponential smoothing. Working Paper of Department of Management Science, Lancaster University 2015:1, 131.
Svetunkov I., Kourentzes N. (2017) Complex Exponential Smoothing for Time Series Forecasting. Not yet published.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15  y < rnorm(100,10,3)
ces(y,h=20,holdout=TRUE)
ces(y,h=20,holdout=FALSE)
y < 500  c(1:100)*0.5 + rnorm(100,10,3)
ces(y,h=20,holdout=TRUE,interval="p",bounds="a")
ces(Mcomp::M3[[740]],h=8,holdout=TRUE,seasonality="s",interval="sp",level=0.8)
ces(Mcomp::M3[[1683]],h=18,holdout=TRUE,seasonality="s",interval="sp")
ces(Mcomp::M3[[1683]],h=18,holdout=TRUE,seasonality="p",interval="np")
ces(Mcomp::M3[[1683]],h=18,holdout=TRUE,seasonality="f",interval="p")
x < cbind(c(rep(0,25),1,rep(0,43)),c(rep(0,10),1,rep(0,58)))
ces(Mcomp::M3[[1457]],holdout=TRUE,interval="np",xreg=x,loss="TMSE")

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.