# How to decide on parameters for transfer function in intervention analysis using ARIMA?

I'm very new to Time-Series Analysis and ARIMA so, although I've read a ton of stuff trying to figure it out, I'm sorry if this has already been answered elsewhere.

I'm doing an analysis that's very similar to one done in Time Series Analysis: With Applications in R, so I'll use the example from chapter 11 there. I want to do intervention analysis to understand the impact of 9/11 on monthly passenger airline miles in the U.S., so September 2001 can be thought of as the time of intervention. The effect of the intervention on the mean of the outcome can be thought of as a step function. The pre-intervention data is autocorrelated and seasonal, so an ARIMA model should be used. There are also three additive outliers in December 1996, January 1997, and December 2002. The data can be obtained via data(airmiles) after loading the TSA package.

In the example given in that textbook, the ARIMA model is manually specified (although I understand it can also be found using the command auto.arima() in the forecast package) as ARIMA(0,1,1)x(0,1,1)12. Then, in order to estimate the intervention model for log-transformed air miles, the arimax() command from the TSA package is used. Here is the code from the text:

air.m1=arimax(log(airmiles),order=c(0,1,1),
seasonal=list(order=c(0,1,1),period=12),
xtransf=data.frame(I911=1*(seq(airmiles)==69),
I911=1*(seq(airmiles)==69)),transfer=list(c(0,0),c(1,0)),
xreg=data.frame(Dec96=1*(seq(airmiles)==12),
Jan97=1*(seq(airmiles)==13),Dec02=1*(seq(airmiles)==84)),
method='ML')

I see that the order=c(0,1,1) comes from the pdq specified by the ARIMA model and the seasonal=list(order=c(0,1,1),period=12) also comes from the ARIMA model. No matter how many forum posts, blogs posts, or help files I read, I don't understand what the xtransf, transfer, and xreg arguments do or how to correctly specify them. Can someone help me understand this?

Secondarily, in my actual analysis, the ARIMA model is (5,1,0) with drift. How would I include the drift in the arimax command? Do I need to?

I'm sorry if there's any necessary information I haven't provided. Just let me know if that's the case, and I'll be more than happy to provide it.

Update: I was able to find some information in the Appendix of that textbook that says,

"It is assumed that the intervention affects the mean function of the process, with the deviation from the unperturbed mean function modeled as the sum of the outputs of an ARMA filter of a number of covariates; the deviation is known as the transfer function. The covariates making up the transfer function are passed to the arimax function via the xtransf argument in the form of a matrix or a data.frame."

So the xtransf argument should be a variable indicating when the intervention is in effect.

Then, it says,

"The ARMA orders for the dynamic components of the transfer function are supplied via the transf argument as a list containing the vectors of ARMA orders in the order of the covariates defined in the xtransf argument."

And, finally, it says:

"Additive outliers (AO) in a time series can be incorporated as indicator variables passed to the xreg argument."

So, now I better understand what the first and third of those arguments are doing, but I still have some questions. I still don't understand what's going on with the transf argument. What is the ARMA order for the dynamic components of the transfer function? In this example, why are they (0,0) and (1,0)? How would I identify what ARMA order to use for the transfer function in a different problem? And why is the xtransf argument being passed two identical variables rather than just one?