auto.vets | R Documentation |
Function constructs vector ETS model based on VETS-PIC taxonomy and returns forecast, fitted values, errors and matrix of states along with other useful variables.
auto.vets(data, model = "PPP", lags = c(frequency(data)), loss = c("likelihood", "diagonal", "trace"), ic = c("AICc", "AIC", "BIC", "BICc"), h = 10, holdout = FALSE, occurrence = c("none", "fixed", "logistic"), bounds = c("admissible", "usual", "none"), silent = TRUE, parallel = FALSE, ...) vets(data, model = "PPP", lags = c(frequency(data)), parameters = c("level", "trend", "seasonal", "damped"), initials = c("seasonal"), components = c("none"), loss = c("likelihood", "diagonal", "trace"), ic = c("AICc", "AIC", "BIC", "BICc"), h = 10, holdout = FALSE, occurrence = c("none", "fixed", "logistic"), bounds = c("admissible", "usual", "none"), silent = TRUE, ...)
data |
The matrix with the data, where series are in columns and observations are in rows. |
model |
The type of ETS model. Can consist of 3 or 4 chars: Also |
lags |
The lags of the model. Needed for seasonal models. |
loss |
Type of Loss Function used in optimization.
An example of the latter option is:
|
ic |
The information criterion used in the model selection procedure. |
h |
Length of forecasting horizon. |
holdout |
If |
occurrence |
Defines type of occurrence model used. Can be:
In this case, the ETS model inside the occurrence part will correspond to
|
bounds |
What type of bounds to use in the model estimation. The first
letter can be used instead of the whole word. |
silent |
If |
parallel |
If TRUE, the estimation of ADAM models is done in parallel (used in |
... |
Other non-documented parameters. For example
|
parameters |
The character vector, specifying, which of the parameters
should be common between time series. This includes smoothing parameters for
|
initials |
The character vector, specifying, which of the initial values of
components should be common. This can be |
components |
The character vector, specifying, which of the components
components should be shared between time series. This can be |
Function estimates vector ETS in the form of the Single Source of Error state space model of the following type:
y_{t} = o_{t} (W v_{t-l} + x_t a_{t-1} + ε_{t})
v_{t} = F v_{t-l} + G ε_{t}
a_{t} = F_{X} a_{t-1} + G_{X} ε_{t} / x_{t}
Where y_{t} is the vector of time series on observation t, o_{t} is the vector of Bernoulli distributed random variable (in case of normal data it becomes unit vector for all observations), \mathbf{v}_{t} is the matrix of states and l is the matrix of lags, \mathbf{x}_t is the vector of exogenous variables. \mathbf{W} is the measurement matrix, \mathbf{F} is the transition matrix and \mathbf{G} is the persistence matrix. Finally, ε_{t} is the vector of error terms.
Conventionally we formulate values as:
y_t = (y_{1,t}, y_{2,t}, …, y_{m,t}),
where m is the number of series in the group.
v'_t = (v_{1,t}, v_{2,t}, …, v_{m,t}),
where v_{i,t} is vector of components for i-th time series.
W' = (w_{1}, ... , 0; ... , ... , ...; 0 , ... , w_{m})
is matrix of measurement vectors.
The main idea of the function is in imposing restrictions on parameters / initials / components of the model in order to capture the common dynamics between series.
In case of multiplicative model, instead of the vector y_t we use its logarithms. As a result the multiplicative model is much easier to work with.
For some more information about the model and its implementation, see the
vignette: vignette("vets","legion")
Object of class "legion" is returned. It contains the following list of values:
model
- The name of the fitted model;
timeElapsed
- The time elapsed for the construction of the model;
states
- The matrix of states with components in columns and time in rows;
persistence
- The persistence matrix;
transition
- The transition matrix;
measurement
- The measurement matrix;
phi
- The damping parameter value;
B
- The vector of all the estimated coefficients;
lagsAll
- The vector of the internal lags used in the model;
nParam
- The number of estimated parameters;
occurrence
- The occurrence model estimated with VETS;
data
- The matrix with the original data;
fitted
- The matrix of the fitted values;
holdout
- The matrix with the holdout values (if holdout=TRUE
in
the estimation);
residuals
- The matrix of the residuals of the model;
Sigma
- The covariance matrix of the errors (estimated with the correction
for the number of degrees of freedom);
forecast
- The matrix of point forecasts;
ICs
- The values of the information criteria;
logLik
- The log-likelihood function;
lossValue
- The value of the loss function;
loss
- The type of the used loss function;
lossFunction
- The loss function if the custom was used in the process;
accuracy
- the values of the error measures. Currently not available.
FI
- Fisher information if user asked for it using FI=TRUE
.
Ivan Svetunkov, ivan@svetunkov.ru
de Silva A., Hyndman R.J. and Snyder, R.D. (2010). The vector innovations structural time series framework: a simple approach to multivariate forecasting. Statistical Modelling, 10 (4), pp.353-374
Hyndman, R.J., Koehler, A.B., Ord, J.K., and Snyder, R.D. (2008) Forecasting with exponential smoothing: the state space approach, Springer-Verlag.
Lütkepohl, H. (2005). New Introduction to Multiple Time Series Analysis. New introduction to Multiple Time Series Analysis. Berlin, Heidelberg: Springer Berlin Heidelberg. doi: 10.1007/978-3-540-27752-1
Chen H., Svetunkov I., Boylan J. (2021). A New Taxonomy for Vector Exponential Smoothing and Its Application to Seasonal Time Series.
ves, es, adam
Y <- ts(cbind(rnorm(100,100,10),rnorm(100,75,8)),frequency=12) # The simplest model applied to the data with the default values vets(Y,model="ANN",h=10,holdout=TRUE) # Multiplicative damped trend model with common parameters # and initial seasonal indices vets(Y,model="MMdM",h=10,holdout=TRUE,parameters=c("l","t","s","d"), initials="seasonal") # Automatic selection of ETS components vets(Y, model="PPP", h=10, holdout=TRUE, initials="seasonal")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.