我想从15个数据点中进行预测(我知道样本很小)
数据列表:
acper <- c(0.17437418,0.157034518,0.156229944,0.165366982,0.17212133,0.205634804,0.177709816,0.162522795,0.165439735,0.147619365,0.144451531,0.151751211,0.129296274,0.129692449,0.118168555)
现在我想对ets进行预测
ets.model <- ets(acper)
forecast(ets.model, h=3)
plot(forecast(ets.model, h=3))
接下来的几年我都得到相同的预测
Point Forecast Lo 80 Hi 80 Lo 95 Hi 95
16 0.1181686 0.09764478 0.1386923 0.08678015 0.1495570
17 0.1181686 0.08914355 0.1471936 0.07377865 0.1625585
18 0.1181686 0.08262033 0.1537168 0.06380224 0.1725349
19 0.1181686 0.07712100 0.1592161 0.05539174 0.1809454
20 0.1181686 0.07227600 0.1640611 0.04798195 0.1883552
21 0.1181686 0.06789578 0.1684413 0.04128298 0.1950541
22 0.1181686 0.06386775 0.1724694 0.03512264 0.2012145
23 0.1181686 0.06011855 0.1762186 0.02938874 0.2069484
24 0.1181686 0.05659723 0.1797399 0.02400334 0.2123338
25 0.1181686 0.05326668 0.1830704 0.01890970 0.2174274
为什么我总是得到0.1181686?这对我来说似乎无效。
答案 0 :(得分:1)
指数平滑法为较新的样本赋予较大的权重,为较旧的样本赋予较小的权重,而移动平均值(R中的ARIMA模型)将为所有观察值赋予相等的权重(这可能更适合您的样本)。由于这个事实,您的样本是如此之小,似乎只是取了最后一个值并向上舍入了。
答案 1 :(得分:1)
首先转换为ts
:
library(forecast)
acper <- c (0.17437418,0.157034518,0.156229944,0.165366982,0.17212133,0.205634804,0.177709816,0.162522795,0.165439735,0.147619365,0.144451531,0.151751211,0.129296274,0.129692449,0.118168555)
ets.model <- ets(ts(acper, start = c(2000, 1), freq = 12), model = "ZAN")
forecast(ets.model, h=3)
#Point Forecast Lo 80 Hi 80 Lo 95 Hi 95
#Apr 2001 0.1261377 0.10238661 0.1498888 0.08981353 0.1624619
#May 2001 0.1227179 0.09840193 0.1470338 0.08552986 0.1599059
#Jun 2001 0.1192980 0.09442959 0.1441664 0.08126504 0.1573310
plot(forecast(ets.model, h=3))