3
$\begingroup$

I have a daily time series data. I have to perform autocorrelation on it so as to find correlation between weeks and find the minimum number of lags that have good correlation coefficients. That is, with what weeks is week(t) correlated to. Is it well correlated with week(t-1), week(t-2) etc...

Autocorrelation with my data would give me correlations between days and not weeks which I want. But I want correlation between weeks. That is, autocorrelation with groups of 7 days (1week=7days). How can I do it?

$\endgroup$
1
$\begingroup$

You can first average the daily values to weekly (so that, for example, if you started out with 364 daily values, you'll have 52 weekly values) and then compute the autocorrelation of the weekly series.

$\endgroup$
  • 1
    $\begingroup$ That's one way, and for long series it will be fine. But one can't help thinking it's wasteful of data, because there are actually 358 overlapping sets of weekly data in a year and you don't seem to have fully exploited all that information. $\endgroup$ – whuber Dec 5 '16 at 23:13
  • $\begingroup$ I would say you are not losing much, because those overlapping weeks are not independent in any way. You really only have 52 weekly values in a year. $\endgroup$ – Nir Dec 7 '16 at 11:03
0
$\begingroup$

If you construct a regression model (perhaps with additional arima structure thus ARMAX ) using 6 dummies to reflect day-of-the-week and 51 dummies reflecting week of the year you might accomplish what you want to do . You might need to incorporate holiday indicators as they can affect daily values. Sometimes (often) there are lead and lag effects around each holiday which require customization.

The whole idea is to seamlessly integrate short term deterministic effects like day and week (X) while adapting to previous values (ARMA) . Correlations are descriptive while a useful model can be inferential.

$\endgroup$

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.