1
$\begingroup$

enter image description here

I want to predict the future data given the time series data with SARIMA model.

In order to determine (p, d, q) and (P, D, Q, m), I plotted the ACF and PACF.

The ACF graph shows that there is a seasonality of 24 intervals, so I set the m as 24.

However, I don't know how to set, p, d, q, and P, D, Q.

In other example, ACF graph usually degrades exponentialy, so they set p and q as 1 or 2.

But my ACF graph has cycles, so I am confused about how to set p and q.

Could you help me?

$\endgroup$
2
  • $\begingroup$ You rather obviously have seasonality of cycle length about 24, so I assume your data are hourly with day-over-day seasonality. Is there any particular reason why you want to build an ARIMA model yourself based on ACF/PACF, rather than use an automated ARIMA modeler? $\endgroup$ Commented Nov 14, 2022 at 7:40
  • $\begingroup$ You're right. It is the data that recorded the demand value on an hourly basis for two years. The reason is that I just want to know the parameter selection criteria. I want to answer a question later in a job interview where the interviewer might ask me why I chose the parameters like this. $\endgroup$
    – alryosha
    Commented Nov 14, 2022 at 7:58

1 Answer 1

1
$\begingroup$

Your data show obvious seasonality of cycle length about 24. Since you note these are hourly data, this makes sense. So your first order of business should be to take seasonal differences, then plot the differenced data again and continue from there. Note that this seasonal cycle length needs to be provided based on domain knowledge.

A description of the Box-Jenkins approach to model building is given in Shumway & Stoffer (2016), Time Series Analysis and Its Applications With R Examples, Fourth Edition, section 3.7. I personally find this description singularly unhelpful and would always recommend using an automated ARIMA modeler based on information criteria.

Note also that hourly data may have , specifically day-over-day and week-over-week. ARIMA can't handle this. The tag wiki contains pointers to relevant algorithms and literature.


A word on the wider context. If you are asked this kind of question in a job interview, there are two possibilities.

  1. Either the job truly involves using the older Box-Jenkins approach to ARIMA model building. For instance, it might be an academic position on ARIMA time series modeling research, or it might be on software development where the decision was made to go with Box-Jenkins for whatever reason (perhaps this is very old legacy code). If so, and if you have to ask about this here, then you are possibly in over your head and should reconsider whether this job is a good fit, unless you are willing and prepared to learn a lot (and your employer is fine with this).

  2. Or it is on modeling and possibly forecasting as such, but agnostic about the approach. In this case, you should display some knowledge about ARIMA models (like understanding that the cyclic patterns in your ACF plot indicate seasonality), but then explain that an automated ARIMA modeler using information criteria will yield better results, be more scalable and stable and require less subjective decisions. If your interviewer accepts this, that is good. If not, this is not a good sign. Take this as an opportunity to learn about your potential employer.

$\endgroup$
2
  • 1
    $\begingroup$ Thank you very much! I'm just looking for a job related with the modeling, so my job is unlikely to be related to the older approach of ARIMA model bulding. So as you say, it seems good to answer in the interview that I found the parameters using automated ARIMA modelder based on information criteria. $\endgroup$
    – alryosha
    Commented Nov 14, 2022 at 8:34
  • 1
    $\begingroup$ You may find this helpful: otexts.com/fpp3. Good luck! $\endgroup$ Commented Nov 14, 2022 at 8:47

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.