# gum() - Generalised Univariate Model

#### Ivan Svetunkov

#### 2026-06-20

`gum()` constructs Generalised Exponential Smoothing - pure additive state-space model. It is a part of smooth package.

Let’s load the necessary packages:

    require(smooth)

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})\):

    gum(AirPassengers, h=18, holdout=TRUE)

    ## Time elapsed: 0.04 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: 490.6335
    ## Sample size: 126
    ## Number of estimated parameters: 7
    ## Number of degrees of freedom: 119
    ## Information criteria:
    ##       AIC      AICc       BIC      BICc
    ##  995.2670  996.2161 1015.1210 1017.4162
    ##
    ## Forecast errors:
    ## ME: -11.759; MAE: 25.524; RMSE: 32.079
    ## sCE: -83.591%; Asymmetry: -51.5%; sMAE: 10.08%; sMSE: 1.605%
    ## MASE: 1.128; RMSSE: 1.099; rMAE: 0.407; rRMSE: 0.428

But some different orders and lags can be specified. For example:

    gum(AirPassengers, h=18, holdout=TRUE, orders=c(2,1), lags=c(1,12))

    ## Time elapsed: 0.07 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: 505.3772
    ## Sample size: 126
    ## Number of estimated parameters: 13
    ## Number of degrees of freedom: 113
    ## Information criteria:
    ##      AIC     AICc      BIC     BICc
    ## 1036.755 1040.005 1073.626 1081.485
    ##
    ## Forecast errors:
    ## ME: 31.1; MAE: 40.431; RMSE: 51.855
    ## sCE: 221.075%; Asymmetry: 72%; sMAE: 15.967%; sMSE: 4.194%
    ## MASE: 1.787; RMSSE: 1.777; rMAE: 0.644; rRMSE: 0.693

Function `auto.gum()` is now implemented in `smooth`, but it works slowly as it needs to check a large number of models:

    auto.gum(AirPassengers, silent=FALSE)

    ## 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: 2.62 seconds
    ## Model estimated using gum() function: GUM(2[1],3[12])
    ## With backcasting initialisation
    ## Distribution assumed in the model: Normal
    ## Loss function type: likelihood; Loss function value: 552.4047
    ## Sample size: 144
    ## Number of estimated parameters: 31
    ## Number of degrees of freedom: 113
    ## Information criteria:
    ##      AIC     AICc      BIC     BICc
    ## 1166.809 1184.524 1258.874 1302.892

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.03 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: 486.4046
    ## Sample size: 126
    ## Number of estimated parameters: 4
    ## Number of degrees of freedom: 122
    ## Information criteria:
    ##      AIC     AICc      BIC     BICc
    ## 980.8091 981.1397 992.1543 992.9537
    ##
    ## Forecast errors:
    ## ME: 32.558; MAE: 33.954; RMSE: 36.348
    ## sCE: 231.44%; Asymmetry: 95.5%; sMAE: 13.409%; sMSE: 2.061%
    ## MASE: 1.501; RMSSE: 1.245; rMAE: 0.541; rRMSE: 0.485

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.