Im trying to forecast a timeseries (daily intervals) but I am unsure of the syntax of the estimate statement. I know p is for autoregression and q is for moving averages, but what do the (2)(12) and (1 3) mean, and what values should they be if the interval = day?

proc arima data=daily;
 i var=SUM_of_Total_Revenue2;
e p=(2)(12) q=(1 3);
 f lead=365
  • $\begingroup$ Be aware the questions about code are generally off-topic here. This one is borderline, IMO, as there is a statistical question behind the code. It would help however, if you could make the statistical aspect of your Q more prominent. It might also help (ironically) if you could provide the full code, eg what PROC is that? $\endgroup$ Mar 20, 2015 at 15:31
  • $\begingroup$ I meant what proc is the e... noprint; in? AFAIK, you couldn't run that code in SAS on its own. $\endgroup$ Mar 20, 2015 at 15:45
  • $\begingroup$ I have been involved several daily forecasting tasks, but I have not come across any model like yours, can you please post the series ? its strange to have a seasonality of 12 for a daily forecasting its usually 7 or 365. $\endgroup$
    – forecaster
    Mar 20, 2015 at 21:13
  • $\begingroup$ I think it shoul be 365 instead of 12. here is the series.imgur.com/G0sUM8d $\endgroup$ Mar 20, 2015 at 22:37

2 Answers 2


SAS has extensive documentation on all their procedures. Please see here for the syntax for PROC ARIMA.

As you noted p is for autoregressive and q is for moving average in an arima model. In proc arima if p or q is separated by a bracket then it means that there is a seasonal autoregressive model.For your example, what p = (2)(12) means is that current day of SUM_of_Total_Revenue2 is related to 2 days (nonseasonal ar) before and also related to 12 days (seasonal ar) before the current day.

Mathematically using back-shift notation this could be represented as follows. I'm following the notation used in Makridakis et al:

$(1-\phi_1B^2)(1-\Phi_1B^{12}) Y_t = (1-\theta_1B-\theta_1B^3)e_t$

Left hand is non seasonal and seasonal ar(p) and right hand side is the nonseasonal ma(q).

Hope this helps.


My experience tells me that the analysis of daily data would never lead to the ARIMA model that you propose. How did you go about identifying such a model for daily data (7 days in a week) ? Are you analysing daily data that has 6 readings per week ? A more appropriate model might include daily fixed effects, weekly or monthly effects , holiday effects and perhaps an ARIMA structure or order 1 or 7 or perhaps 6 if the data is 6 periods per week . Care should be taken to deal with and identify and incorporate pulses, level shifts and perhaps trends.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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