auto.vets {legion} | R Documentation |
Vector ETS-PIC model
Description
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.
Usage
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,
...)
Arguments
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 |
Details
Function estimates vector ETS in the form of the Single Source of Error state space model of the following type:
Where is the vector of time series on observation
,
is the vector of Bernoulli distributed random variable (in case of normal data it
becomes unit vector for all observations),
is the matrix of
states and
is the matrix of lags,
is the vector of
exogenous variables.
is the measurement matrix,
is the transition matrix and
is the persistence matrix.
Finally,
is the vector of error terms.
Conventionally we formulate values as:
where is the number of series in the group.
where is vector of components for i-th time series.
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")
Value
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 (ifholdout=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 usingFI=TRUE
.
Author(s)
Ivan Svetunkov, ivan@svetunkov.ru
References
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.
See Also
Examples
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")