Movatterモバイル変換


[0]ホーム

URL:


vets() - Vector ETS

Ivan Svetunkov

2025-02-03

This vignette coversvets() function, which is a part oflegion package. In this vignette we will usedata fromMcomp package, so it is advised to installit.

Let’s load the necessary packages:

require(legion)

We will use to time series from the M3 united in a vector:

Y<-ts(cbind(1000+0.5*c(1:100)+rnorm(100,0,10),cbind(1000+1.5*c(1:100)+rnorm(100,0,10))),frequency=12);

vets() function implements Vector ETS fromSvetunkov, Chen, and Boylan (2021). This is amodel that introduces two dimensional taxonomy: the original ETS onefromHyndman et al. (2008) and theextended for the restrictions on Parameters, Initials and Components(PIC) of the model. By default the function makes smoothing anddampening parameters common between different products and forces acommon seasonal initials, resulting in ETS-PIC(LTSD,S,N):

vetsModel<-vets(Y,"MMdM",h=18,holdout=TRUE,silent=FALSE)

The output tells us how much time the estimation took, what model wasestimated, the loss function type used and its value, generalinformation about sample size, number of parameters, number of variatesand degrees of freedom and finally the information criteria for themodel. Using the latter, it is possible to select the most appropriateETS model and PIC restrictions. However, this process might take a lotof time, so there is alsoauto.vets() function that does astepwise selection of components and restrictions:

vetsModel<-auto.vets(Y,"PPP",h=18,holdout=TRUE,silent=FALSE)
## Selecting the best unrestricted model... ## Initial model is VETS(MMN), AICc is: 1256.223## Testing initials restrictions... 100 %## Initials restrictions model is (t), AICc is: 1252.318## Testing parameters restrictions... 14 %29 %43 %57 %71 %86 %100 %## Parameters restrictions model is (t), AICc is: 1252.185## Testing components restrictions... 100 %## Components restrictions model is (none), AICc is: 1252.185

model="PPP" tells function to select the best betweenpure additive and pure multiplicative models. This parameter alsoacceptsmodel="XXX", selecting between pure additive andmodel="YYY", selecting between pure multiplicative models.Note that if you want to impose restrictions on the initials andcomponents, then pure multiplicative models typically make more sense,aligning with the idea of percentage change of value, rather than thechange in the units of data (as in additive models).

Some methods to consider when working withvets():

oldpar<-par(mfcol=c(2,1))plot(vetsModel,1)plot(vetsModel,7)par(oldpar)

modelType(vetsModel)
## [1] "MMN"
modelType(vetsModel,pic=TRUE)
## [1] "T,T,N"
actuals(vetsModel)fitted(vetsModel)residuals(vetsModel)

The forecasts can be produced usingforecast()method:

vetsForecast<-forecast(vetsModel,h=18,interval="prediction")oldpar<-par(mfcol=c(2,1))plot(vetsForecast)par(oldpar)

The detailed explanation of the underlying model and possiblerestrictions are provided inSvetunkov, Chen, andBoylan (2021).

References

Hyndman, Rob J, Anne B Koehler, J Keith Ord, and Ralph D Snyder. 2008.Forecasting with ExponentialSmoothing. Springer Berlin Heidelberg.
Svetunkov, Ivan., H. Chen, and John E. Boylan. 2021.A New Taxonomy for Vector Exponential Smoothing and ItsApplication to Seasonal Time Series.” Department ofManagement Science, Lancaster University.

[8]ページ先頭

©2009-2025 Movatter.jp