# My transfer function has non-stationary inputs, but a stationary output. Should I difference both the inputs and outputs during structure estimation?

I have a system of two inputs and one output that I'd like to model using the following Box-Jenkins transfer function ("dynamic regression") structure:

$$y_t=\frac {\beta_1(B)}{\nu_1(B)}\omega_1Bx_{1,t}+\frac{\beta_2(B)}{\nu_2(B)}\omega_2Bx_{2,t}+\frac {\theta(B)}{\phi(B)}z_t+c$$

(using notation to conform with this Rob Hyndman post: http://robjhyndman.com/hyndsight/arimax/ where $B$ is the backshift operator, numerator polynomials like $\theta(B)$ stand for $(1+\theta_1 B+\theta_2 B^2+\cdots +\theta_nB^n)$, and denominator polynomials like $\phi(B)$ stand for $(1-\phi_1 B-\phi_2 B^2-\cdots -\phi_nB^n)$ )

My problem is this:

My $y$ is a stationary variable. However, both of my $x$s are not. (or to be precise, unlike my $y$, my $x$s are only very weakly stationary and have significant autocorrelation.) In discussions of pre-whitening that I've read, it's recommended to pre-whiten the $x$ variable (and then apply that same filter to $y$) before looking at the correlation structure. However, those examples only cover cases with only one $x$. On the other hand, this section of Hyndman's book: https://www.otexts.org/fpp/9/1 recommends repeatedly applying a difference to $y$ and all $x$s until all of the variables are stationary.

My question is:

Should I difference $y$ and all $x$s once before looking at the cross-correlations, even though this will make $y$ over-differenced? Or, should I pre-whiten $x_1$ and $x_2$, then apply each filter to the other variables, and then look at the cross-correlations? Or is another method recommended?

• If your input data requires differencing then differencing should occur BEFORE prewhitening. In SAS it is very easy to do check this link Sep 29, 2014 at 1:21
• Yes... the question is, how do I handle the fact that the x variables need to be differenced, but that differencing the y variable would result in it being over-differenced? (Also, I'm using R and don't have access to SAS.) Thanks. Sep 30, 2014 at 17:52
• unfortunately that is the drawback of using ARIMA model. There is a separate class of models called Unobserved components models which doesn't require stationary assumptions so its free from differencing. Also, R has very poor capabilities in terms of dynamic regression vs. other commercially available software packages. Sep 30, 2014 at 18:19
• Looking at this explanation of unobserved components models: support.sas.com/documentation/cdl/en/etsug/60372/HTML/default/… it seems that they're quite similar to ARIMAX models, but with the optional addition of seasonal terms. Am I missing something? My data don't have seasonality issues, so I think I'll stick with the transfer function framework for now. Oct 6, 2014 at 21:43
• unobserved components model (UCM) doesn't require your data to be stationary which is a big plus also they model trend and seasonality explicitly. You can ignore seasonality if your danot have it. However, UCM does not have the flexibility in terms a parsimoniously specifying regressor variables vs. transfer function. I would recommend do the analysis with both UCM and ARIMAX and pick a model that gives best predictive power. Oct 6, 2014 at 22:00

2. Choosing a filter for $y$ and all $x$s such that the regression errors have as little serial correlation as possible.
3. Choosing additional filters for each X so as to maximize the regression $R^2$.