p=18493
本文我们使用4个时间序列模型对每周的温度序列建模。第一个是通过auto.arima获得的,然后两个是SARIMA模型,最后一个是Buys-Ballot方法。...我们开始对温度序列进行建模(温度序列对电力负荷的影响很大)
y=Temp
plot(y,type="l")
?...时间序列是自相关的,在52阶
acf(y,lag=120)
?...对模型进行预测
plot(y,type="l",xlim=c(0,n )
abline(v=k,col="red")
lines(pre4,col="blue")
?...然后,我们在这200个值上拟合4个模型
然后我们进行预测
y1=predict(model1,n.ahead = 111)$pred,
y2=predict(model2,n.ahead = 111