2) Can I look at estimate/SE for the components of the transfer function and say that the effect of the intervention was significant?

3) How can one visualize the transfer function effect (plot it?)

4) Is there a way to estimate how much the intervention increased the output after 'x' months? I guess for this (and maybe #3) I am asking how to work with an equation of the model - if this were simple linear regression with dummy variables (for example) I could run scenarios with and without the intervention and measure the impact - but I am just unsure how to work this this type of model.

3 Answers
3

An AR(1) model with the intervention defined in the equation given in the question can be fitted as shown below. Notice how the argument transfer is defined; you also need one indicator variable in xtransf for each one of the interventions (the pulse and the transitory change):

The intervention increases the value of the observed variable in October 2013
by around a $75\%$. In subsequent periods the effect remains but with a decreasing weight.

We could also create the interventions by hand and pass them to stats::arima as external regressors. The interventions are a pulse plus a transitory change with parameter $0.9231$ and can be built as follows.

The same estimates of the coefficients as above are obtained. Here we fixed $\omega_2$ to $0.9231$. The matrix xreg is the kind of dummy variable that you may need to try different scenarios. You could also set different values for $\omega_2$ and compare its effect.

These interventions are equivalent to an additive outlier (AO) and a transitory change (TC) defined in the package tsoutliers. You can use this package to detect these effects as shown in the answer by @forecaster or to build the regressors used before. For example, in this case:

As shown below, this parameterization leads, in this case, to parameter estimates that involve a different effect compared to the previous parameterization. It reminds me the effect of an innovational outlier rather than a pulse plus a transitory change.

The effect can be described now as a sharp increase in October 2013 followed by a decrease in the opposite direction; then the effect of the intervention vanishes quickly alternating positive and negative effects of decaying weight.

This effect is somewhat peculiar but may be possible in real data. At this point I would look at the context of your data and the events that may have affected the data. For example, has there been a policy change, marketing campaign, discovery,... that may explain the intervention in October 2013. If so, is it more sensible that this event has an effect on the data as described before or as we found with the initial parameterization?

According to the AIC, the initial model would be preferred because it is lower ($-18.94$ against $-15.42$). The plot of the original series does not suggest a clear match with the sharp changes involved in the measurement of the second intervention variable.

Without knowing the context of the data, I would say that an AR(1) model with a transitory change with parameter $0.9$ would be appropriate to model the data and measure the intervention.

Edit 2

The value of $\omega_2$ determines how fast the effect of the intervention decays to zero, so that's the key parameter in the model. We can inspect this by fitting the model for a range of values of $\omega_2$. Below, the AIC is stored for each of these models.

The lowest AIC is found for $\omega_2 = 0.88$ (in agreement with the value estimated before). This parameter involves a relatively persistent but transitory effect. We can conclude that the effect is temporary since with values higher than $0.9$ the AIC increases (remember that in the limit, $\omega_2=1$, the intervention becomes a permanent level shift).

The intervention should be included in the forecasts. Obtaining forecasts for periods that have already been observed is a helpful exercise to assess the performance of the forecasts. The code below assumes that the series ends in October 2013. Forecasts are then obtained including the intervention with parameter $\omega_2=0.9$.

First we fit the AR(1) model with the intervention as a regressor (with parameter $\omega_2=0.9$):

The first forecasts match relatively well the observed values (gray dotted line). The remaining forecasts show how the series will continue the path to the original mean. The confidence intervals are nonetheless large, reflecting the uncertainty. We should therefore be cautions and revise the model as new data are recorded.

$95\%$ confidence intervals can be added to the previous plot as follows:

$\begingroup$This is great, thank you! I had a couple follow-ups if you dont mind. 1) Is the process I followed correct? 2) Would you consider the fit of the model "good enough" in order to use the estimates to quantify the effect of the intervention? 3) Should I not be able to use my parametrization, i.e. transfer=list(c(1,1)) as an equivalent and get pretty close results? The example I was following from a textbook suggested I should be able to, but in this example, the results are not close...$\endgroup$
– B_MinerJul 23 '14 at 15:15

$\begingroup$@B_Miner You are right I have edited my answer.$\endgroup$
– javlacalleJul 23 '14 at 20:08

$\begingroup$I agree with you that of the two models, the first parametrization ( maybe with the non-significant pulse removed) would be the best fit. Why the two parametrization do not yield the same model, when I believe they should, is a mystery. I will email the package developer (who also wrote the book that mentions their equivalence).$\endgroup$
– B_MinerJul 24 '14 at 0:10

$\begingroup$The data is the number of certificates of deposits opened per month. The intervention was an increase in average interest rate, that spiked up starting on Oct 13. The level of the interest rate has remained relatively constant since Oct 13. It seemed to me that after the spike, the demand for the product started to taper - I am not sure if it will return to the previous mean or settle at some elevated (from prior) level.$\endgroup$
– B_MinerJul 24 '14 at 0:12

$\begingroup$B_miner, based on the data we cant really conclude, if the demand will settle down to a new mean.$\endgroup$
– forecasterJul 24 '14 at 3:22

Sometimes less is more. With 30 observations in hand I submitted the data to AUTOBOX , a piece of software that I have helped develop. I submit the following analysis in the hope of acquiring the +200 reward (just kidding !) . I have plotted the Actual and Cleansed Values a visually suggesting the impact of "recent activity". . The model that was automatically developed is shown here. and here . The residuals from this rather simple level-shifted series are presented here . The model statistics are here . In summary there were an interventions that could be empirically identified rendering an ARIMA process ; two pulses and 1 level shift . The Actual/Fit and Forecast graph further highlights the analysis.

I for one would like to see the plot of the residuals from the previously specified and in my opinion potentially overly-specified models.

$\begingroup$I am not familiar with Autobox, but is the noise part of the model the same as originally I had : a non-zero mean and an AR(1)?$\endgroup$
– B_MinerJul 24 '14 at 0:17

$\begingroup$Is this output saying that the only "intervention" in the Oct 13 to current time period is a single pulse for Oct 13 and then the series returns to its normal mean level?$\endgroup$
– B_MinerJul 24 '14 at 0:21

$\begingroup$I added the residuals from both parametrizations. To my eye, it seems like the first one I listed (the one originally fit by javlacalle) is better. Agree?$\endgroup$
– B_MinerJul 24 '14 at 0:46

$\begingroup$1) The noise part is an AR(1) with a non-zero mean$\endgroup$
– IrishStatJul 24 '14 at 10:24

$\begingroup$1) The noise part is an AR(1) with a non-zero mean ; 2) There are 2 interventions period 22 and period 3 and after oct 13 it returns to a new level that started at sept 13 ; 3 ) Given the choice between the two that you mentioned, I agree BUT I prefer the AUTOBOX model for it's simplicity and efficiency. You can find out more about AUTOBOX from autobox.com/cms$\endgroup$
– IrishStatJul 24 '14 at 10:32

Based on my similar post to your earlier question, I used tso function in tsoutliers package in $R$ and it automatically detected a temporary change at October 2013. Please note that temporary change is different from ramp shift in transfer function which is what you are after. I don't think there is a package/function that I'm aware of that would be able to visualize transfer function. Hopefully this would provide some insights. I did not use log transformation, I modeled it directly. tsoutliers package can be thought of as an automatic intervention detection.

Below is the estimate, there was a ~2356.3 unit increase in October 2013 with a standard error of ~481.8 and has a decaying effect thereafter. The function automatically identified AR(1). I had to do couple of iteration and make both seasonal and non seasonal differencing to 0, which is reflected in the args.tsmethod in the tso function.

Below is the plot, tsoutlier is the only package that I know of that can print temporary changes this nicely in a plot.

This analysis hopefully provided answer to your 2, 3 and 4 questions albeit using a different methdeology. Especially the plot and the coefficients provided the effect of this intervention and what would have happened if you did not have this intervention.

Also hoping someone else can replicate this plot/analysis using transfer function modeling in R. I'm not sure if this could be done in R, may be someone else can fact check me on this.

$\begingroup$Thanks. Yeah, this plot is what I would like to do from the arimax model - look at with and without the intervention (and subtract). I think the filter function in R can be used to generate the transfer function value for each month (and then just plot it to visualize) but I cant figure out how to do it for an arbitrary pulse intervention function.$\endgroup$
– B_MinerJul 18 '14 at 13:18