We are trying to check to what extent the changing X-values might explain the observed trend in Y.

  • By "in-sample" I mean: using the same data as was used for the model building.
  • By "dynamic" I mean: not using observed Y-series but the forecasted Y-series.


  1. Our idea is that if the observed values diverge from this prediction, this suggests there may be some further non-measured explanatory variables (a hypothesis put forth but for which there is no good data). And if predicted ~observed, there is "no room" for this specific competing hypothesis. Does this make sense as an information-gathering exercise (not a formal test)?

  2. Is it possible to technically achieve this with either R or Stata? We have already fitted a seasonal ARIMA model.


    xreg <- cbind(A,B,C)
    mod  <- arima(Y, order=c(3,0,0), seasonal=list(order=c(1,1,1), period=12), 


    arima Y A B C, arima(3,0,0) sarima(1,1,1,12)

    Now, we would like to see what that fitted model produces for the same data, without using the observed Y-values (except for the first values needed as initial values). I have found out that Stata should probably in principle do this with:

    predict Y2, dynamic (tm(2001m01))y

    However, the person using Stata tells me that this, too gives a nearly perfect fit, the same as without the dynamic, so perhaps this is not the solution.

    In R, I have not found a solution for this in forecast() or predict.arima but perhaps I missed something.

  • $\begingroup$ Thank you for editing to clarify your question. (Note that I have edited it further; please ensure it still says what you want it to.) Your first question is a viable statistics question for this site. The second question is really about the software, &/or a tutorial, neither of which is quite on topic. Be aware that you may get an answer to #1 w/o an answer to #2. $\endgroup$ – gung Apr 10 at 15:44

Your Answer

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

Browse other questions tagged or ask your own question.