Prognoser i R
Rob J. Hyndman
Professor of Statistics at Monash University


$m =$ säsongperiod
Varje periodisk funktion kan approximeras med summor av sin- och cos-termer för tillräckligt stort K
Regressionskoefficienter: $\alpha_k$ och $\gamma_k$
$e_t$ kan modelleras som en icke-säsongsmässig ARIMA-process
Förutsätter att säsongsmönstret är konstant
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)


Prognoser i R