Title: | Forecasting Using Multivariate Models |
---|---|
Description: | Functions implementing multivariate state space models for purposes of time series analysis and forecasting. The focus of the package is on multivariate models, such as Vector Exponential Smoothing, Vector ETS (Error-Trend-Seasonal model) etc. It currently includes Vector Exponential Smoothing (VES, de Silva et al., 2010, <doi:10.1177/1471082X0901000401>), Vector ETS and simulation function for VES. |
Authors: | Ivan Svetunkov [aut, cre] (Lecturer at Centre for Marketing Analytics and Forecasting, Lancaster University, UK), Kandrika Fadhlan Pritularga [aut] (PhD Student at Centre for Marketing Analytics and Forecasting, Lancaster University, UK) |
Maintainer: | Ivan Svetunkov <[email protected]> |
License: | GPL (>= 2) |
Version: | 0.1.2 |
Built: | 2024-11-28 06:52:26 UTC |
Source: | CRAN |
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, ...)
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:
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")
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, [email protected]
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.
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")
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")
Functions to check if an object is of the specified class
is.legion(x) is.oves(x) is.legion.sim(x)
is.legion(x) is.oves(x) is.legion.sim(x)
x |
The object to check. |
The list of methods includes:
is.legion()
tests if the object was produced by a vector model (e.g.
ves);
is.oves()
tests if the object was produced by oves
function;
is.legion.sim()
tests if the object was produced by the functions
sim.ves;
TRUE
if this is the specified class and FALSE
otherwise.
Ivan Svetunkov, [email protected]
ourModel <- ves(cbind(rnorm(100,100,10),rnorm(100,100,10))) is.legion(ourModel)
ourModel <- ves(cbind(rnorm(100,100,10),rnorm(100,100,10))) is.legion(ourModel)
Package contains functions for multivariate time series forecasting
Package: | legion |
Type: | Package |
Date: | 2021-02-18 - Inf |
License: | GPL-2 |
The following functions are included in the package:
ves - Vector Exponential Smoothing.
vets - Vector ETS-PIC model.
oves - Multivariate occurrence ETS model.
Ivan Svetunkov
Kandrika Pritularga
Maintainer: Ivan Svetunkov <[email protected]>
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.
## Not run: y <- cbind(rnorm(100,10,3),rnorm(100,10,3)) ves(y,h=20,holdout=TRUE) ## End(Not run)
## Not run: y <- cbind(rnorm(100,10,3),rnorm(100,10,3)) ves(y,h=20,holdout=TRUE) ## End(Not run)
Function calculates the probability for the occurrence part of vector state space model. This is needed in order to forecast intermittent demand using other functions.
oves(data, occurrence = c("logistic", "none", "fixed"), ic = c("AICc", "AIC", "BIC", "BICc"), h = 10, holdout = FALSE, probability = c("dependent", "independent"), model = "ANN", persistence = NULL, transition = NULL, phi = NULL, initial = NULL, initialSeason = NULL, xreg = NULL, ...)
oves(data, occurrence = c("logistic", "none", "fixed"), ic = c("AICc", "AIC", "BIC", "BICc"), h = 10, holdout = FALSE, probability = c("dependent", "independent"), model = "ANN", persistence = NULL, transition = NULL, phi = NULL, initial = NULL, initialSeason = NULL, xreg = NULL, ...)
data |
The matrix with data, where series are in columns and observations are in rows. |
occurrence |
Type of method used in probability estimation. Can be
|
ic |
Information criteria to use in case of model selection. |
h |
Forecast horizon. |
holdout |
If |
probability |
Type of probability assumed in the model. If
|
model |
Type of ETS model used for the estimation. Normally this should
be either |
persistence |
Persistence matrix type. If |
transition |
Transition matrix type. If |
phi |
Damping parameter type. If |
initial |
Initial vector type. If |
initialSeason |
Type of the initial vector of seasonal components.
If |
xreg |
Vector of matrix of exogenous variables, explaining some parts of occurrence variable (probability). |
... |
Other parameters. This is not needed for now. |
The function estimates probability of demand occurrence, using one of the VES state-space models.
The object of class "oves" is returned. It contains following list of values:
model
- the type of the estimated ETS model;
fitted
- fitted values of the constructed model;
forecast
- forecast for h
observations ahead;
states
- values of states (currently level only);
variance
- conditional variance of the forecast;
logLik
- likelihood value for the model
nParam
- number of parameters used in the model;
residuals
- residuals of the model;
data
- actual values of probabilities (zeros and ones).
persistence
- the vector of smoothing parameters;
initial
- initial values of the state vector;
initialSeason
- the matrix of initials seasonal states;
occurrence
- type of occurrence model used;
probability
- type of probability used;
issModel
- intermittent state-space model used for
calculations. Useful only in the case of occurrence="l"
and
probability="d"
.
Ivan Svetunkov, [email protected]
Y <- cbind(c(rpois(25,0.1),rpois(25,0.5),rpois(25,1),rpois(25,5)), c(rpois(25,0.1),rpois(25,0.5),rpois(25,1),rpois(25,5))) oves(Y, occurrence="l") oves(Y, occurrence="l", probability="i")
Y <- cbind(c(rpois(25,0.1),rpois(25,0.5),rpois(25,1),rpois(25,5)), c(rpois(25,0.1),rpois(25,0.5),rpois(25,1),rpois(25,5))) oves(Y, occurrence="l") oves(Y, occurrence="l", probability="i")
The function produces diagnostics plots for a legion
model
## S3 method for class 'legion' plot(x, which = c(1, 2, 4, 6), level = 0.95, legend = FALSE, ask = prod(par("mfcol")) < length(which) * nvariate(x) && dev.interactive(), lowess = TRUE, ...)
## S3 method for class 'legion' plot(x, which = c(1, 2, 4, 6), level = 0.95, legend = FALSE, ask = prod(par("mfcol")) < length(which) * nvariate(x) && dev.interactive(), lowess = TRUE, ...)
x |
Estimated legion model. |
which |
Which of the plots to produce. The possible options (see details for explanations):
|
level |
Confidence level. Defines width of confidence interval. Used in plots (2), (3), (7), (8), (9), (10) and (11). |
legend |
If |
ask |
Logical; if |
lowess |
Logical; if |
... |
The parameters passed to the plot functions. Recommended to use with separate plots. |
The list of produced plots includes:
Actuals vs Fitted values. Allows analysing, whether there are any issues in the fit. Does the variability of actuals increase with the increase of fitted values? Is the relation well captured? They grey line on the plot corresponds to the perfect fit of the model.
Standardised residuals vs Fitted. Plots the points and the confidence bounds
(red lines) for the specified confidence level
. Useful for the analysis of outliers;
Studentised residuals vs Fitted. This is similar to the previous plot, but with the residuals divided by the scales with the leave-one-out approach. Should be more sensitive to outliers;
Absolute residuals vs Fitted. Useful for the analysis of heteroscedasticity;
Squared residuals vs Fitted - similar to (3), but with squared values;
Q-Q plot with the specified distribution. Can be used in order to see if the
residuals follow the assumed distribution. The type of distribution depends on the one used
in the estimation (see distribution
parameter in alm);
ACF of the residuals. Are the residuals autocorrelated? See acf for details;
Fitted over time. Plots actuals (black line), fitted values (purple line), point forecast (blue line) and prediction interval (grey lines). Can be used in order to make sure that the model did not miss any important events over time;
Standardised residuals vs Time. Useful if you want to see, if there is autocorrelation or if there is heteroscedasticity in time. This also shows, when the outliers happen;
Studentised residuals vs Time. Similar to previous, but with studentised residuals;
PACF of the residuals. No, really, are they autocorrelated? See pacf function from stats package for details;
Plot of the states of the model. It is not recommended to produce this plot together with the others, because there might be several states, which would cause the creation of a different canvas. In case of "msdecompose", this will produce the decomposition of the series into states on a different canvas.
Which of the plots to produce, is specified via the which
parameter.
Currently only which=c(1,4:7)
are supported.
The function produces the number of plots, specified in the parameter which
.
Ivan Svetunkov, [email protected]
ourModel <- es(c(rnorm(50,100,10),rnorm(50,120,10)), "ANN", h=10) plot(ourModel, c(1:11)) plot(ourModel, 12)
ourModel <- es(c(rnorm(50,100,10),rnorm(50,120,10)), "ANN", h=10) plot(ourModel, c(1:11)) plot(ourModel, 12)
Function generates data using VES model as a data generating process.
sim.ves(model = "ANN", obs = 10, nsim = 1, nvariate = 2, frequency = 1, persistence = NULL, phi = 1, transition = NULL, initial = NULL, initialSeason = NULL, seasonal = c("individual, common"), weights = rep(1/nvariate, nvariate), bounds = c("usual", "admissible", "restricted"), randomizer = c("rnorm", "rt", "rlaplace", "rs"), ...)
sim.ves(model = "ANN", obs = 10, nsim = 1, nvariate = 2, frequency = 1, persistence = NULL, phi = 1, transition = NULL, initial = NULL, initialSeason = NULL, seasonal = c("individual, common"), weights = rep(1/nvariate, nvariate), bounds = c("usual", "admissible", "restricted"), randomizer = c("rnorm", "rt", "rlaplace", "rs"), ...)
model |
Type of ETS model. This can consist of 3 or 4 chars:
|
obs |
Number of observations in each generated time series. |
nsim |
Number of series to generate (number of simulations to do). |
nvariate |
Number of series in each generated group of series. |
frequency |
Frequency of generated data. In cases of seasonal models must be greater than 1. |
persistence |
Matrix of smoothing parameters for all the components of all the generated time series. |
phi |
Value of damping parameter. If trend is not chosen in the model, the parameter is ignored. If vector is provided, then several parameters are used for different series. |
transition |
Transition matrix. This should have the size appropriate
to the selected model and |
initial |
Vector of initial states of level and trend. The minimum
length is one (in case of ETS(A,N,N), the initial is used for all the
series), the maximum length is 2 x nvariate. If |
initialSeason |
Vector or matrix of initial states for seasonal
coefficients. Should have number of rows equal to |
seasonal |
The type of seasonal component across the series. Can be
|
weights |
The weights for the errors between the series with the common
seasonal component. Ignored if |
bounds |
Type of bounds to use for persistence vector if values are
generated. |
randomizer |
Type of random number generator function used for error
term. Defaults are: |
... |
Additional parameters passed to the chosen randomizer. All the
parameters should be passed in the order they are used in chosen randomizer.
For example, passing just |
List of the following values is returned:
model
- Name of ETS model.
data
- The matrix (or an array if nsim>1
) of the
generated series.
states
- The matrix (or array if nsim>1
) of states.
States are in columns, time is in rows.
persistence
- The matrix (or array if nsim>1
) of
smoothing parameters used in the simulation.
transition
- The transition matrix (or array if nsim>1
).
initial
- Vector (or matrix) of initial values.
initialSeason
- Vector (or matrix) of initial seasonal
coefficients.
residuals
- Error terms used in the simulation. Either matrix
or array, depending on nsim
.
Ivan Svetunkov, [email protected]
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.
# Create 40 observations of quarterly data using AAA model with errors # from normal distribution VESAAA <- sim.ves(model="AAA",frequency=4,obs=40,nvariate=3, randomizer="rnorm",mean=0,sd=100) # You can also use mvrnorm function from MASS package as randomizer, # but you need to provide mu and Sigma explicitly ## Not run: VESANN <- sim.ves(model="ANN",frequency=4,obs=40,nvariate=2, randomizer="mvrnorm",mu=c(100,50),sigma=matrix(c(40,20,20,30),2,2)) ## End(Not run) # When generating the data with multiplicative model a more diligent definitiion # of parameters is needed. Here's an example with MMM model: VESMMM <- sim.ves("AAA", obs=120, nvariate=2, frequency=12, initial=c(10,0), initialSeason=runif(12,-1,1), persistence=c(0.06,0.05,0.2), mean=0, sd=0.03) VESMMM$data <- exp(VESMMM$data) # Note that smoothing parameters should be low and the standard diviation should # definitely be less than 0.1. Otherwise you might face the explosions.
# Create 40 observations of quarterly data using AAA model with errors # from normal distribution VESAAA <- sim.ves(model="AAA",frequency=4,obs=40,nvariate=3, randomizer="rnorm",mean=0,sd=100) # You can also use mvrnorm function from MASS package as randomizer, # but you need to provide mu and Sigma explicitly ## Not run: VESANN <- sim.ves(model="ANN",frequency=4,obs=40,nvariate=2, randomizer="mvrnorm",mu=c(100,50),sigma=matrix(c(40,20,20,30),2,2)) ## End(Not run) # When generating the data with multiplicative model a more diligent definitiion # of parameters is needed. Here's an example with MMM model: VESMMM <- sim.ves("AAA", obs=120, nvariate=2, frequency=12, initial=c(10,0), initialSeason=runif(12,-1,1), persistence=c(0.06,0.05,0.2), mean=0, sd=0.03) VESMMM$data <- exp(VESMMM$data) # Note that smoothing parameters should be low and the standard diviation should # definitely be less than 0.1. Otherwise you might face the explosions.
Function constructs vector ETS model and returns forecast, fitted values, errors and matrix of states along with other useful variables.
ves(data, model = "PPP", lags = c(frequency(data)), persistence = c("common", "individual", "dependent"), transition = c("common", "individual", "dependent"), phi = c("common", "individual"), initial = c("individual", "common"), initialSeason = c("common", "individual"), 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, ...)
ves(data, model = "PPP", lags = c(frequency(data)), persistence = c("common", "individual", "dependent"), transition = c("common", "individual", "dependent"), phi = c("common", "individual"), initial = c("individual", "common"), initialSeason = c("common", "individual"), 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. |
persistence |
Persistence matrix
You can also use the first letter instead of writing the full word. |
transition |
Transition matrix
You can also use the first letter instead of writing the full word. |
phi |
In cases of damped trend this parameter defines whether the |
initial |
Can be either character or a vector / matrix of initial states.
If it is character, then it can be |
initialSeason |
Can be either character or a vector / matrix of initial
states. Treated the same way as |
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 |
... |
Other non-documented parameters. For example
|
Function estimates vector ETS in a 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 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.
For the details on the additive model see Hyndman et al. (2008), chapter 17.
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("ves","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;
lagsAll
- The vector of the internal lags used in the model;
B
- The vector of all the estimated coefficients;
initial
- The initial values of the non-seasonal components;
initialSeason
- The initial values of the seasonal components;
nParam
- The number of estimated parameters;
occurrence
- The occurrence part of the model estimated with VES;
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, [email protected]
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.
Y <- ts(cbind(rnorm(100,100,10),rnorm(100,75,8)),frequency=12) # The simplest model applied to the data with the default values ves(Y,model="ANN",h=10,holdout=TRUE) # Damped trend model with the dependent persistence ves(Y,model="AAdN",persistence="d",h=10,holdout=TRUE) # Multiplicative damped trend model with individual phi ves(Y,model="MMdM",persistence="i",h=10,holdout=TRUE,initialSeason="c") # Automatic selection between pure models ves(Y,model="PPP",persistence="i",h=10,holdout=TRUE,initialSeason="c") # Intermittent demand vector model Y <- cbind(c(rpois(25,0.1),rpois(25,0.5),rpois(25,1),rpois(25,5)), c(rpois(25,0.1),rpois(25,0.5),rpois(25,1),rpois(25,5))) ves(Y,model="MNN",h=10,holdout=TRUE,occurrence="l")
Y <- ts(cbind(rnorm(100,100,10),rnorm(100,75,8)),frequency=12) # The simplest model applied to the data with the default values ves(Y,model="ANN",h=10,holdout=TRUE) # Damped trend model with the dependent persistence ves(Y,model="AAdN",persistence="d",h=10,holdout=TRUE) # Multiplicative damped trend model with individual phi ves(Y,model="MMdM",persistence="i",h=10,holdout=TRUE,initialSeason="c") # Automatic selection between pure models ves(Y,model="PPP",persistence="i",h=10,holdout=TRUE,initialSeason="c") # Intermittent demand vector model Y <- cbind(c(rpois(25,0.1),rpois(25,0.5),rpois(25,1),rpois(25,5)), c(rpois(25,0.1),rpois(25,0.5),rpois(25,1),rpois(25,5))) ves(Y,model="MNN",h=10,holdout=TRUE,occurrence="l")