# Obtaining the SarimaX equation from the arima coefficients

I have a SarimaX model with three regressor variables:

ARIMA(1,0,0)(0,1,1)[7]

Coefficients:
ar1       sma1   C1 (for xreg1)   C2 (for xreg2)   C3 (for xreg3)
-0.0260    -0.9216          -0.0354           0.0316           0.9404
s.e.   0.0291     0.0350           0.0016           0.0017           0.0128


I would like to know how to use these coefficients to obtain the actual equation, like:

y[t] = f(ar1, sma1, C1|xreg1[t], C2|xreg2[t], C3|xreg3[t])


I have read the following:

https://www.otexts.org/fpp/8/9 - I'm using the forecast package in R, so I'm quite grateful for Mr. Hyndman's work,

http://people.duke.edu/~rnau/arimreg.htm

and others, and I devised some formulas, but they generated values less acurate than those from the R forecast. Somehow, my error-related terms are probably wrong.

EDIT: This is what I have so far:

$$\ (1-ar1*B)*(1-B^7)*y_t=$$ $$= (1-ar1*B)*(1-B^7)*(C1*xreg1_t + C2*xreg2_t+C3*xreg3_t)+$$ $$+ e_t + sma1*e_{t-7}$$

I would like to know if this formula is correct, could anyone please help? Thank you.

• Do I need to provide more information? Is my question too vague or should I ask it somewhere else? Is it so obvious that I'm not very experienced in statistics? I noticed answers usually come quickly here, so if there's anything wrong in my post, please let me know. – VictorM Oct 9 '14 at 19:10

## 2 Answers

Please have a look at Rob Hyndman's blog entry discussing the difference between ARMAX models and Regressions with ARMA errors. The ARIMAX Model Muddle

My understanding is that the R Forecast package he has developed simultaneously fits a regression along with an ARIMA model for the regression errors. This is not the same as the ARIMAX equation you have worked out above which is more representative of a 'true' ARIMAX model where the AR and differencing terms become intermingled with the exogenous variables.

All this being said, I do believe your equation is correct given the SARIMAX model you have mind. It is just not consistent with R's Forecast package implementation.

The correct formulation is: $$y_t = C1*xreg1 + C2*xreg2 + C3*xreg3 + \eta_t$$ $$(1 - ar1*B)*(1 - B^7)*\eta_t = (1 - sma1*B^7)*e_t$$ And finally we have: $$(1 - ar1*B)*(1 - B^7)*(y_t - C1*xreg1 - C2*xreg2 - C3*xreg3) = (1 - sma1*B^7)*e_t$$ what is (almost) exactly what you get. Notice the sign (minus instead plus) in the right side. Some authors define it with the sign plus, but i prefer using the convention established by Box and Jenkins.

• I don't see the difference between what you presented and what the OP presented. Can you please explain the difference other than your albebraic simplification – IrishStat Sep 7 '17 at 16:50