0
$\begingroup$

I'm trying to unravel the influences of various exogenous regressors on a time series dataset. I'm getting good results with a sarimax(1,0,0)(0,0,0,0) specification, but I'm confused about the mathematical specification behind this model. With this, I'm also questioning the interpretability of the coefficients. I'm using the statsmodels.tsa.statespace.sarimax.SARIMAX package in python.

Literature gives me two options (see here):

  • The model is specified as a regression model with ARMA errors: regression with ARMA errors

  • The model is specified as an ARMAX model: ARMAX model

Which model am I actually using?

$\endgroup$
  • $\begingroup$ The documentation for that function uses both names, but the formulas describe a regression with SARIMA errors, so if I had to guess I'd go for that one. The best and easiest way to find out is to simulate some data using either specification, fit the model, and see if what comes out is what you expect. $\endgroup$ – Chris Haug Jul 28 '18 at 15:32
1
$\begingroup$

Answer:

If you use Statsmodels' SARIMAX, then you are using the first specification you listed: regression with ARMA (or more generally SARIMA) errors.


Details:

Although it may not be so clear because of the generality of the mathematical notation that is used, this is what is described in the statsmodels documentation (https://www.statsmodels.org/dev/generated/statsmodels.tsa.statespace.sarimax.SARIMAX.html):

"In terms of this model, regression with SARIMA errors can be represented easily as:

$$ \begin{split} y_t & = \beta_t x_t + u_t \\ \phi_p(L) \tilde \phi_p (L^s) \Delta^d \Delta_s^D u_t & = A(t) + \theta_q(L) \tilde \theta_q(L^s) \zeta_t \end{split} $$ "

in your case, we have the following restrictions:

  • $u_t \equiv n_t$ (just a notation difference)
  • $\tilde \phi_p(L^s) = 1$, $\Delta^d = 1$, $\Delta_s^D = 1,$ and $\tilde \theta_q(L^s) = 1$, since you don't have seasonal or differencing components
  • $A(t) = 0$ since you don't have any trend components
  • $\beta_t = \beta$ since the regression coefficients are not time-varying
  • $\phi_p(L) = (1 - \phi_1 L - \dots - \phi_p L^p)$ is the autoregressive lag polynomial
  • $\theta_q(L) = (1 + \theta_1 L + \dots + \theta_q L^q)$ is the moving average lag polynomial
$\endgroup$
2
$\begingroup$

The interpretation of $SARIMAX(p,d,q)(P,D,Q)_m$ is the following:

p: your auto-regressive order.
d: your differencing order.
q: your moving average order.

P: your seasonal auto-regressive order.
D: your seasonal differencing order.
Q: your seasonal moving average order.

m: your seasonality (e.g. 24, 7, 52, 12, etc...)

for your model everything is equal to 0 except for p, which means your process is a $AR(1)$ auto-regressive process:

$y_t = \phi_1 y_{t-1} + \mu + \epsilon_t$

(with $\mu$ the mean of the process and $\epsilon_t$ the error)

$\endgroup$
  • $\begingroup$ So where do the exogenous variables come in? $\endgroup$ – Jeroen Jul 28 '18 at 8:09
  • $\begingroup$ @Jeroen You can consider the $\mu$ to be the coefficient for an exogenous (constant) regressor. From what I can tell from the documentation, this function inconsistently uses the ARIMAX interpretation for the constant (i.e. what is written in this answer), but the regression-with-ARIMA errors interpretation when other exogenous regressors are used, despite the function being called "SARIMAX". $\endgroup$ – Chris Haug Jul 28 '18 at 15:45
  • $\begingroup$ So you say that a sarimax(1,0,0)(0,0,0)0 specification in statsmodels will act like a regression model with arima (AR(1)) errors? And therefore, the yielded coefficients are interpretabel as in a non-autoregressive regression model? $\endgroup$ – Jeroen Jul 28 '18 at 15:54
  • $\begingroup$ If you specify your exogenous regressors using the exog argument (including if you use add a constant) then estimation is regression with (S)ARIMA errors. If you specify the constant as part of the trend (trend=c), then the estimated intercept is the intercept of the ARIMA process. If you are including exogenous regressors, then I recommend that you put any constant term in there, rather than in the trend. $\endgroup$ – cfulton Jul 30 '18 at 3:42
-1
$\begingroup$

Please read this article by PennState College-

https://onlinecourses.science.psu.edu/stat510/node/67/

Arima is nothing but a regression. All external will be added as regressors. -

http://machinelearningstories.blogspot.com/2016/08/time-series-and-fitting-regression-on.html

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.