Forecasting v R
Rob J. Hyndman
Professor of Statistics at Monash University


$m =$ sezónní perioda
Každou periodickou funkci lze pro dostatečně velké K aproximovat součty členů sin a cos
Regresní koeficienty: $\alpha_k$ a $\gamma_k$
$e_t$ lze modelovat jako nesezónní proces ARIMA
Předpokládá neměnný sezónní vzorec
fit <- auto.arima(cafe, xreg = fourier(cafe, K = 1),
seasonal = FALSE, lambda = 0)
fit %>% forecast(xreg = fourier(cafe, K = 1, h = 24)) %>%
autoplot() + ylim(1.6, 5.1)

fit <- auto.arima(cafe, xreg = fourier(cafe, K = 2),
seasonal = FALSE, lambda = 0)
fit %>% forecast(xreg = fourier(cafe, K = 2, h = 24)) %>%
autoplot() + ylim(1.6, 5.1)

fit <- auto.arima(cafe, xreg = fourier(cafe, K = 3),
seasonal = FALSE, lambda = 0)
fit %>% forecast(xreg = fourier(cafe, K = 3, h = 24)) %>%
autoplot() + ylim(1.6, 5.1)

fit <- auto.arima(cafe, xreg = fourier(cafe, K = 4),
seasonal = FALSE, lambda = 0)
fit %>% forecast(xreg = fourier(cafe, K = 4, h = 24)) %>%
autoplot() + ylim(1.6, 5.1)

fit <- auto.arima(cafe, xreg = fourier(cafe, K = 5),
seasonal = FALSE, lambda = 0)
fit %>% forecast(xreg = fourier(cafe, K = 5, h = 24)) %>%
autoplot() + ylim(1.6, 5.1)

fit <- auto.arima(cafe, xreg = fourier(cafe, K = 6),
seasonal = FALSE, lambda = 0)
fit %>% forecast(xreg = fourier(cafe, K = 6, h = 24)) %>%
autoplot() + ylim(1.6, 5.1)


Forecasting v R