0

我目前正在使用 ets() 根据 R 中的历史时间序列数据预测未来值。我使用 predict() 函数来预测接下来的 24 个数据点。但是,对于前 12 个和后 12 个数据点,输出给出了相同的数字。例如,2012 年 5 月的预测值复制到 2013 年 5 月。

以下数据通过:

2005.04.30    87.6
2005.05.31    95.4
2005.06.30    97.7
2005.07.31    101.3
2005.08.31    100.6
2005.09.30    97
2005.10.31    91.1
2005.11.30    92.1
2005.12.31    112
2006.01.31    113.9
2006.02.28    103.9
2006.03.31    115.1
2006.04.30    100
2006.05.31    107.5
2006.06.30    110
2006.07.31    114.2
2006.08.31    109.4
2006.09.30    108.9
2006.10.31    114.6
2006.11.30    113
2006.12.31    116.5
2007.01.31    120.2
2007.02.28    112.6
2007.03.31    124.1
2007.04.30    113.4
2007.05.31    121
2007.06.30    117.9
2007.07.31    118.4
2007.08.31    119.5
2007.09.30    113.5
2007.10.31    117.8
2007.11.30    118.2
2007.12.31    120.6
2008.01.31    126.1
2008.02.29    121.2
2008.03.31    127.4
2008.04.30    119.5
2008.05.31    121.5
2008.06.30    125.7
2008.07.31    131.4
2008.08.31    123.5
2008.09.30    122.8
2008.10.31    125.3
2008.11.30    119.4
2008.12.31    121.2
2009.01.31    123.7
2009.02.28    118.1
2009.03.31    128.7
2009.04.30    112.2
2009.05.31    115.4
2009.06.30    119.8
2009.07.31    117.4
2009.08.31    127.8
2009.09.30    124.4
2009.10.31    131
2009.11.30    118.9
2009.12.31    124
2010.01.31    127.4
2010.02.28    116.3
2010.03.31    126.4
2010.04.30    115.7
2010.05.31    117.7
2010.06.30    122.4
2010.07.31    121.9
2010.08.31    116.7
2010.09.30    110.9
2010.10.31    120.7
2010.11.30    116.7
2010.12.31    131.2
2011.01.31    137.1
2011.02.28    118.7
2011.03.31    128.5
2011.04.30    123.5
2011.05.31    126.1
2011.06.30    127.7
2011.07.31    125.3
2011.08.31    126.7
2011.09.30    114
2011.10.31    116.5
2011.11.30    128
2011.12.31    130.6

代码:

ETSfit <- ets(data.ts)
data.ets <- forecast(ETSfit, level=70, h=24)

输出:

          Point Forecast    Lo 70    Hi 70
 Jan 2012       133.6314 129.3483 137.9145
 Feb 2012       123.5998 118.7221 128.4775
 Mar 2012       133.1607 127.7534 138.5681
 Apr 2012       121.0877 115.1982 126.9773
 May 2012       125.4991 119.1639 131.8342
 Jun 2012       127.5913 120.8399 134.3427
 Jul 2012       128.4923 121.3489 135.6358
 Aug 2012       127.2225 119.7074 134.7376
 Sep 2012       122.1938 114.3247 130.0630
 Oct 2012       125.5382 117.3302 133.7462
 Nov 2012       123.3347 114.8012 131.8682
 Dec 2012       129.9972 121.1503 138.8441
 Jan 2013       133.6314 124.4818 142.7810
 Feb 2013       123.5998 114.1572 133.0424
 Mar 2013       133.1607 123.4340 142.8875
 Apr 2013       121.0877 111.0849 131.0906
 May 2013       125.4991 115.2275 135.7706
 Jun 2013       127.5913 117.0579 138.1246
 Jul 2013       128.4923 117.7035 139.2812
 Aug 2013       127.2225 116.1841 138.2609
 Sep 2013       122.1938 110.9114 133.4763
 Oct 2013       125.5382 114.0169 137.0595
 Nov 2013       123.3347 111.5793 135.0901
 Dec 2013       129.9972 118.0123 141.9821

请帮忙。

4

1 回答 1

0

Look at the fitted model:

ETS(A,N,A) 

Call:
 ets(y = x) 

  Smoothing parameters:
    alpha = 0.5449 
    gamma = 1e-04 

  Initial states:
    l = 95.8994 
    s=6.3817 -3.1792 6.8525 3.218 -3.4445 -1.2408
           -4.5852 0.4434 1.7133 0.8123 -1.28 -5.6914

  sigma:  4.1325

     AIC     AICc      BIC 
613.8103 620.1740 647.3326 

So there is no trend selected. Therefore the forecasts will have only seasonal pattern and no trend, which is exactly what you've got.

于 2013-05-16T11:25:36.010 回答