# Using an ARIMA model to create an adjusted (normalised) time series

I am examining monthly road accident counts over the last 25 years. I have created an ARIMA model in R using rainfall and temperature deviations from the long-term monthly average as exogenous variables, to see how these weather effects impact on the number of road collisions.

Now, I am looking to utilise the model to investigate what collisions would have looked like in those 25 years if the weather was normal, i.e. zero deviation in January from the long-term January average, zero deviation in February from the long-term February average, etc. Basically, how do I remove the impact of my weather variables from the collision time series?

My thinking is that I create an ARIMA forecast in which I replace the 'real' exogenous weather variables with 'normalised' weather variables (zero deviation from long-term averages, so essentially a time series of all zeros).

Is this approach sound / logical?

You have fit a regression with ARMA errors if you were using R function arima or forecast::Arima and including exogenous regressors (see Rob J. Hyndman's blog post "The ARIMAX model muddle" for details). You got something like
\begin{aligned} y_t &= \beta' X_t + u_t \\ u_t &= \varphi_1 u_{t-1} + \dotsc + \varphi_p u_{t-p} + \varepsilon_t + \theta_1 \varepsilon_{t-1} + \dotsc + \theta_q \varepsilon_{t-q} \end{aligned}
with weather variables constituting $X_t$.
Assuming (1) the model is well specified and (2) there is a causal relationship between road accidents and weather variables, you may take the fitted values $\hat y_t$ and subtract the estimated coefficient vector $\hat\beta$ times the weather variables $X_t$. That should give you a counterfactual as if $X_t$ was zero all the time (weather always at long-term average).
• @ Richard Hardy limitations understood. I used the Arima function, from the forecast package. If a transformation was applied to the series prior to modelling e.g. log, is it advisable to apply this method before taking the estimates out of the 'log world'? – ewenme Jul 25 '16 at 12:49
• If you find that ARIMA fits $\log(y)$ better than $y$, it would be logical to do the adjustment for $\log(y)$ and then exponentiate the adjusted values. – Richard Hardy Jul 25 '16 at 13:11