I am doing VAR analysis of 5 years long data. It is hourly data, so 1~24 hours every day and this goes on for 5 years. I heard it is good to choose 4 lag length for quarterly data and 12 for monthly data. But I do not know what to choose for 'daily data'.

Can you guys help me out on this?

Thank you.

  • $\begingroup$ You could try lags 1 and 24 or (1, 2, 24) or (1, 2, 3, 24) or better yet, use regularized estimation (such as elastic net) and select the relevant lags based on cross validation. $\endgroup$ Commented Feb 4, 2018 at 17:41

2 Answers 2


Hourly data ( and I have seen lots of hourly data sets ) are best handled by incorporating day-of-the-week historical values ( and predictions) along with arima structure possibly including lag 24. Additionally concern should be taken to detect/incorporate level shifts and local trends while being sensitive to anomalies. Daily predictions could be based upon day-of-the-month , monthly or weekly indivators and of course holiday effects ( customized lead,contemporaneous and lag efffects et al.

  • $\begingroup$ Hello. But I am doing VARs because I have multiple variables. So arima wouldnt be the case. So you suggest me to transform hourly data set into daily data set to perform? Did I understand correctly? $\endgroup$
    – junmouse
    Commented Feb 4, 2018 at 19:05
  • $\begingroup$ you can include multiple input variables into a model to predict daily values. The daily predictions can then be to used as an input to 24 hourly models along with ARIMA structure.. See stats.stackexchange.com/questions/319888/… for some hints $\endgroup$
    – IrishStat
    Commented Feb 4, 2018 at 21:53

I would not insert blindly as much lags as possible, e.g. 24 hours thus 24 lags, or 52 weeks than lag 52). It depends not only on the aggregation level, but also on the model framework, imagine you are in a VAR and want to forecast weekly data of sales. Now, imagine you have a marketing campaign with different spendings, but not all over the year, but also, for example, in a specific quarter of the year. A lag of 52 or even the amount of the campaign let it be 12, will be tested in a VAR as it is a mutliple equation model by nature. Even if there may be a statistcal impact, that can not be true. No campaign last so long in its effects, because the marketing channel defines mostly the lagged impact, e.g. TV ads lasts longer than digital display ads, as they are fading out in awareness more quickly. So it depends on the framework of your model, which lag would be feasible not the aggregation level itself.

Although We are mostly talking of granger causality when checking some relationships in a VAR we have to keep nature of the features in mind. We can not argument by maximum effect or correlation, we should look out for prudence and if their is a glance of causality


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.