ARIMA 的多重季节性?

数据挖掘 时间序列 有马
2022-02-25 11:56:18

我知道 ARIMA 无法检测多个季节性,但可以使用傅立叶函数添加第二个季节性

我需要预测由每日、每周(工作日-周末)、每年季节性组成的天然气消耗量。应用LOESS的三倍 STL 分解是否有意义原因是我应用了傅里叶方法,结果不好,但我不知道是不是因为我应用错了。

我对理论解释很感兴趣,但在这里您还可以找到代码:

ARIMA + 2 STL:

b <- ts(drop(coredata(dat.ts)), deltat=1/12/30/24, start=1)
fit <- stl(b, s.window="periodic")
b <- seasadj(fit)
dat.ts <- xts(b, index(dat.ts))

# The weekdays are extracted
dat.weekdays <- dat.ts[.indexwday(dat.ts) %in% 1:5]
dat.weekdaysTS <- ts(drop(coredata(dat.weekdays)), frequency=24, start=1)
fit <- stl(dat.weekdaysTS, s.window="periodic")
dat.weekdaysTS <- seasadj(fit)

arima <- Arima(dat.weekdaysTS, order=c(3,0,5))

用傅立叶:

dat.weekdays <- dat.ts[.indexwday(dat.ts) %in% 1:5]
dat.weekdaysTS <- ts(drop(coredata(dat.weekdays)), frequency=24, start=1)
z <- fourier(ts(dat.weekdaysTS, frequency=365.25), K=5)
arima <- Arima(dat.weekdaysTS, order=c(3,0,5),xreg=z)
0个回答
没有发现任何回复~