BaşlayınÜcretsiz Başlayın

Autocorrelation of seasonal and cyclic time series

When data are either seasonal or cyclic, the ACF will peak around the seasonal lags or at the average cycle length.

You will investigate this phenomenon by plotting the annual sunspot series (which follows the solar cycle of approximately 10-11 years) in sunspot.year and the daily traffic to the Hyndsight blog (which follows a 7-day weekly pattern) in hyndsight. Both objects have been loaded into your workspace.

Bu egzersiz

Forecasting in R

kursunun bir parçasıdır
Kursu Görüntüle

Egzersiz talimatları

  • Produce a time plot and ACF plot of sunspot.year.
  • By observing the ACF plot, at which lag value (x) can you find the maximum autocorrelation (y)? Set this equal to maxlag_sunspot.
  • Produce a time plot and ACF plot of hyndsight.
  • By observing the ACF plot, at which lag value (x) can you find the maximum autocorrelation (y)? Set this equal to maxlag_hyndsight.

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

# Plot the annual sunspot numbers
autoplot(___)
ggAcf(___)

# Save the lag corresponding to maximum autocorrelation
maxlag_sunspot <- ___

# Plot the traffic on the Hyndsight blog
___
___

# Save the lag corresponding to maximum autocorrelation
maxlag_hyndsight <- ___
Kodu Düzenle ve Çalıştır