0
$\begingroup$

I want to test for efficacy of an intervention. I have pre- and post-intervention data and I used auto.arima to find the best fit for the two data sets.

I'm stuck in the actual use of these models now. What do I do with the auto.arima fit? Can I graph it and test for statistically significant differences in the coefficients? If so, how do I graph it?

This is what I have right now ( specified from auto.arima)

myPreFit<-arima(myPre,order=c(0,1,0))

myPostFit<-arima(myPost,order=c(1,0,1))

$\endgroup$
3
  • 1
    $\begingroup$ Do you believe that your series is well-modeled by an ARIMA process, but that the entire ARIMA structure may have changed due to the intervention? Does the fact that, say, the series is now better described by including an MA term mean something to you, scientifically? If you expect something simpler like "the mean/drift may have changed due to the intervention", you should include an intervention dummy as an exogenous regressor, use forecast::auto.arima on that model, and then test the dummy coefficient. $\endgroup$
    – Chris Haug
    Mar 3 '17 at 20:46
  • $\begingroup$ With an MA term, there is a definite conclusion I am drawing, scientifically. I don't see how using forecast() will help determine the difference between the models. $\endgroup$ Mar 3 '17 at 22:45
  • 1
    $\begingroup$ Chris Haug is not suggesting to use the function forecast but the package forecast because forecast::auto.arima is used to refer to function auto.arima from package forecast. $\endgroup$ Mar 4 '17 at 9:06
0
$\begingroup$

Time series intervention analysis is not like this. First, you have to model regular ARIMA model for preintervention period and find the order of appropriate ARIMA model. Then you have to use the order in ARIMAX model (taking whole period, pre+post intervention), including a dummy variable. model1 = forecast::auto.arima(ts_model1, trace = TRUE, seasonal = TRUE, stationary = FALSE,ic = c("aicc", "aic", "bic"),stepwise = TRUE, allowmean = TRUE, allowdrift = TRUE) #ts_model1 is only for preintervention period

Best model: ARIMA(1,1,1)(1,0,0)[12]

model2 = TSA::arimax(ts_model2, order = c(1, 1, 1), seasonal = list(order = c(1, 0, 0), period = 12), xreg = ts_model4, method = c("CSS-ML", "ML", "CSS"), kappa = 1e+06, xtransf =dummy, transfer = list(c(1,0))) I hope you understand.

$\endgroup$
1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.