I have a database based on hourly data and I need to forecast next 24h of a single variable. I was thinking about applying an ARIMA model with some exogenous variables but I don't succeed to configure the hourly frequency, estimate ARIMA parameters, pdq ( exists some tests to check which parameters are better for the model?) and the structure of the model in its easy form because I would also like to introduce some seasonality form by analyzing some variables I highlighted some daily and weekly behaviours similar.

I recognize that it could be quite difficult the problem but if you have also some useful links or some codes that can help me, please send me.

  • 1
    $\begingroup$ Your question is very broad and - if not closed as such - will likely only receive broad answers, if any. Can you elaborate a bit on the data you have available? What exactly did you try up to this point and where exactly do you think your problem lies? Try narrowing it down to an actual question $\endgroup$ – deemel Aug 1 '18 at 11:33

The question is quite broad but I can point you in a direction which may be helpful. You will definitely want the R forecast package, to start.

Information at this link is helpful as an intro-to-ARIMA-in-R. It describes how you can (i) decompose your data, (ii) achieve stationarity, (iii) understand autocorrelation functions (ACFs), and (iv) firring your ARIMA model using auto.arima().

The end of this link could be helpful for you in determining which model is best for your purposes. It walks through the basics of the Akaike’s Information Criterion (AIC), the Schwarz Bayesian Information Criterion (BIC), and the Box-Ljung test. Read the article to understand what all of these mean, and how they could be helpful for you.

This post may help you understand the constants when coding ARIMA in R.

This extremely informative chapter will give you a more thorough walkthrough that you may be desiring. It goes over all of the concepts mentioned above, along with in-depth examples and illustrations to get you started. It also goes into the basics of forecasting, though only considering ARIMA in your forecasting endeavors may not be advised.

  • $\begingroup$ Thank you very much @ERT , I'am starting to evaluate ARIMA models for my purpose, but probably I'll need to study also SVM and then make a comparison of the results.. $\endgroup$ – Edoardo Silvestri Aug 1 '18 at 12:53

+1 to ERT's very helpful answer.

That said, pretty much every hourly dataset I have come across exhibits . That is, you have intra-daily seasonalities with cycles of length 24, but these cycles are different between weekdays and weekends, so you get a superposition of a seasonality of length 168.

This applies to hourly time series of electricity load, call center workload, footfalls in retail stores, or traffic on CrossValidated.

ARIMA does not handle . So you might want to browse through previous questions in this tag, or look at the literature in its tag wiki. I especially recommend the and models, which were specifically built to model complex multiple seasonalities, and which are available in the forecast package for R.

  • $\begingroup$ You may want to check out this page if you are looking into dealing with multiple-seasonality $\endgroup$ – ERT Aug 1 '18 at 16:23
  • $\begingroup$ @ERT: I don't think using 48 dummies for each day's half hours is very good practice. It takes up 47 degrees of freedom and disregards the fact that consecutive half hours typically have similar values for the time series. I prefer the trigonometric dummies that gave the tbats model the "T". $\endgroup$ – Stephan Kolassa Aug 1 '18 at 16:33
  • $\begingroup$ Ah, yes, I forgot about that detail in OP's post! However, checking out the use of dummy variables may be helpful for OP, who seems to be just starting to learn forecasting and may benefit from the straightforward way dummy variables are implemented. $\endgroup$ – ERT Aug 1 '18 at 16:38

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.