y1=c(6.4,5.6,7.8,8.8,11,11.6,16.7,15.3,21.6,22.4)
mlt=HoltWinters(y1,gamma=FALSE)
ssemlt=mlt$SSE
ssemlt
plot(fitted(mlt))
yy2=y1[3:10]
fe=yy2-fitted(mlt)
squ=fe*fe
out2=cbind(yy2,fitted(mlt),fe,squ)
显示结果是
Time Series:
Start = 3
End = 10
Frequency = 1
yy2 fitted(mlt).xhat fitted(mlt).level fitted(mlt).trend fe.xhat
3 7.8 4.800000 5.600000 -0.8000000 3.0000000
4 8.8 6.643909 6.121954 0.5219544 2.1560911
5 11.0 9.066033 7.593994 1.4720392 1.9339672
6 11.6 12.242483 9.918238 2.3242447 -0.6424830
7 16.7 14.000506 11.959372 2.0411336 2.6994945
8 15.3 18.420712 15.190042 3.2306698 -3.1207116
9 21.6 18.901089 17.045565 1.8555237 2.6989109
10 22.4 23.135171 20.090368 3.0448028 -0.7351709
fe.level fe.trend squ.fe.xhat squ.fe.level squ.fe.trend
3 2.2000000 8.600000 9.0000000 4.84000000 73.96000
4 2.6780456 8.278046 4.6487289 7.17192800 68.52604
5 3.4060064 9.527961 3.7402291 11.60087939 90.78204
6 1.6817617 9.275755 0.4127844 2.82832234 86.03964
7 4.7406281 14.658866 7.2872704 22.47355458 214.88236
8 0.1099582 12.069330 9.7388409 0.01209081 145.66873
9 4.5544346 19.744476 7.2841202 20.74287442 389.84435
10 2.3096318 19.355197 0.5404763 5.33439921 374.62366
我如何可以从fitted(mlt)里提出fitted(mlt).xhat? 因为要计算sse


雷达卡




京公网安备 11010802022788号







