The hardware and bandwidth for this mirror is donated by dogado GmbH, the Webhosting and Full Service-Cloud Provider. Check out our Wordpress Tutorial.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]dogado.de.
gum()
constructs Generalised Exponential Smoothing -
pure additive state-space model. It is a part of smooth package.
Let’s load the necessary packages:
Generalised Exponential Smoothing is a next step from CES. It is a state-space model in which all the matrices and vectors are estimated. It is very demanding in sample size, but is also insanely flexible.
A simple call by default constructs GUM\((1^1,1^m)\), where \(m\) is frequency of the data. So for our
example with AirPassengers
data, we will have GUM\((1^1,1^{12})\):
## Time elapsed: 0.19 seconds
## Model estimated using gum() function: GUM(1[1],1[12])
## With backcasting initialisation
## Distribution assumed in the model: Normal
## Loss function type: likelihood; Loss function value: 457.0941
## Sample size: 126
## Number of estimated parameters: 7
## Number of degrees of freedom: 119
## Information criteria:
## AIC AICc BIC BICc
## 928.1883 929.1374 948.0422 950.3374
##
## Forecast errors:
## ME: 18.113; MAE: 20.405; RMSE: 21.991
## sCE: 128.758%; Asymmetry: 92.3%; sMAE: 8.058%; sMSE: 0.754%
## MASE: 0.902; RMSSE: 0.753; rMAE: 0.325; rRMSE: 0.294
But some different orders and lags can be specified. For example:
## Time elapsed: 0.12 seconds
## Model estimated using gum() function: GUM(2[1],1[12])
## With backcasting initialisation
## Distribution assumed in the model: Normal
## Loss function type: likelihood; Loss function value: 476.0205
## Sample size: 126
## Number of estimated parameters: 13
## Number of degrees of freedom: 113
## Information criteria:
## AIC AICc BIC BICc
## 978.041 981.291 1014.913 1022.772
##
## Forecast errors:
## ME: 30.555; MAE: 31.936; RMSE: 34.291
## sCE: 217.203%; Asymmetry: 95.3%; sMAE: 12.612%; sMSE: 1.834%
## MASE: 1.412; RMSSE: 1.175; rMAE: 0.509; rRMSE: 0.458
Function auto.gum()
is now implemented in
smooth
, but it works slowly as it needs to check a large
number of models:
## Starting preliminary loop: 1 out of 122 out of 123 out of 124 out of 125 out of 126 out of 127 out of 128 out of 129 out of 1210 out of 1211 out of 1212 out of 12. Done.
## Searching for appropriate lags: —\|/—\|/—\|/We found them!
## Searching for appropriate orders: —\|/—\|/—Orders found.
## Reestimating the model. Done!
## Time elapsed: 4.73 seconds
## Model estimated using gum() function: GUM(1[1],1[12])
## With backcasting initialisation
## Distribution assumed in the model: Normal
## Loss function type: likelihood; Loss function value: 547.3544
## Sample size: 144
## Number of estimated parameters: 7
## Number of degrees of freedom: 137
## Information criteria:
## AIC AICc BIC BICc
## 1108.709 1109.532 1129.498 1131.544
In addition to standard values that other functions accept, GUM accepts predefined values for transition matrix, measurement and persistence vectors. For example, something more common can be passed to the function:
transition <- matrix(c(1,0,0,1,1,0,0,0,1),3,3)
measurement <- c(1,1,1)
gum(AirPassengers, h=18, holdout=TRUE, orders=c(2,1), lags=c(1,12), transition=transition, measurement=measurement)
## Time elapsed: 0.04 seconds
## Model estimated using gum() function: GUM(2[1],1[12])
## With backcasting initialisation
## Distribution assumed in the model: Normal
## Loss function type: likelihood; Loss function value: 487.4811
## Sample size: 126
## Number of estimated parameters: 4
## Number of degrees of freedom: 122
## Information criteria:
## AIC AICc BIC BICc
## 982.9623 983.2928 994.3074 995.1068
##
## Forecast errors:
## ME: 27.883; MAE: 29.743; RMSE: 31.946
## sCE: 198.212%; Asymmetry: 94.4%; sMAE: 11.746%; sMSE: 1.592%
## MASE: 1.315; RMSSE: 1.095; rMAE: 0.474; rRMSE: 0.427
The resulting model will be equivalent to ETS(A,A,A). However due to
different initialisation of optimisers and different method of number of
parameters calculation, gum()
above and
es(y, "AAA", h=h, holdout=TRUE)
will lead to different
models.
These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.
Health stats visible at Monitor.