**Open Review**. I want your feedback to make the book better for you and other readers. To add your annotation, select some text and then click the on the pop-up menu. To see the annotations of others, click the button in the upper right hand corner of the page

## 10.1 ADAMX: Model formulation

As discussed previously, there are fundamentally two types of ETS models:

- Additive error model (which was discussed in Hyndman et al., 2008 in Chapter 9),
- Multiplicative error model.

The inclusion of explanatory variables in ADAMX is determined by the type of the error, so that in case of (1) the measurement equation of the model is: \[\begin{equation} {y}_{t} = a_{0,t} + a_{1,t} x_{1,t} + a_{2,t} x_{2,t} + \dots + a_{n,t} x_{n,t} + \epsilon_t , \tag{10.1} \end{equation}\] where \(a_{0,t}\) is the point value based on all ETS components (for example, \(a_{0,t}=l_{t-1}\) in case of ETS(A,N,N)), \(x_{i,t}\) is the \(j\)-th explanatory variable, \(a_{i,t}\) is the parameter for that component and \(n\) is the number of explanatory variables. We will call the estimated parameters of such model \(\hat{a}_{i,t}\). In the simple case, the transition equation for such model would imply that the parameters \(a_{i,t}\) do not change over time: \[\begin{equation} \begin{aligned} &a_{1,t} = a_{1,t-1} \\ &a_{2,t} = a_{2,t-1} \\ &\vdots \\ &a_{n,t} = a_{n,t-1} \end{aligned} . \tag{10.2} \end{equation}\] Complex mechanisms for the states update can be proposed instead of (10.2), but we do not discuss them at this point. Typically, the initial values of parameters would be estimated at the optimisation stage, either based on likelihood or some other loss function, so the index \(t\) can be dropped, substituting \(a_{1,t}=a_{1}\).

When it comes to the mulitplicative error, the multiplication should be used instead of addition. However, it is easier to formulate the model in logarithms in order to linearise it: \[\begin{equation} \log {y}_{t} = \log a_{0,t} + a_{1,t} x_{1,t} + a_{2,t} x_{2,t} + \dots + a_{n,t} x_{n,t} + \log(1+ \epsilon_t). \tag{10.1} \end{equation}\] Note that if log-log model is required, all that needs to be done, is that \(x_{i,t}\) should be substituted by \(\log x_{j,t}\).

One of the other ways to formulate the ADAMX model is to move the explanatory variables \(x_{i,t}\) in the measurement vector \(\mathbf{w}_{t}\), making it change over time, to move the parameters in the state vector, add diagonal matrix to the existing transition matrix and set values of the persistence vector for the parameters of explanatory variables to zero. The general state space model does not change in that case, but the pure ones can be specifically represented as: \[\begin{equation} \begin{aligned} {y}_{t} = & \mathbf{w}'_t \mathbf{v}_{t-\boldsymbol{l}} + \epsilon_t \\ \mathbf{v}_t = & \mathbf{F} \mathbf{v}_{t-\boldsymbol{l}} + \mathbf{g} \epsilon_t \end{aligned} \tag{10.3} \end{equation}\] and \[\begin{equation} \begin{aligned} {y}_{t} = & \exp\left(\mathbf{w}'_t \log \mathbf{v}_{t-\boldsymbol{l}} + \log(1 + \epsilon_t)\right) \\ \log \mathbf{v}_t = & \mathbf{F} \log \mathbf{v}_{t-\boldsymbol{l}} + \log(\mathbf{1}_k + \mathbf{g} \epsilon_t) \end{aligned}. \tag{10.4} \end{equation}\] So, the only thing that changes in these models is the time varying measurement vector \(\mathbf{w}'_t\) instead of the fixed one. For example, in case of ETSX(A,A,A) we will have: \[\begin{equation} \begin{aligned} \mathbf{F} = \begin{pmatrix} 1 & 1 & 0 & 0 & \dots & 0 \\ 0 & 1 & 0 & 0 & \dots & 0 \\ 0 & 0 & 1 & 0 & \dots & 0 \\ 0 & 0 & 0 & 1 & \dots & 0 \\ \vdots & \vdots & \vdots & \vdots & \ddots & \vdots \\ 0 & 0 & 0 & 0 & \dots & 1 \end{pmatrix}, & \mathbf{w}_t = \begin{pmatrix} 1 \\ 1 \\ 1 \\ x_{1,t} \\ \vdots \\x_{n,t} \end{pmatrix}, & \mathbf{g} = \begin{pmatrix} \alpha \\ \beta \\ \gamma \\ 0 \\ \vdots \\ 0 \end{pmatrix}, \\ & \mathbf{v}_{t} = \begin{pmatrix} l_t \\ b_t \\ s_t \\ a_{1,t} \\ \vdots \\ a_{n,t} \end{pmatrix}, & \boldsymbol{l} = \begin{pmatrix} 1 \\ 1 \\ m \\ 1 \\ \vdots \\ 1 \end{pmatrix} \end{aligned}, \tag{10.5} \end{equation}\] which is equivalent to the combination of equations (10.1) and (10.2), giving us: \[\begin{equation} \begin{aligned} y_{t} = & l_{t-1} + b_{t-1} + s_{t-m} + a_{1,t} x_{1,t} + \dots + a_{n,t} x_{n,t} + \epsilon_t \\ l_t = & l_{t-1} + b_{t-1} + \alpha \epsilon_t \\ b_t = & b_{t-1} + \beta \epsilon_t \\ s_t = & s_{t-m} + \gamma \epsilon_t \\ a_{1,t} = &a_{1,t-1} \\ \vdots &\\ a_{n,t} = &a_{n,t-1} \end{aligned}. \tag{10.6} \end{equation}\] Alternatively, the state, measurement and persistence vectors and transition matrix can be split into two, separatign the ETS and X parts in the state space equations.

When all the smoothing parameters of the ETS part of the model are equal to zero, the ETSX reverts to a deterministic model, directly related to the multiple linear regression. For example, in case of ETSX(A,N,N) with \(\alpha=0\) we get: \[\begin{equation} \begin{aligned} y_{t} = & l_{t-1} + a_{1,t} x_{1,t} + \dots + a_{n,t} x_{n,t} + \epsilon_t \\ l_t = & l_{t-1} \\ a_{1,t} = & a_{1,t-1} \\ \vdots & \\ a_{n,t} = & a_{n,t-1} \end{aligned}, \tag{10.7} \end{equation}\] where \(l_t=a_0\) is the intercept of the model. (10.7) can be rewritten in the conventional way, dropping the transition part of the state space model: \[\begin{equation} y_{t} = a_0 + a_{1} x_{1,t} + \dots + a_{n} x_{n,t} + \epsilon_t . \tag{10.8} \end{equation}\] So, in general ADAMX implies that we are dealing with regression with time varying intercept, where the principles of this variability are defined by the ADAM components and smoothing parameters (e.g. intercept can vary seasonally). Similar properties are obtained with the multiplicative error model, with the main difference that the impact of explanatory variables on the response variable will vary with the changes of the intercept.