# Seasonal Autoregressive Integrated Moving Average exogeneous (SARIMAX) Model

In principle, an SARIMAX model is a linear regression model that uses a SARIMA-type process (i.e. ) This model is useful in cases we suspect that residuals may exhibit a seasonal trend or pattern.

$$w_t = y_t - \beta_1 x_{1,t}-\beta_2 x_{2,t} - \cdots - \beta_b x_{b,t}$$ $$(1-\sum_{i=1}^p {\phi_i L^i})(1-\sum_{j=1}^P {\Phi_j L^{j \times s}})(1-L)^d (1-L^s)^D w_t -\eta = (1+\sum_{i=1}^q {\theta_i L^i})(1+\sum_{j=1}^Q {\Theta_j L^{j \times s}}) a_t$$ $$a_t \sim \textrm{i.i.d} \sim \Phi(0,\sigma^2)$$

Where:

• $L$ is the lag (aka back-shift) operator.
• $y_t$ is the observed output at time t.
• $x_{k,t}$ is the k-th exogenous input variable at time t.
• $\beta_k$ is the coefficient value for the k-th exogenous (explanatory) input variable.
• $b$ is the number of exogenous input variables.
• $w_t$ is the auto-correlated regression residuals.
• $p$ is the order of the non-seasonal AR component.
• $P$ is the order of the seasonal AR component.
• $q$ is the order of the non-seasonal MA component.
• $Q$ is the order of the seasonal MA component.
• $s$ is the seasonal length.
• $D$ is the seasonal integration order of the time series.
• $\eta$ is a constant in the SARIMA model
• $a_t$ is the innovation, shock or error term at time t.
• $\{a_t\}$ time series observations are independent and identically distributed (i.e. i.i.d) and follow a Gaussian distribution (i.e. $\Phi(0,\sigma^2)$)

Re-ordering the terms in the equation above and assuming the differenced (both seasonal and non-seasonal) results in a stationary time series ($z_t$) yields the following:
$$z_t = (1-L)^d(1-L^s)^D w_t$$
$$\mu = E[z_t] = \frac{\eta}{(1-\phi_1-\phi_2-\cdots-\phi_p)(1-\Phi_1-\Phi_2-\cdots-\Phi_P)}$$ $$(1-\sum_{i=1}^p {\phi_i L^i})(1-\sum_{j=1}^P {\Phi_j L^{j \times s}})(1-L)^d (1-L^s)^D (w_t -\mu) = (1+\sum_{i=1}^q {\theta_i L^i})(1+\sum_{j=1}^Q {\Theta_j L^{j \times s}}) a_t$$

## notes

1. The variance of the shocks is constant or time-invariant.
2. The order of an AR component process is solely determined by the order of the last lagged auto-regressive variable with a non-zero coefficient (i.e. $w_{t-p}$).
3. The order of an MA component process is solely determined by the order of the last moving average variable with a non-zero coefficient (i.e. $a_{t-q}$).
4. In principle, you can have fewer parameters than the orders of the model.